2

I installed Arch(Antergos) to enable PCI passtrough for KVM Vms, but if I start up the VM it crashed. I followed this tutorial.

My hardware:

  • Motherboard: Asrock H97M Pro4
  • Processor: Intel® Core™ i5-4690 CPU @ 3.50GHz × 4
  • GPU MSI GTX760 Twin Frozr
  • Ram: 16GB
  • OS: Antergos 64Bit

First of all I

  • enabled VT-d in uefi
  • added intel_iommu="on" to GRUB_CMDLINE_LINUX_DEFAULT="" in /etc/default//grub
  • updated grub

My IOMMU Groups:

00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset Family ME Interface #1 [8086:8cba]
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I218-V [8086:15a1]
00:1a.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 [8086:8cad]
00:1b.0 Audio device [0403]: Intel Corporation 9 Series Chipset Family HD Audio Controller [8086:8ca0]
00:1c.0 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 [8086:8c90] (rev d0)
00:1c.3 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev d0)
00:1c.4 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 5 [8086:8c98] (rev d0)
00:1d.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 [8086:8ca6]
00:1f.0 ISA bridge [0601]: Intel Corporation 9 Series Chipset Family H97 Controller [8086:8cc6]
00:1f.2 SATA controller [0106]: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] [8086:8c82]
00:1f.3 SMBus [0c05]: Intel Corporation 9 Series Chipset Family SMBus Controller [8086:8ca2]
02:00.0 PCI bridge [0604]: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge [1b21:1080] (rev 03)
04:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 760] [10de:1187] (rev a1)
04:00.1 Audio device [0403]: NVIDIA Corporation GK104 HDMI Audio Controller [10de:0e0a] (rev a1)

So my GPU consists of:

  • VGA Controller: 04:00.0 (10de:1187)
  • Audio Controller: 04:00.1 (10de:0e0a)

Then I created the file: /etc/modprobe.d/vfio.conf and wrote

options vfio-pci ids=10de:1187,10de:0e0a

Then I created /etc/mkinitcpio.conf and appended to MODULES=""

vfio vfio_iommu_type1 vfio_pci vfio_virqfd

Rebooted my machine and checked if the gpu had the vfio driver

lspci -k

04:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 760] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device 2847
    Kernel driver in use: vfio-pci
    Kernel modules: nouveau
04:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device 2847
    Kernel driver in use: vfio-pci
    Kernel modules: snd_hda_intel

Installed some packages:

pacman -S qemu libvirt virt-manager
yaourt -S ovmf-git

Edited /etc/libvirt/qemu.conf

nvram = [
    "/usr/share/ovmf/x64/ovmf_x64.bin:/usr/share/ovmf/x64/ovmf_vars_x64.bin"
]

started/enabled libvirt

systemctl enable --now libvirtd
systemctl enable virtlogd.socket

Finally I created a VM:

  • Firmware: UEFI
  • CPU: checked "Copy host CPU configuration
  • inserted Windows disk

Now it started in the virtual console and everything was fine! Then I added my GPU(the PCI devices) and started it again. Now it crashed and I don't know why! There are no error messages.

I hope you can help me and thank you for trying

0

You didn't link your XML but I'm going to assume you aren't loading a rom for your video card in (assuming your video card supports UEFI).

  1. verify your video card supports UEFI
  2. Get the video ROM for your card

You can use https://www.techpowerup.com/vgabios/ to do both. If your card isn't listed or the ROM isn't available, you can simply ask on your manufacturer's forum. This is how I got a copy of the ROM for my video card to resolve the same issue you're having.

Once you have the rom file, using virsh edit, try adding the following into your xml config

   <hostdev>
     ...
     <rom file='/etc/fake/boot.bin'/>
     ...
   </hostdev>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.