IGD GPU passthough issue

C.Azrael

New Member
Apr 13, 2021
3
0
1
25
Hi, all

I've got a problem that I can't solve. I would like to passthrough the IGD GPU to a LibreELEC VM. But it got a TASK ERROR: start failed: QEMU exited with code 1
kvm: -device vfio-pci,host=00:02.0,addr=0x02,x-igd-gms=1,romfile=vgabios-3867u.bin: PCI: slot 2 function 0 not available for vfio-pci, in use by VGA

I think my settings are correct, because I had success once two years ago, my config file content:
args: -device vfio-pci,host=00:02.0,addr=0x02,x-igd-gms=1,romfile=vgabios-3867u.bin
boot: order=sata0;sata1
cores: 2
cpu: host
hostpci0: 00:1f.3,rombar=0
hostpci1: 00:02.0
memory: 2048
name: LibreELEC
net0: virtio=96:D1:51:94:60:80,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
sata0: local-lvm:vm-500-disk-0,size=10G
sata1: local-lvm:vm-500-disk-1,size=552M
scsihw: virtio-scsi-pci
smbios1: uuid=bf2cffb3-e095-467c-8aed-4cc5e4f955c9
sockets: 1
startup: up=20
usb0: host=6901:1224,usb3=1
vmgenid: 7d2b06e5-67b9-474e-b538-f2ab6f3398a5

When I change machine type from i440fx to Q35, the error changed:
kvm: -device vfio-pci,host=00:02.0,addr=0x02,x-igd-gms=1,romfile=vgabios-3867u.bin: vfio 0000:00:02.0: device is already attached

Is there anything wrong with my configuration? thank you for your help.
 
When I change machine type from i440fx to Q35, the error changed:


Is there anything wrong with my configuration? thank you for your help.
You are passing device 00:02.0 twice and that won't work. Once cia hostpci1: 00:02.0 and also via args: -device vfio-pci,host=00:02.0,addr=0x02,x-igd-gms=1,romfile=vgabios-3867u.bin. I don't have experience with integrated graphics passthrough but that might explain the error message.
 
You are passing device 00:02.0 twice and that won't work. Once cia hostpci1: 00:02.0 and also via args: -device vfio-pci,host=00:02.0,addr=0x02,x-igd-gms=1,romfile=vgabios-3867u.bin. I don't have experience with integrated graphics passthrough but that might explain the error message.
Thank you, this is an important point that I missed
 
I change my conf follow another tutorial, it seems work, I highlight the different point as red
args: -set device.hostpci0.x-igd-gms=1
boot: order=sata0;sata1
cores: 2
cpu: host
hostpci0: 00:1f.3,rombar=0
hostpci1: 00:02.0,legacy-igd=1,romfile=vgabios-3867u.bin
memory: 2048
name: LibreELEC
net0: virtio=96:D1:51:94:60:80,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
sata0: local-lvm:vm-500-disk-0,size=10G
sata1: local-lvm:vm-500-disk-1,size=552M
scsihw: virtio-scsi-pci
smbios1: uuid=bf2cffb3-e095-467c-8aed-4cc5e4f955c9
sockets: 1
startup: up=20
usb0: host=6901:1224,usb3=1
vga: none
vmgenid: 7d2b06e5-67b9-474e-b538-f2ab6f3398a5