I have a Debian 10 host server, and an Ubuntu 20.04 guest with KVM. The Ubuntu server is created with virt-install
and works as intended after install. I'm trying to use PCI passthrough to pass a raid controller (Adaptec 81605Z) to the guest. With virsh edit my_vm
I've added
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</source>
</hostdev>
to the configuration. Then I've used virsh nodedev-dettach pci_0000_01_00_0
to detach the raid controller from the host, after which lspci -nnv
shows
01:00.0 RAID bus controller [0104]: Adaptec Series 8 12G SAS/PCIe 3 [9005:028d] (rev 01)
Subsystem: Adaptec Series 8 12G SAS/PCIe 3 [9005:0557]
Flags: fast devsel, IRQ 16
Memory at a2100000 (64-bit, non-prefetchable) [size=1M]
Memory at a2280000 (64-bit, non-prefetchable) [size=1K]
I/O ports at 4000 [size=256]
Expansion ROM at a2200000 [disabled] [size=512K]
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable- Count=1/32 Maskable+ 64bit+
Capabilities: [b0] MSI-X: Enable- Count=64 Masked-
Capabilities: [c0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [300] #19
Kernel driver in use: vfio-pci
Kernel modules: aacraid
However, when I start my vm with virsh start my_vm --console
, the console just gets stuck, nothing is printed, so something seems to be wrong as the vm doesn't boot. After a moment I start getting
kernel:[ 747.764965] watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [qemu-system-x86:1305]
errors and my host machine considerably slows down. I have disabled kvm from the vm as that might cause problems. My vm has 4GB of ram and 4 VCPUs allocated for it.
Is there something wrong with my configuration?