GPU Passthrough not working

CmasterG

New Member
Aug 27, 2018
19
0
1
36
Hi!

I would like to pass my Nvidia GPU to a KVM. I have a Linux MInt VM with SeaBIOS set up. My config file looks like this:


bootdisk: scsi0
cores: 8
ide2: local:iso/linuxmint-18.3-cinnamon-64bit.iso,media=cdrom
machine: q35
memory: 8192
name: TrainingsVM
net0: virtio=76:13:2D:21:2D:C9,bridge=vmbr1
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-1,cache=writethrough,size=100G
scsihw: virtio-scsi-pci
smbios1: uuid=1105d2f0-54f2-4590-bc02-1fbb5aa426a3
sockets: 1
machine: q35
hostpci0: 03:00,pcie=1,x-vga=on

and my vfio.conf file looks like this:
options vfio-pci ids=10de:1b06,10de:10ef

and the command lspci -n -s 03:00 gives me this output:
03:00.0 0300: 10de:1b06 (rev a1)
03:00.1 0403: 10de:10ef (rev a1)

This is my graphics card:
03:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
03:00.1 Audio device: NVIDIA Corporation Device 10ef (rev a1)

As soon as the line hostpci0: 03:00,pcie=1,x-vga=on is in the config file, my VM cannot start. Can anyone help me?

Thanks a lot.

Cheers
 
Yes. This one:

kvm: -device vfio-pci,host=03:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,x-vga=on,multifunction=on: vfio error: 0000:03:00.0: failed getting region info for VGA region index 8: Invalid argument
device does not support requested feature x-vga
TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -name TrainingsVM -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -pidfile /var/run/qemu-server/100.pid -daemonize -smbios 'type=1,uuid=1105d2f0-54f2-4590-bc02-1fbb5aa426a3' -smp '8,sockets=1,cores=8,maxcpus=8' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vga none -nographic -cpu 'kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce,kvm=off' -m 8192 -readconfig /usr/share/qemu-server/pve-q35.cfg -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' -device 'vfio-pci,host=03:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,x-vga=on,multifunction=on' -device 'vfio-pci,host=03:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:85a53a8de80' -drive 'file=/var/lib/vz/template/iso/linuxmint-18.3-cinnamon-64bit.iso,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' -drive 'file=/dev/pve/vm-100-disk-1,if=none,id=drive-scsi0,cache=writethrough,format=raw,aio=threads,detect-zeroes=on' -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=76:13:2D:21:2D:C9,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -machine 'type=q35'' failed: exit code 1
 
I tried it again after rebooting proxmox. Now it writes OK but I cannot connect with vnc. There is the error:

VM 100 qmp command 'change' failed - VNC display not active
TASK ERROR: Failed to run vncproxy.

and the host is also unreachable. I cannot ping the VM


If I start it without x_vga= on in the settings it starts but I only see a screen with the error:
nouveau 0000:01:00.0: fifo: SCHED_ERROR 08 []
 
Last edited:
VM 100 qmp command 'change' failed - VNC display not active
TASK ERROR: Failed to run vncproxy.
with x-vga=on the only display is through the passed through gpu (so you have to connect a monitor there)

If I start it without x_vga= on in the settings it starts but I only see a screen with the error:
nouveau 0000:01:00.0: fifo: SCHED_ERROR 08 []
this seems like a guest driver problem
 
Hi,
noveau error sounds like it still loads the noveau driver in proxmox os, thus kvm never gets to the hw.

Also, I would try to dump the ROM from the GTX by inserting and selecting the new gfx as primary vga device..

PS. I only got my GTX 750ti working on SeaBIOS, UEFI just wouldnt work... but I've seen forum posts mentioning their new HW only supporting UEFI. DS.
 
Hi!
Thank you for your help. I now deactivated the nouveau drivers in the VM and it starts now. I also installed the nvidia drivers successfully, but now when I type in nvidia-smi it gives me the following output:
Unable to determine the device handle for GPU 0000:01:00.0: Unknown Error

This address is from my NVIDIA GPU that I passed through.

I am using the SeaBIOS with GTX 1080TI
Do you know how I can fix that error?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!