March 4, 2019
My current version:
OS: Manjaro 18.0.3 Illyria
Kernel: x86_64 Linux 4.19.24-1-MANJARO
Let's run win10 in a VM. Install these pkgs:
Edit this file, append to end.
/etc/libvirt/qemu.conf
nvram = [
"/usr/share/ovmf/x64/OVMF_CODE.fd:/usr/share/ovmf/x64/OVMF_VARS.fd"
]
Edit this file on line 7:
/etc/mkinitcpio.conf
MODULES=(vfio vfio_iommu_type1 vfio_pci vfio_virqfd)
And modconf should be in HOOKS=()
Edit this file on line 5:
/etc/default/grub and add intel_iommu=on somewhere
You're done!
Start the service. Run Virtual Machine Manager (or in shell virt-manager).
I wasn't happy with using QXL beacuse it limits Virtual Machine Manager to 1920x1080, and it's laggy.
I installed my 2nd GPU (Nvidia 1060).
Follow this guide for a few steps: wiki.archlinux.org
You have to go Settings > Add hardware > PCI Host device
...and add your video card (both the VGA part and the audio part)
Create this file and add a single line:
/etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1c02,10de:10f1
Run a few shell commands to get those id's as seen.
Grab both the ID's from the VGA and audio device on the GPU. Mine was a Nvidia 1060, so it was on this line:
GP106 [GeForce GTX 1060 3GB]
<hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> <vendor_id state='on' value='whatever'/> </hyperv> <kvm> <hidden state='on'/> </kvm>
The above XML tags are located in the file /etc/libvirt/qemu/win10.xml
You may need to copy the above XML data, but before you do don't overwrite it. Edit the file then save as...
another name
(win11.xml).
Then run the cmd:
Ok, what if I dont like GPU passthrough and having to toggle HDMI or input modes on secondary monitor? Leave virtio and return to QXL by following a few steps:
1. Settings > Video > choose QXL
2. Remove hardware PCI devices (GPU)