Linux How to run Win11 on KVM/QEMU?

vishalrao

Global Moral Police
Level J
I was trying to get Win11 (both latest stable and insider Pro edition) to run with KVM/QEMU (on openSUSE Tumbleweed with kernel 6.3) using virt-manager and gnome boxes with no luck - the ISO would not boot up correctly.

Tried on my Ryzen 6800U laptop and then again also on my 11th gen i5 laptop just in case kernel KVM/QEMU support was better on Intel vs AMD but same issues - will leave aside the exact error messages for now.

Anyone else here successfully able to run Win11 on KVM? I believe KVM is much faster than running VirtualBox which works for me - will be the last resort though.

Any advice or pointers? I have the aforementioned laptops and also a Zen2 desktop and Intel 8th gen i5 AIO PC (which I can try) if it makes any difference that any of those would work better than the others...

I can also install other distros/versions if they make any difference - I currently have openSUSE Tumbleweed on the laptops and Ubuntu Jammy 22.04 LTS based distros on my other PCs.

Thanks!

PS: I want to move to linux as daily driver and run Win11 VM only for situations where it's some required software or something.
 
I had tried using Qemu to set up a VM for gaming (following advice from Papa Muta).

I did manage to get it working quite well, but I was not able to play any games (crash within seconds) weirdly it worked well as normal system.
 
I run a Windows 10 VM for gaming (Manjaro as host system) , do you mind sending the XML for your VM or maybe post it on Pastebin and send a link here if it's not possible to send the file
 
I believe I tried with both secure boot enabled and disabled with no luck. Tpm was always enabled and the right version and setting IIRC.

Let me try again some time today and post the XML... Hang on!
 
btw, I just now tried these tools called quickgui and quickemu after finding out in YT video by "nova spirit tech" guy called "5 things to do after Kubuntu install" or something like that :-)

seems promising.
.

With quickemu I was indeed quickly able to get win11 22h2 and canary ISOs to boot, install and configure with minimal effort. quickgui isn't ready for windows except to launch existing VMs.

Haven't yet tried further usage like installing apps or trying media playback. I don't do gaming so mostly won't even try. Maybe during the weekend.

Although, I don't really feel comfortable running this way and might just go with virtualbox anyway to daily drive win11 on linux.
 
Last edited:
Please don't use virutalbox (anything from Oracle). It's quite easy to setup Win10/11 with QEMU/KVM.

I had a Proxmox setup with GPU passthrough for a windows 11 VM for a while. Can you please post the exact errors you are facing while booting a win11 image?
 
Started fiddling with it a little, basically the conclusion is that the UEFI is simply crashing while boot. but here are the things I selected.
1. while creating the vm, select "Configure settings before installation" and select chipset as Q35 and firmware as OVMF_CODE_4M.ms.fd
if you get a screen saying that it cant find startup.nsh, just type "exit" and it will take you to bios screen and then you can choose boot order as DVD and boot.
1690486975363.png


The virt-manager gui is and has been buggy always so you cant change the firmware after you create the VM unless you edit the xml directly. I managed install win11 once by fluke but I dont know what i did to get there.
 
Please don't use virutalbox (anything from Oracle). It's quite easy to setup Win10/11 with QEMU/KVM.

I had a Proxmox setup with GPU passthrough for a windows 11 VM for a while. Can you please post the exact errors you are facing while booting a win11 image?
same here.
Both win10/11 were pretty straighforward on promox and should work similarly on kvm/qemu as proxmox is just a wrapper on top of that
 
KVM is type 1 hypervisor - one less layer of abstraction for the VMs that are running on your system..
Type2 should be used only during experimentation for ease of installation and management.. but for almost every other scenario, use type 1
I am aware of that. I was asking the OP since he referred it as "anything from Oracle".
 
I am aware of that. I was asking the OP since he referred it as "anything from Oracle".
Comment from HackerNews explains it pretty well: 4 days ago
Started fiddling with it a little, basically the conclusion is that the UEFI is simply crashing while boot. but here are the things I selected.
1. while creating the vm, select "Configure settings before installation" and select chipset as Q35 and firmware as OVMF_CODE_4M.ms.fd
if you get a screen saying that it cant find startup.nsh, just type "exit" and it will take you to bios screen and then you can choose boot order as DVD and boot.
View attachment 173750

The virt-manager gui is and has been buggy always so you cant change the firmware after you create the VM unless you edit the xml directly. I managed install win11 once by fluke but I dont know what i did to get there.
If UEFI is crashing then your problem isn't windows, it's UEFI.


Please check out Arch Linux wiki. They have great instructions and manuals for setting these things up. I haven't used Linux on the desktop in a long time (last i used was in nov 2020) so i am not really up to date on what settings have changed.
 
Hmm..but I still don't see what is the issue with personal home usage.
It is the same kind of tribalism when you start windows vs linux or apple vs android.

But anyhow, if I remember correctly virtual box uses para virtualization as opposed to kvm and hence kvm has better vt-d support. And also some 2% or more performance advantage. But more importantly vt-d support which helps in sriov/npiv or in desktop environment the ability to have a gpu. Basically things that sit on pci bus. I could be wrong but that is what I remember.
If UEFI is crashing then your problem isn't windows, it's UEFI.
There is a possibility that uefi is crashing because it doesn’t find proper private keys in the bios flash (OVMF_CODE_4M.ms.fd) and I didn’t wanna go into that rabbit hole. Basically the boot loader gets encrypted with certain keys and the bios supposed to have those keys in the firmware’s flash.
 
Back
Top