I have a Ubuntu system that runs FreeNAS in a KVM with one SATA controller card as passthrough. Because of that I only have one PCIe slot on my motherboard that fits a graphic card. I would now like to also run a Windows KVM capable of running 3D CAD software that require a GPU.
I have read serveral entries that describe windows running in KVM using passthrough of a second graphic card. However I would like to run a different setup with only one graphic card:
- run main Linux headless without a graphics card (only when installing or maintaining attach to it)
- passthrough the single graphic card to the Windows KVM, also passthrough mouse/keyboard to Windows
- operate linux via ssh of alternatively install a No-Machine server and connect via that from Windows.
Is there some resource that would describe howto implement such a setup?
Has anybody tried it before?
I guess the sequence would be something like:
- Install vnc server in linux, operate though the vnc server interface
- Add a GRUB boot setting that would leave the graphic card handled by vfio
- Reboot into headless and setup an autostarted Windows KVM with graphics card attached
Sounds doable (?) but I guess there are numerouse pitfalls and I dont want to risk my current setup…
Best Answer
Starting with this tutorial I got AMD 5450 passthrough of primary graphics card (host runs headless) working with the below script.
video=efifb:off
to cmdline otherwise efifb would grab the PCI bar before vfio.apt-get install ovmf
)-vga qlx
used and later qlx Monitor is disabled inside Windows (Display Settings)I also tried with a NVidia 710b, however whas permanently stuck with "Code 43". Probably because romfiles are needed there when trying to passthrough the primary card.
Script: