Hi guys,
I followed a while back the Arch Wiki guide for PCI-E passthrough, alongside a video of someone following the wiki (tutorialception?) and Wendell’s guide. I started with an already existent Windows installation on a Sata SSD (which I can also dual boot), but I didn’t manage to finish my KVM setup, since I’ve been lazy and just booted into Windows.
I am using Manjaro (had trouble with Arch detecting my IOMMU groups and strangely enough, not with Manjaro or Void) on a NVME SSD (glorious Adata SX8200 Pro that Wendell helped me decide to buy). I passed through my GT1030, my Sata controller and a PCI-E USB expansion card. But I’m getting stuck when starting the VM. Here’s a screenshot of the error:
Indeed, when I “fdisk -l”, I only get my NVME drive shown, the Sata SSD doesn’t get shown at all. None of the guides except Wendell’s had shown how to passthrough a Sata SSD, so I just followed that. The sata controller gets shown when running lspci or the Arch wiki script for IOMMU groups, but as mentioned, my sata drive doesn’t get shown when running fdisk -l or lsblk.
Here's my vm xml config of /etc/libvirt/qemu/win10.xml :
< domain type=‘kvm’>
< name>win10< /name>
< uuid>1362b5eb-efc0-4e53-8831-49c30f07e3f3< /uuid>
< title>Win10< /title>
< description>Win10< /description>
< metadata>
< libosinfo:libosinfo xmlns:libosinfo=“http://libosinfo.org/xmlns/libvirt/domain/1.0”>
< libosinfo:os id=“http://microsoft.com/win/10”/>
< /libosinfo:libosinfo>
< /metadata>
< memory unit=‘KiB’>4194304< /memory>
< currentMemory unit=‘KiB’>4194304< /currentMemory>
< vcpu placement=‘static’>3< /vcpu>
< os>
< type arch=‘x86_64’ machine=‘pc-q35-4.0’>hvm< /type>
< loader readonly=‘yes’ type=‘pflash’>/usr/share/ovmf/x64/OVMF_CODE.fd< /loader>
< nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd< /nvram>
< boot dev=‘hd’/>
< /os>
< features>
< acpi/>
< apic/>
< hyperv>
< relaxed state=‘on’/>
< vapic state=‘on’/>
< spinlocks state=‘on’ retries=‘8191’/>
< vendor_id state=‘on’ value=‘123456789ab’/>
< /hyperv>
< kvm>
< hidden state=‘on’/>
< /kvm>
< vmport state=‘off’/>
< /features>
< cpu mode=‘host-model’ check=‘partial’>
< model fallback=‘allow’/>
< /cpu>
< clock offset=‘localtime’>
< timer name=‘rtc’ tickpolicy=‘catchup’/>
< timer name=‘pit’ tickpolicy=‘delay’/>
< timer name=‘hpet’ present=‘no’/>
< timer name=‘hypervclock’ present=‘yes’/>
< /clock>
< on_poweroff>destroy< /on_poweroff>
< on_reboot>restart< /on_reboot>
< on_crash>destroy< /on_crash>
< pm>
< suspend-to-mem enabled=‘no’/>
< suspend-to-disk enabled=‘no’/>
< /pm>
< devices>
< emulator>/usr/bin/qemu-system-x86_64< /emulator>
< disk type=‘file’ device=‘cdrom’>
< driver name=‘qemu’ type=‘raw’/>
< target dev=‘sdb’ bus=‘sata’/>
< readonly/>
< address type=‘drive’ controller=‘0’ bus=‘0’ target=‘0’ unit=‘1’/>
< /disk>
< disk type=‘block’ device=‘disk’>
< driver name=‘qemu’ type=‘raw’/>
< source dev=’/dev/sda’/>
< target dev=‘vdb’ bus=‘sata’/>
< address type=‘drive’ controller=‘0’ bus=‘0’ target=‘0’ unit=‘0’/>
< /disk>
< controller type=‘usb’ index=‘0’ model=‘qemu-xhci’ ports=‘15’>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x02’ slot=‘0x00’ function=‘0x0’/>
< /controller>
< controller type=‘sata’ index=‘0’>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x00’ slot=‘0x1f’ function=‘0x2’/>
< /controller>
< controller type=‘pci’ index=‘0’ model=‘pcie-root’/>
< controller type=‘pci’ index=‘1’ model=‘pcie-root-port’>
< model name=‘pcie-root-port’/>
< target chassis=‘1’ port=‘0x10’/>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x00’ slot=‘0x02’ function=‘0x0’ multifunction=‘on’/>
< /controller>
< controller type=‘pci’ index=‘2’ model=‘pcie-root-port’>
< model name=‘pcie-root-port’/>
< target chassis=‘2’ port=‘0x11’/>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x00’ slot=‘0x02’ function=‘0x1’/>
< /controller>
< controller type=‘pci’ index=‘3’ model=‘pcie-root-port’>
< model name=‘pcie-root-port’/>
< target chassis=‘3’ port=‘0x12’/>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x00’ slot=‘0x02’ function=‘0x2’/>
< /controller>
< controller type=‘pci’ index=‘4’ model=‘pcie-root-port’>
< model name=‘pcie-root-port’/>
< target chassis=‘4’ port=‘0x13’/>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x00’ slot=‘0x02’ function=‘0x3’/>
< /controller>
< controller type=‘pci’ index=‘5’ model=‘pcie-root-port’>
< model name=‘pcie-root-port’/>
< target chassis=‘5’ port=‘0x8’/>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x00’ slot=‘0x01’ function=‘0x0’ multifunction=‘on’/>
< /controller>
< controller type=‘pci’ index=‘6’ model=‘pcie-root-port’>
< model name=‘pcie-root-port’/>
< target chassis=‘6’ port=‘0x9’/>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x00’ slot=‘0x01’ function=‘0x1’/>
< /controller>
< interface type=‘network’>
< mac address=‘52:54:00:11:6a:19’/>
< source network=‘default’/>
< model type=‘e1000e’/>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x01’ slot=‘0x00’ function=‘0x0’/>
< /interface>
< serial type=‘pty’>
< target type=‘isa-serial’ port=‘0’>
< model name=‘isa-serial’/>
< /target>
< /serial>
< console type=‘pty’>
< target type=‘serial’ port=‘0’/>
< /console>
< input type=‘tablet’ bus=‘usb’>
< address type=‘usb’ bus=‘0’ port=‘1’/>
< /input>
< input type=‘mouse’ bus=‘ps2’/>
< input type=‘keyboard’ bus=‘ps2’/>
< hostdev mode=‘subsystem’ type=‘pci’ managed=‘yes’>
< source>
< address domain=‘0x0000’ bus=‘0x01’ slot=‘0x00’ function=‘0x0’/>
< /source>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x04’ slot=‘0x00’ function=‘0x0’/>
< /hostdev>
< hostdev mode=‘subsystem’ type=‘pci’ managed=‘yes’>
< source>
< address domain=‘0x0000’ bus=‘0x01’ slot=‘0x00’ function=‘0x1’/>
< /source>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x05’ slot=‘0x00’ function=‘0x0’/>
< /hostdev>
< hostdev mode=‘subsystem’ type=‘pci’ managed=‘yes’>
< source>
< address domain=‘0x0000’ bus=‘0x03’ slot=‘0x00’ function=‘0x0’/>
< /source>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x06’ slot=‘0x00’ function=‘0x0’/>
< /hostdev>
< memballoon model=‘virtio’>
< address type=‘pci’ domain=‘0x0000’ bus=‘0x03’ slot=‘0x00’ function=‘0x0’/>
< /memballoon>
< /devices>
< /domain>
Here are my IOMMU groups (on a MSI B250 Pro VH:
IOMMU Group 0:
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:590f] (rev 05)
IOMMU Group 1:
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 05)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP108 [GeForce GT 1030] [10de:1d01] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GP108 High Definition Audio Controller [10de:0fb8] (rev a1)
IOMMU Group 10:
00:1f.0 ISA bridge [0601]: Intel Corporation 200 Series PCH LPC Controller (B250) [8086:a2c8]
00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
IOMMU Group 11:
02:00.0 Non-Volatile memory controller [0108]: Device [1cc1:8201] (rev 03)
IOMMU Group 12:
03:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02)
IOMMU Group 13:
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
IOMMU Group 2:
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 610 [8086:5902] (rev 04)
IOMMU Group 3:
00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model [8086:1911]
IOMMU Group 4:
00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
00:14.2 Signal processing controller [1180]: Intel Corporation 200 Series PCH Thermal Subsystem [8086:a2b1]
IOMMU Group 5:
00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
IOMMU Group 6:
00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
IOMMU Group 7:
00:1b.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #21 [8086:a2eb] (rev f0)
IOMMU Group 8:
00:1c.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #6 [8086:a295] (rev f0)
IOMMU Group 9:
00:1c.6 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #7 [8086:a296] (rev f0)
Here's my OVMF config under /etc/modprobe.d/vfio.conf :
options vfio-pci ids=8086:1901,10de:1d01,10de:0fb8,1912:0015,8086:a282
If I need to provide more info, please tell me (like, idk, screenshots of my VIrt-Manager conf?).
Thank you for your time. I hope I can get to run Windows in a VM ASAP.