Created
June 23, 2019 19:57
-
-
Save cupcakearmy/dfd0fbbefa2f60517d523c48d84fc37d to your computer and use it in GitHub Desktop.
Qemu GPU Guide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Prerequisites | |
# DL | |
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso | |
# Enable IOMMU | |
vim /etc/default/grub | |
intel_iommu=on | |
grub-mkconfig -o /boot/grub/grub.cfg | |
reboot | |
# Check IOMMU | |
dmesg | grep -i -e DMAR -e IOMMU | |
# Check Groups | |
#!/bin/bash | |
shopt -s nullglob | |
for g in /sys/kernel/iommu_groups/*; do | |
echo "IOMMU Group ${g##*/}:" | |
for d in $g/devices/*; do | |
echo -e "\t$(lspci -nns ${d##*/})" | |
done; | |
done; | |
#10de:1b06,10de:10ef | |
# vfio-pci | |
vim /etc/modprobe.d/vfio.conf | |
options vfio-pci ids=10de:1b06,10de:10ef | |
vim /etc/mkinitcpio.conf | |
MODULES=(... vfio_pci vfio vfio_iommu_type1 vfio_virqfd ...) | |
HOOKS=(... modconf ...) | |
mkinitcpio -p linux419 | |
reboot | |
# Check | |
dmesg | grep -i vfio | |
lspci -nnk | |
# Install | |
pacman -Syu qemu libvirt ovmf virt-manager ebtables dnsmasq | |
vim /etc/libvirt/qemu.conf | |
nvram = [ | |
"/usr/share/ovmf/x64/OVMF_CODE.fd:/usr/share/ovmf/x64/OVMF_VARS.fd" | |
] | |
systemctl enable --now libvirtd.service | |
systemctl enable --now virtlogd.socket | |
virshpatcher --error43 --host-passthrough --vendor-id ab1234567890 <vm name> | |
add <ioapic driver='kvm'/> to the <features> node with virsh edit <vm name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment