On my workstation I have Cachy installed on an NVMe drive as my primary OS, and Windows 11 installed on a second NVMe drive. I would like to be able to run Windows 11 as a VM under cachy so I don’t need to reboot on the occasion I need to run something under Windows. Has anyone been able to get this to work by passing through the entire Windows drive to the VM? UEFI/Tiano appears to get stuck in a reboot loop when I try to configure this in Virtual Machine Manager. Below is the XML from Virtual Machine Manager for the storage device.
<disk type="block" device="disk">
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
<source dev="/dev/disk/by-id/nvme-eui.0025385821416787"/>
<target dev="sda" bus="sata"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
</disk>
whenever I’ve dug into this I’ve always come to the conclusion it was a bad idea and dropped it.
I’ve done this in the past with Windows 10 and 8.1: Windows was installed on a second NVMe drive and was bare-metal bootable. I used virtmanager with PCIe passthrough to pass over the NVMe drive along with a 2.5GbE controller and it Just Worked TM.
I did not use Microsoft’s dumbass secureboot (I have it disabled in the host UEFI firmware and disabled it in the Tiano firmware as well), so you may run into issues if you enable that, as I have not tested if that works.
The thing is, graphics performance is crap in a Windows guest on Linux host with QEMU. VirtualBox and VMWare Workstation both have better Windows guest-side graphics performance. But if you have an iGPU that you can passthrough to the Windows guest and a second monitor, then it will feel like native performance. Looking Glass can be used here as well–prevents the need of a second dedicated monitor by relaying the guest’s display to the host OS’s phyiscal display.
Ideally, SR-IOV will allow you to keep the iGPU/dGPU in the Linux host and use it on the Windows guest with actual native Windows drivers. This would be hypervisor agnostic and would not require any special hypervisor graphics drivers on the guest OS.
BTW, you are doing it wrong: You pass the entire NVMe drive over via PCI passthrough. What you are showing in your config is some emulated SATA shenanigans.
Delete all storage devices from your VM. Then add your NVMe drive as a PCI device.
For an Intel system, this requires some UEFI firmware features to be enabled along with some Kernel boot-time options to be enabled.
Kernel: intel_iommu=on iommu=pt
UEFI Firmware, enable: VT-d and VT-x