Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared directory with VirtFS does not auto-mount on next UTM launch #5705

Closed
arif-desu opened this issue Sep 13, 2023 · 6 comments
Closed

Shared directory with VirtFS does not auto-mount on next UTM launch #5705

arif-desu opened this issue Sep 13, 2023 · 6 comments

Comments

@arif-desu
Copy link

Describe the issue

The shared directory under Linux does not unfortunately auto-mount when UTM is relaunched (Yes entry added to fstab).

Sequence : Shutdown VM -> Quit UTM -> Launch UTM -> Boot VM

Again, it only occurs on every other relaunch of UTM.

  • The workaround I found was to shutdown the VM and boot it again (rebooting doesn't work, it has to be shutdown first), and even then this has an inconsistent behaviour. Sometimes, it mounts it perfectly, other times the machine won't even boot prompting "could not initialise virtfs" - the second screenshot showcases this.
  • At that point, the next workaround is to Clear the shared directory menu and then again Browse for it.

Configuration

  • UTM Version: 4.3.5
  • macOS Version: Ventura 13.5.2
  • Mac Chip (Intel, M1, ...): Apple M2

Debug log


Screenshots

Screenshot 2023-09-13 at 9 19 53 AM Screenshot 2023-09-13 at 9 54 22 AM
@enqueueDequeue
Copy link

Facing a similar issue, found out that 9p filesystem is not getting mounted at all output of lshw here are the logs in case of unsuccessful mount and successful mount (after browsing the directory from UTM app).

ps aux output differs with -fsdev local,id=virtfs0,path=/Users/****/****,security_model=mapped-xattr option being added in the success case.

ps aux on host when it succeeds:

/Applications/UTM.app/Contents/XPCServices/QEMUHelper.xpc/Contents/MacOS/QEMULauncher.app/Contents/MacOS/QEMULauncher /Applications/UTM.app/Contents/Frameworks/qemu-x86_64-softmmu.framework/Versions/A/qemu-x86_64-softmmu
-L /Applications/UTM.app/Contents/Resources/qemu
-S -spice unix=on,addr=24DF19E9-7CD3-4CE8-AE32-499604C8D73C.spice,disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=on
-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 e1000,mac=B2:B1:71:59:3F:7C,netdev=net0
-netdev vmnet-shared,id=net0
-device virtio-gpu-gl-pci
-smp cpus=4,sockets=1,cores=4,threads=1
-machine q35,vmport=off,i8042=off,hpet=off
-accel tcg,thread=multi,tb-size=2048
-global PIIX4_PM.disable_s3=1
-global ICH9-LPC.disable_s3=1
-drive if=pflash,format=raw,unit=0,file=/Applications/UTM.app/Contents/Resources/qemu/edk2-x86_64-code.fd,readonly=on
-drive if=pflash,unit=1,file=/Users/****/Library/Containers/com.utmapp.UTM/Data/Documents/Ubuntu.utm/Data/efi_vars.fd
-m 8192
-usb
-device usb-tablet,bus=usb-bus.0
-device usb-mouse,bus=usb-bus.0
-device usb-kbd,bus=usb-bus.0
-device nec-usb-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 ide-hd,bus=ide.0,drive=driveE1B51273-DCCC-4EE8-B916-2E343D916BEC,bootindex=0
-drive if=none,media=disk,id=driveE1B51273-DCCC-4EE8-B916-2E343D916BEC,file=/Users/****/Library/Containers/com.utmapp.UTM/Data/Documents/Ubuntu.utm/Data/E1B51273-DCCC-4EE8-B916-2E343D916BEC.qcow2,discard=unmap,detect-zeroes=unmap
-device virtio-serial
-device virtserialport,chardev=org.qemu.guest_agent,name=org.qemu.guest_agent.0
-chardev spiceport,id=org.qemu.guest_agent,name=org.qemu.guest_agent.0
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0
-chardev spicevmc,id=vdagent,debug=0,name=vdagent
-fsdev local,id=virtfs0,path=/Users/****/****,security_model=mapped-xattr
-device virtio-9p-pci,fsdev=virtfs0,mount_tag=share
-name Ubuntu
-uuid 24DF19E9-7CD3-4CE8-AE32-499604C8D73C
-device virtio-rng-pci

ps aux on host system when it fails:

/Applications/UTM.app/Contents/XPCServices/QEMUHelper.xpc/Contents/MacOS/QEMULauncher.app/Contents/MacOS/QEMULauncher /Applications/UTM.app/Contents/Frameworks/qemu-x86_64-softmmu.framework/Versions/A/qemu-x86_64-softmmu
-L /Applications/UTM.app/Contents/Resources/qemu
-S -spice unix=on,addr=24DF19E9-7CD3-4CE8-AE32-499604C8D73C.spice,disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=on
-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 e1000,mac=B2:B1:71:59:3F:7C,netdev=net0
-netdev vmnet-shared,id=net0
-device virtio-gpu-gl-pci
-smp cpus=4,sockets=1,cores=4,threads=1
-machine q35,vmport=off,i8042=off,hpet=off
-accel tcg,thread=multi,tb-size=2048
-global PIIX4_PM.disable_s3=1
-global ICH9-LPC.disable_s3=1
-drive if=pflash,format=raw,unit=0,file=/Applications/UTM.app/Contents/Resources/qemu/edk2-x86_64-code.fd,readonly=on
-drive if=pflash,unit=1,file=/Users/****/Library/Containers/com.utmapp.UTM/Data/Documents/Ubuntu.utm/Data/efi_vars.fd
-m 8192
-usb
-device usb-tablet,bus=usb-bus.0
-device usb-mouse,bus=usb-bus.0
-device usb-kbd,bus=usb-bus.0
-device nec-usb-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 ide-hd,bus=ide.0,drive=driveE1B51273-DCCC-4EE8-B916-2E343D916BEC,bootindex=0
-drive if=none,media=disk,id=driveE1B51273-DCCC-4EE8-B916-2E343D916BEC,file=/Users/****/Library/Containers/com.utmapp.UTM/Data/Documents/Ubuntu.utm/Data/E1B51273-DCCC-4EE8-B916-2E343D916BEC.qcow2,discard=unmap,detect-zeroes=unmap
-device virtio-serial
-device virtserialport,chardev=org.qemu.guest_agent,name=org.qemu.guest_agent.0
-chardev spiceport,id=org.qemu.guest_agent,name=org.qemu.guest_agent.0
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0
-chardev spicevmc,id=vdagent,debug=0,name=vdagent
-name Ubuntu
-uuid 24DF19E9-7CD3-4CE8-AE32-499604C8D73C
-device virtio-rng-pci

Also, the config.plist file doesn't contain the shared directory information. Seems it was changed recently. Can't find where shared folder information is being stored.

lshw output:

fail.txt
success.txt

@osy
Copy link
Contributor

osy commented Sep 27, 2023

I think this was fixed in v4.4 beta, can you try it?

@arif-desu
Copy link
Author

@osy Not sure. I am using the Mac App store version. Possible to install dmg side-by-side and can they share the VM images?

@osy
Copy link
Contributor

osy commented Sep 27, 2023

Yes, just rename it before copying it to /Applications. Alternatively, you can always replace UTM.app, and delete it, and reinstall from the app store without losing any data.

@arif-desu
Copy link
Author

@osy alright copied the renamed app and indeed looks fixed with beta version. I tried the latest 4.4.1. You may close the issue with appropriate comment. Thank you.

@osy
Copy link
Contributor

osy commented Sep 27, 2023

Duplicate of #5617

@osy osy marked this as a duplicate of #5617 Sep 27, 2023
@osy osy closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants