quickemu-project / quickemu

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

bug: VM fail to boot outside of directory #874

Closed Fuckingnameless closed 5 months ago

Fuckingnameless commented 9 months ago

Expected behaviour

i downloaded the win10 distro through quickget, it complained there was no disk and suggested running the machine to create the disk, i ran it "sudo quickemu --vm /root/VMQs/windows-10.conf" but it throws this error:

Actual behaviour

cp: cannot create regular file 'windows-10/OVMF_VARS.fd': No such file or directory

quickgui does not load either just a blank screen

Steps to reproduce the behaviour

sudo quickemu --vm /root/VMQs/windows-10.conf

Quickemu output

cp: cannot create regular file 'windows-10/OVMF_VARS.fd': No such file or directory

Linux Distribution & Kernel

Run the following and paste the output.

lsb_release --all
uname -a

^^ this does nothing default kernel on latest LTS Ubuntu 22.04

lj3954 commented 9 months ago

I can replicate this. Launching a VM from a different directory than the one you're currently in does not work under any circumstances. This is caused by the VMDIR variables (along with several other variables, such as the image files which use the incomplete paths in the config file) disregarding the directory of the config file and instead using your current directory.

Fuckingnameless commented 9 months ago

it won´t run when i launch it from the VM folder either:

qemu-system-x86_64: -drive media=cdrom,index=0,file=windows-10/windows-10.iso: Could not open 'windows-10/windows-10.iso': No such file or directory cat: windows-10/windows-10.pid: No such file or directory

also i don´t get why it is asking to connect to spice instead of just opening a screen like a normal VM program would do

lj3954 commented 9 months ago

It's unable to find your ISO file, meaning you're either in the wrong directory, the ISO doesn't exist or is named incorrectly, or you don't have superuser privileges which are necessary to access the /root directory. Paste the output of ls windows-10 while you're in the directory you created the VM in.

philclifford commented 9 months ago

Don't use sudo. Run quickget, quickemu and quickgui as an unprivileged user. If necessary give that user the minimum privileges needed to run qemu VMs (there may be a group or role for this). The config, directory and any files will be where you are when you run quickget. That is where you should be to run quickemu. quickgui will likewise find and present all the VM configs beneath its current directory, which can be selected on the main view.

Fuckingnameless commented 9 months ago

It's unable to find your ISO file, meaning you're either in the wrong directory, the ISO doesn't exist or is named incorrectly, or you don't have superuser privileges which are necessary to access the /root directory. Paste the output of ls windows-10 while you're in the directory you created the VM in.

none of that was the issue i ended uninstalling this piece of crap, there are articles advertising it comes with windows installation option built in which is not true

lj3954 commented 9 months ago

It definitely does automatically install windows 10 and 11. All you need to do is press "next" on the first installation dialog, and everything else is handled for you by the unattended windows XML. The reason you were having issues is because you somehow broke it by opening a VM from a different directory or by installing it in the /root directory (which you should never use for storing your own files).

flexiondotorg commented 5 months ago

Fixed via https://github.com/quickemu-project/quickemu/pull/1006