Boot a same drive Windows partition inside a QEMU/libvirt Virtual machine

I have a Surface tablet so “Just add one more drive” is out of the question. I’ve managed to do this inside Hyper-V (using windows as host) but only by adding one extra drive with linux on it. So I think it should be possible too on linux, everybody is saying that linux is more capable than windows so.

My drive’s partition looks something like this:

nvme0n1p1    100MiB    windows boot manager
nvme0n1p2    16MiB     window recovery something
nvme0n1p3    250GiB    windows root partition
nvme0n1p4    200MiB    /boot/efi
nvme0n1p5    500MiB    /boot
nvme0n1p6    280GiB    / (linux root partition)

The windows partitions are currently unmounted.
I’ve added them until I got a working VM in cockpit-machines. I added supergrub2.iso for debugging purposes and chainloading if necessary.

It doesn’t detect windows boot manager.

This is my virsh output.
sudo virsh edit ps_windowstest

It does recognize supergrub2 tho.

Version: cockpit-machines-319-1 cockpit-system-324.1
OS: Fedora Silverblue 40

Help please, I was trying to do this since 2022 and still have no idea what I’m doing wrong.

Removed engineering, problem, workstation-wg

From Project Discussion to Ask Fedora

Added silverblue and removed silverblue-team

Added libvirt, qemukvm, virtualization, windows, windows-guest