PCI passthrouh change virtual machine

MadMonkey

New Member
Jan 20, 2022
22
0
1
37
Hello

i have a pci passthrough in my proxmox and i have two virtual machine with the same GPU configure. When i turn off one and start the other give me an error
Code:
leftover PCI reservation found for 0000:2d:00.0, lets take it...
leftover PCI reservation found for 0000:2d:00.1, lets take it...
kvm: ../hw/pci/pci.c:1487: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
TASK ERROR: start failed: QEMU exited with code 1

And i have to reboot the server to can turn on the second machine, is it possible run one machine after the other one with the same GPU without reboot the server??

Thanks :)
 
is it possible run one machine after the other one with the same GPU without reboot the server??
Usually, yes. I don't know why it does not work for your case. Have you updated your installation to the latest version? Maybe share details about the GPU, motherboard and PVE kernel version?

EDIT: Do you need the audio part of the GPU. Could try passthrough of 2d:00.0 without 2d:00.1 to test if it is contained to the audio function? Or if you did not select All Functions, please try with All Functions (2d:00.0 only, the .1 comes with all functions. Please also share the VM configuration file from /etc/pve/qemu-server/.
 
Last edited:
Usually, yes. I don't know why it does not work for your case. Have you updated your installation to the latest version? Maybe share details about the GPU, motherboard and PVE kernel version?

EDIT: Do you need the audio part of the GPU. Could try passthrough of 2d:00.0 without 2d:00.1 to test if it is contained to the audio function? Or if you did not select All Functions, please try with All Functions (2d:00.0 only, the .1 comes with all functions. Please also share the VM configuration file from /etc/pve/qemu-server/.
Hello Leesteken

No i don't need the adio
 
left content in the last message sorry.

I've been trying and i think that is my debian VM that give a problem, when i start install and firsts do configs works, but when i restart sometimes i can't start more VM without reboot the server. i install in the debian 11 VM firmware-amd-graphic for GPU driver, and seemingly works perfect until can't reboot without restart the server...
Code:
bios: ovmf
boot: order=scsi0;ide2;net0
cores: 2
efidisk0: local-zfs:vm-666-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
hostpci0: 0000:2d:00,pcie=1,x-vga=1
ide2: Discos:iso/debian-11.4.0-amd64-netinst.iso,media=cdrom,size=379M
machine: q35
memory: 17898
meta: creation-qemu=6.2.0,ctime=1658858896
name: debian11
net0: virtio=16:27:21:C8:C3:11,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: Discos:666/vm-666-disk-0.qcow2,size=320G
scsihw: virtio-scsi-pci
smbios1: uuid=9c95bee1-f2fc-4032-81a7-dc5649f31b46
sockets: 4
usb0: host=0bda:8771,usb3=1
usb1: host=1b1c:0a1a,usb3=1
usb2: host=258a:0017,usb3=1
usb3: host=1017:5002,usb3=1
usb4: host=3-3,usb3=1
vmgenid: 1902db22-3922-4af8-b6a5-98a8b88f832a
1658867576378.png
If i reboot the server all works until i use this debian and i try to poweroff or reboot, never works again

Proxmox version
1658868162257.png

I think it's all :)
Thank you
 

Attachments

  • 1658868123559.png
    1658868123559.png
    6.4 KB · Views: 6
left content in the last message sorry.

I've been trying and i think that is my debian VM that give a problem, when i start install and firsts do configs works, but when i restart sometimes i can't start more VM without reboot the server. i install in the debian 11 VM firmware-amd-graphic for GPU driver, and seemingly works perfect until can't reboot without restart the server...
You have not told the make and model of the GPU. All I can gather is AMD. Maybe installing vendor-reset can help you work-around the reset issues of several older models?
Alternatively, you could try disabling All Functions and maybe that will work-around the problem you mentioned in the first post (but reboot the host first).
 
Hello, you are right, the GPU is RX580 i did the vendor-reset, and i've tried with disabling All Functions but the same result. It's the debian machine, because if i start first the Windows one, i can turn off and turn on the other, but with the debian if i turn off never turn on any one with out restart the server, it's so strange, the virtual machine affect to all server...
 
Hello, you are right, the GPU is RX580 i did the vendor-reset, and i've tried with disabling All Functions but the same result. It's the debian machine, because if i start first the Windows one, i can turn off and turn on the other, but with the debian if i turn off never turn on any one with out restart the server, it's so strange, the virtual machine affect to all server...
The VM can interfere with the server because of the passthrough which can "physically" interfere via the PCIe bus. You really need vendor-reset for your GPU to reset properly.
 
Thanks for reply, i have done the vendor reset at the begin, i built other proxmox server with the same graphic and i knew this trip because you told me the last time, but the last time i only used one machine now i use more and i have this problem.

Also the last time when i used the IGD, the proxmox didn't show me the login screen on my screen connected to GPU but now yes.. myabe something wrong

P.S: i've reinstalled the vendor-reset for test is wrong installed, but same result
1658910136519.png
 
Last edited:
Thanks for reply, i have done the vendor reset at the begin, i built other proxmox server with the same graphic and i knew this trip because you told me the last time, but the last time i only used one machine now i use more and i have this problem.

Also the last time when i used the IGD, the proxmox didn't show me the login screen on my screen connected to GPU but now yes.. myabe something wrong

P.S: i've reinstalled the vendor-reset for test is wrong installed, but same result
View attachment 39365
Is it working? Do you see the expected reset message in the system log? Since kernel 5.15, you need to set the reset_method yourself.
 
How can i see that is working? i searched in dmesg but i only find this 1658913712105.png
and i hadn't done the set reset_method, now i do but still not work, i supose that the reset-vendor is not working well..

EDIT: when i see the file reset_method after restart de server appear "bus" instaed of "device_specific" i don't know what i can do

Edit again: i've seen that the problem is that, when i put at the beging device_specific in the reset_method i cant reboot the VM 100 times, but if i reboot the sistem change again for bus
 
Last edited:
Your log shows me that device_specific is not set. Yes, if you do set device_specific as explained it works.
You need to do this every time the Proxmox host boots and before starting the VM for the first time. Here are several ways: crontab, /etc/local.rc, hook script. You can take some inspiration from others here.
 

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!