I have 2 Nvidia 3080s, on PCI 0000:01:00.0 and 0000:02:00.0, if I put them both on a VM, with x-vga=on and multifunction=on, it works, I nvidia-smi shows two GPUs. However, if I start vm1 with one of the GPUs say 0000:01:00.0, it will start fine, if I then try to start vm2 with GPU 0000:02:00.0 I get an error:
If I stop vm1 and start vm2 with GPU 0000:02:00.0 it starts fine, but then when I try to start vm1 again I get:
Does anyone know why I can start a vm with 2 GPUs, but can't start 2 separate VMs with the two separate GPUs? This is getting very frustrating. The only thing I can remotely think is the issue is that my GPUs are on x8 PCI 4 bus vs x16 bus. Would that for some reason let me start two on one GPU, but not split them?
Code:
/dev/rbd4
kvm: -device vfio-pci,host=0000:02:00.0,id=hostpci0.0,bus=pci.0,addr=0x10.0,x-vga=on,multifunction=on: vfio 0000:02:00.0: failed to open /dev/vfio/49: Device or resource busy
TASK ERROR: start failed: QEMU exited with code 1
If I stop vm1 and start vm2 with GPU 0000:02:00.0 it starts fine, but then when I try to start vm1 again I get:
Code:
/dev/rbd4
kvm: -device vfio-pci,host=0000:01:00.0,id=hostpci0.0,bus=pci.0,addr=0x10.0,x-vga=on,multifunction=on: vfio 0000:01:00.0: failed to open /dev/vfio/49: Device or resource busy
TASK ERROR: start failed: QEMU exited with code 1
Does anyone know why I can start a vm with 2 GPUs, but can't start 2 separate VMs with the two separate GPUs? This is getting very frustrating. The only thing I can remotely think is the issue is that my GPUs are on x8 PCI 4 bus vs x16 bus. Would that for some reason let me start two on one GPU, but not split them?