quickemu-project / quickemu

Quickly create and run optimised Windows, macOS and Linux virtual machines
MIT License
10.97k stars 480 forks source link

quickemu fails to start any vm, (macOS Sonoma host) #915

Closed Colin1374 closed 7 months ago

Colin1374 commented 10 months ago

Expected behaviour

I know macOS is a WIP, just making sure this is expected actually or if I need to do some kind of work around. Version and hardware at the bottom of this post.

quickemu --vm ubuntu-22.04.conf to start the VM

Actual behaviour

Fails to start, doesn't know where the directory is

Steps to reproduce the behaviour

➜  quickemu-4.9.2 quickget ubuntu 22.04
quickemu --vm ubuntu-22.04.conf
ubuntu-22.04/ubuntu-22.04.3-desk 100%[+++++++==================================================>]   4.69G  21.9MB/s    in 2m 55s  
Checking ubuntu-22.04/ubuntu-22.04.3-desktop-amd64.iso with sha256sum... Good!
Making ubuntu-22.04.conf
Giving user execute permissions on ubuntu-22.04.conf,

To start your Ubuntu virtual machine run:
    quickemu --vm ubuntu-22.04.conf

ERROR! Public directory: '' doesn't exist!
➜  quickemu-4.9.2 ls
LICENSE               archlinux-latest.conf docs                  quickget              windowskey
README.md             build-docs            macrecovery           ubuntu-22.04
archlinux-latest      debian                quickemu              ubuntu-22.04.conf
➜  quickemu-4.9.2 cat ubuntu-22.04.conf
#!/Users/colin.hughes/quickemu-4.9.2/quickemu --vm
guest_os="linux"
disk_img="ubuntu-22.04/disk.qcow2"
iso="ubuntu-22.04/ubuntu-22.04.3-desktop-amd64.iso"

(more output)

`➜ quickemu-4.9.2 ls ubuntu-22.04 ubuntu-22.04.3-desktop-amd64.iso

➜ quickemu-4.9.2 cat ubuntu-22.04.conf

!/Users/colin.hughes/quickemu-4.9.2/quickemu --vm

guest_os="linux" disk_img="ubuntu-22.04/disk.qcow2" iso="ubuntu-22.04/ubuntu-22.04.3-desktop-amd64.iso" ➜ quickemu-4.9.2 `

Quickemu output

`➜ quickemu-4.9.2 quickemu

Usage quickemu --vm ubuntu.conf

You can also pass optional parameters --access : Enable remote spice access support. 'local' (default), 'remote', 'clientipaddress' --braille : Enable braille support. Requires SDL. --delete-disk : Delete the disk image and EFI variables --delete-vm : Delete the entire VM and it's configuration --display : Select display backend. 'sdl' (default), 'gtk', 'none', 'spice' or 'spice-app' --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit) --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers --screen : Use specified screen to determine the window size. --screenpct : Percent of fullscreen for VM if --fullscreen is not specified. --shortcut : Create a desktop shortcut --snapshot apply : Apply/restore a snapshot. --snapshot create : Create a snapshot. --snapshot delete : Delete a snapshot. --snapshot info : Show disk/snapshot info. --status-quo : Do not commit any changes to disk/snapshot. --viewer : Choose an alternative viewer. @Options: 'spicy' (default), 'remote-viewer', 'none' --ssh-port : Set ssh-port manually --spice-port : Set spice-port manually --public-dir : Expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none' --monitor : Set monitor connection type. @Options: 'socket' (default), 'telnet', 'none' --monitor-telnet-host <ip/host> : Set telnet host for monitor. (default: 'localhost') --monitor-telnet-port : Set telnet port for monitor. (default: '4440') --monitor-cmd : Send command to monitor if available. (Example: system_powerdown) --serial : Set serial connection type. @Options: 'socket' (default), 'telnet', 'none' --serial-telnet-host <ip/host> : Set telnet host for serial. (default: 'localhost') --serial-telnet-port : Set telnet port for serial. (default: '6660') --keyboard : Set keyboard. @Options: 'usb' (default), 'ps2', 'virtio' --keyboard_layout : Set keyboard layout. --mouse : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio' --usb-controller : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none' --sound-card : Set sound card. @Options: 'intel-hda' (default), 'ac97', 'es1370', 'sb16', 'none' --extra_args : Pass additional arguments to qemu --version : Print version`

`➜ quickemu-4.9.2 quickget ERROR! You must specify an operating system.

macOS Sonoma 14.3,

➜ quickemu-4.9.2 uname -a Darwin Colins-MacBook-Pro-2.local 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020 arm64

Hardware = 16-inch MBP running M2 Max with 32 GB of RAM

lj3954 commented 10 months ago

macOS doesn't appear to ship with xdg-user-dir, which is used by quickemu to find the public directory (usually ~/Public). Following this, it checks whether the directory exists, ignoring whether or not the variable is set. Specifically, line 1790 could be changed to if [ ! -d "${PUBLIC}" ] && [ -n "${PUBLIC}" ]; then. See if this change resolves the issue.

Alternatively, you could compile and manually install xdg-user-dir.

flexiondotorg commented 7 months ago

macOS host support is desirable but not implemented. Help is appreciated: #447