GPU Passthrough guest OS install

I’m slightly confused about the guest OS install. I remember Wendell mentioning you can do a standard install of windows 10 and pass it through to virtual machine. But I’m confused what I will have to do when configuring the virtual machine step. It feels like I will have to install a windows virtual machine on top of a bare metal one but I’m assuming you can avoid this and passthrough the already pre-installed windows. I’ll look into the SATA passthrough in my own time, it was just this particular step confused me.

So I’m guessing some ELI5 steps from someone would be nice. Do I do a fresh install of windows and then configure VM (what configuring do I have to do if I already have windows installed? Just edit XML?) or do I do it the other way and install windows when I am configuring the VM?

The standard windows install is installing windows 10 into a QEMU-KVM VM, probably using Libvirt and Virt-manager. Set up your VM with your desired network, storage, CPU and ram config. Use the default graphics it sets, then boot the VM and install windows. Then you can shutdown the guest and add your passthrough device(s) to the VM config, remove the default graphics and edit your XML(if using Nvidia GPU for passthrough). This assumes that you have successfully enabled IOMMU and your GPU is in it’s own IOMMU group.

Is probably possible to install windows to a drive on bare metal then passthrough the entire drive to a VM. However, a bunch of drivers will have to be changed, so it might not boot, depending on what your hardware setup is.(both virtual and host hardware) OOBE right before you change from bare metal to VM on the install should have the best chance of success.

WIth plain QEMU-KVM, you have to make custom script(s) to boot your VM and manage it. WIth Libvirt, you get the virsh commands and an XML config file. Virt-manager is a GUI for Libvirt with some extra features.

Thanks for this. So am I right in saying that when I go through virt-manager I’ll really only have to configure hardware and passthrough devices I need and skip installation of OS? Also when I go to do the whole passthrough process from the start, can I use Synergy or do I need an extra physical mouse and keyboard for initial setup?

Edit: Assuming I install a bare metal windows installation on ssd.

Yes, that is what I am saying. You will specify say /dev/sdX(the ssd with windows) in the storage menu.

I have not used Synergy so you would have to ask someone else but I think a physical mouse and keyboard is more reliable(say if windows needs network drivers in the VM…).

Thank you this has cleared things up. I’m sure I’ll find a spare keyboard and mouse somewhere :slight_smile: