After a clean Linux installation, I installed the ‘qemu-full’ and ‘edk2-ovmf’ packages, and now I try to install Windows 11 in a VM.
I know, that Windows 11 has a TPM requirement, and if you don’t have it, you get a message that your machine doesn’t meet the minimal system requirements, but I’m not quite there yet.
Using the QEMU command, I can boot a VM, and it briefly displayed “Press any key to boot from the CD-ROM …”, but I do so, I’m just dropped to an UEFI Shell, so there must be something wrong with the UEFI configuration in my machine.
I tried different methods according to Arch’s Wiki:
Copy the file OVMF.4m.fd and use that one.
Copy the file OVMF_VARS.4m.fd and use that one in combination with _CODE file
…
Files were copied from different locations such as /usr/share/edk2, /usr/share/edk2-omf, … but all these solutions just drops me back to the UEFI shell.
You can just use virt-manager to create the vm, just before you click finish select “Customize configuration before install” and the click Finish. There you can change the firmware from “BIOS” to UEFI" or whatever you want from the dropdown list. So no need to manually copy over the file to have uefi boot for a vm.
I want to use the command line, as I’m in a terminal only machine. So, I want to keep my machine clean and lean, so I’m just trying to understand why it’s not working.
I never said that would solve it, I was just pointing out you don’t need to manually copy the OVMF file. Let me just install a Windows 11 vm and see how it compares to what you have.
I tried with Fedora’s OVMF files too to have secure boot enabled, but even then, I can’t get the installer to launch. I believe I’m just missing some arguments on the command line, however, I’m not able to solve it. As soon as I can see the ISO boot, and launch the installer, I’m fine, but I can’t even get to the installer currently.
So something like this I think? -drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \ -drive if=pflash,format=raw,file=*/copy/of/OVMF_VARS.4m.fd*
So, this is basically the same as what you suggest, and the machine boots, I get a message from the CD Rom, so the bootloader is executed, “Press any key to boot from …”, and when I do so, the machine just restarts. When I don’t do anything, it drops to an UEFI shell.
I’m really lost. I need Win11, for work, but Arch doesn’t want me to install it. At least not without virt-manager, but I want to really understand the commands, so I prefer to NOT install virt-manager.
Just haven’t figured out which combination but the first one seems to be correct, not sure about the second one yet, because Windows 11 requires secureboot to be on.
As far as I understand the Wiki, the second one should be a copy of the one found in Fedora so that’s what I’m using. Anyway, I used the file you mentioned too for testing and it remains the same. No installer. And I give everyone write permissions on that file.
I managed to find it. I was using a virtual CPU, and it seems just that it wasn’t beefy enough. If I use kvm and specify ‘host’ as the CPU type, then we’re fine.