UTM icon indicating copy to clipboard operation
UTM copied to clipboard

No write access to file on external disk

Open dhruvit-r opened this issue 2 years ago • 3 comments

Describe the issue
On macOS 13 (Ventura), I'm unable to write (re-partition image, create a new file in an existing image, etc) to a raw image that exists on an external HD. Write operations fail with an "operation not permitted" error. I'm able to write to the same image if I copy it over to my Desktop. I'm also able to delete, re-create and edit the image from the host's CLI. I'm able to mount the image in read-only mode in the VM - I'm just not able to write to it. I have successfully been able to reproduce this with multiple external drives and multiple raw images, and I'm positive that this was working before the macOS update. I have successfully reproduced this issue across multiple VMs and multiple Linux operating systems.

I've also tried the "Use Apple Virtualization" setting. The machine kernel-panicked and rebooted (reproducible, not sporadic) when I tried to write to the raw disk image. The stack trace of the kernel panic mentioned a "com.apple.filesystems.lifs" as the root cause.

Configuration

  • UTM Version: 4.0.9 (68)
  • macOS Version: 13.0 (22A380)
  • Mac Chip (Intel, M1, ...): M1 Pro

Crash log
App does not crash. I was unable to find anything specific

Debug log

Running:  -L /Applications/UTM.app/Contents/Resources/qemu -S -spice "unix=on,addr=/Users/dhruvit_r/Library/Group Containers/WDNLXAD4W8.com.utmapp.UTM/1531D810-FBC7-4AA7-864C-3E08464437C8.spice,disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=off" -chardev spiceport,id=org.qemu.monitor.qmp,name=org.qemu.monitor.qmp.0 -mon chardev=org.qemu.monitor.qmp,mode=control -nodefaults -vga none -device virtio-net-pci,mac=32:50:B9:2E:0F:DE,netdev=net0 -netdev vmnet-shared,id=net0 -nographic -chardev spiceport,id=term0,name=com.utmapp.terminal.0 -serial chardev:term0 -cpu host -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt -accel hvf -m 4096 -device nec-usb-xhci,id=usb-bus -device usb-tablet,bus=usb-bus.0 -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 -device qemu-xhci,id=usb-controller-0 -chardev spicevmc,name=usbredir,id=usbredirchardev0 -device usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev2 -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=usb-controller-0.0 -device virtio-blk-pci,drive=drive2A4DEC8E-35CA-4334-8153-0E55B757CB74,bootindex=0 -drive if=none,media=disk,id=drive2A4DEC8E-35CA-4334-8153-0E55B757CB74,file=/Users/dhruvit_r/Library/Containers/com.utmapp.UTM/Data/Documents/VM_2.utm/Data/jammy_with_init.qcow2,discard=unmap,detect-zeroes=unmap -device virtio-blk-pci,drive=drive0E17CF6B-93D4-4B12-A134-EA1FADBF4F9A,bootindex=1 -drive if=none,media=cdrom,id=drive0E17CF6B-93D4-4B12-A134-EA1FADBF4F9A,file=/Volumes/VM/data.img -kernel /Users/dhruvit_r/Library/Containers/com.utmapp.UTM/Data/Documents/VM_2.utm/Data/kernel -initrd /Users/dhruvit_r/Library/Containers/com.utmapp.UTM/Data/Documents/VM_2.utm/Data/initrd -name VM_2 -uuid 1531D810-FBC7-4AA7-864C-3E08464437C8 -append root=/dev/vda

Upload VM
Issue is not specific to a VM.

dhruvit-r avatar Oct 27 '22 11:10 dhruvit-r

I'm having a similar issue with trying to set the shared folder on an external drive. It refuses to be mounted in the VM but I can mount a shared folder on the internal drive.

I believe the issue likely is that UTM doesn't have Removable Volumes permissions in Privacy & Security > Files and Folders.

daleeidd avatar Dec 11 '22 18:12 daleeidd

I believe the issue likely is that UTM doesn't have Removable Volumes permissions in Privacy & Security > Files and Folders.

This action has no effect on allowing UTM to read and write external files.

narukeu avatar Apr 06 '23 06:04 narukeu

Having a similar issue trying to create a disk image and use it on an external drive. This seems to be a limitation of UTM that you can't have read/write images on an external drive.

shawnvega avatar Mar 20 '24 07:03 shawnvega