[SOLVED] Ubuntu VM Crashing when adding GPU Passthrough

du0

New Member
Dec 23, 2022
2
0
1
Hi team, am new to proxmox (think maybe 7months in?) and having a weird issue. As the title says, VM is crashing when I attempt to add a GPU to this VM. but only this VM.
I have been running this "server" for a few months now which runs a media server and woudl like to add hardware transcoding to it, so thought it was finally time to give it ago.
Have been attemting to get this working for a few days now off and on. Followed guids on Reddit, youtube and proxmox.

when i start the VM it spits out VM 121 qmp command failed - VM 121 qmp command 'query-proxmox-support' failed - unable to connect to VM 121 qmp socket - timeout after 51 retries

it then does that for a little bit then spits out
<root@pam> end task UPID:atlas:0006E22F:00F25D57:63A58C1C:qmstart:121:root@pam: start failed: command '/usr/bin/kvm -id 121 -name 'carbon,debug-threads=on' -no-shutdown -chardev 'socket,id=qmp,path=/var/run/qemu-server/121.qmp,server=on,wait=off' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/121.pid -daemonize -smbios 'type=1,uuid=ea338844-1322-41f2-a6ad-0ded7a56e29e' -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE_4M.secboot.fd' -drive 'if=pflash,unit=1,format=raw,id=drive-efidisk0,size=540672,file=/dev/pve/vm-121-disk-0' -smp '6,sockets=1,cores=6,maxcpus=6' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vga none -nographic -cpu 'kvm64,enforce,kvm=off,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep' -m 32768 -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg -device 'vmgenid,guid=c8bda40e-1c67-4282-abc4-ef8bc924ff1e' -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' -device 'vfio-pci,host=0000:01:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on' -device 'vfio-pci,host=0000:01:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1' -chardev 'socket,path=/var/run/qemu-server/121.qga,server=on,wait=off,id=qga0' -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:c99e4b73798a' -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2' -device 'virtio-scsi-pci,id=virtioscsi1,bus=pci.3,addr=0x2' -drive 'file=/dev/pve/vm-121-disk-2,if=none,id=drive-scsi1,format=raw,cache=none,aio=io_uring,detect-zeroes=on' -device 'scsi-hd,bus=virtioscsi1.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,rotation_rate=1,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap121i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=72:DA:BF:F6:CE:42,netdev=net0,bus=pci.0,addr=0x12,id=net0' -machine 'type=q35+pve0'' failed: got timeout

I decided to see if this same error happend on a clean install. it doesnt and the GPU loads fine.

Have spent a bit of time searching for the forums and have been unable to find anything. Thought its time to post (I try my best not to ask for help! but, alas, it has finally come down to asking haha)

VM is Ubuntu 22.04 server
CPU: i7-9700KF
Motherboard: Asus PRIME Z390-P
RAM: 64GB DDR4 (mix and match...)
GPU: GeForce GTX 1080 G1 Gaming 8G
proxmox-ve: 7.3-1 (running kernel: 5.15.74-1-pve)
pve-manager: 7.3-3 (running version: 7.3-3/c3928077)
pve-kernel-5.15: 7.2-14
pve-kernel-helper: 7.2-14
pve-kernel-5.15.74-1-pve: 5.15.74-1
pve-kernel-5.15.35-1-pve: 5.15.35-3
pve-kernel-5.15.30-2-pve: 5.15.30-3
ceph-fuse: 15.2.16-pve1
corosync: 3.1.7-pve1
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve2
libproxmox-acme-perl: 1.4.2
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.2-5
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.3-1
libpve-guest-common-perl: 4.2-3
libpve-http-server-perl: 4.1-5
libpve-storage-perl: 7.3-1
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.0-3
lxcfs: 4.0.12-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.3.1-1
proxmox-backup-file-restore: 2.3.1-1
proxmox-mini-journalreader: 1.3-1
proxmox-offline-mirror-helper: 0.5.0-1
proxmox-widget-toolkit: 3.5.3
pve-cluster: 7.3-1
pve-container: 4.4-2
pve-docs: 7.3-1
pve-edk2-firmware: 3.20220526-1
pve-firewall: 4.2-7
pve-firmware: 3.5-6
pve-ha-manager: 3.5.1
pve-i18n: 2.8-1
pve-qemu-kvm: 7.1.0-4
pve-xtermjs: 4.16.0-1
qemu-server: 7.3-1
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.8.0~bpo11+2
vncterm: 1.7-1
zfsutils-linux: 2.1.6-pve1
agent: 1
bios: ovmf
boot: order=scsi1
cores: 6
efidisk0: local-lvm:vm-121-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:01:00,pcie=1,x-vga=1
ide2: none,media=cdrom
machine: q35
memory: 32768
meta: creation-qemu=6.2.0,ctime=1652622913
name: carbon
net0: e1000=72:DA:BF:F6:CE:42,bridge=vmbr0,firewall=1
numa: 0
onboot: 0
ostype: l26
scsi1: local-lvm:vm-121-disk-2,size=256G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=ea338844-1322-41f2-a6ad-0ded7a56e29e
sockets: 1
startup: order=2,up=120
vmgenid: c8bda40e-1c67-4282-abc4-ef8bc924ff1e

Hope this is enough information. My appologies if ive missed something.

Thanks for any and all help

Regards
du0
 
Last edited:
If you get a time-out without any errors in the Proxmox Syslog (in the GUI or journalctl if you use the command line), then it's usually memory related. With PCI(e) passthrough all memory must be pinned into actual host memory because of DMA. See if starting the VM with 8GB works or if you see any error in the system logs.
 
Last edited:
If you get a time-out without any errors in the Proxmox Syslog (in the GUI or journalctl if you use the command line), then it's usually memory related. With PCI(e) passthrough all memory must be pinned into actual host memory because of DMA. See if starting the VM with 8GB works or if you see any error in the system logs.
Thanks for the reply leesteken, that worked.... its super fantastic! have my GPU passed through and functioning corretly now. thank you very much for your help with this. cant believe it was such an easy fix. im still not exactly sure how this works but ill be doing some research so I better understand.

Thanks again =D
 

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!