I have an nvidia P4 card i'm passing through to a vm. It works fine after a host reboot, the vm autostarts and the pcie card is fine to use.
If I reboot the VM though, the VM's dmesg is constantly spammed with "the nvidia gpu at (passthrough pcie location) has fallen off the bus" and of course the gpu is unavailable to be used in the VM.
In the proxmox hosts dmesg, the only thing I see related to this is the following message: "vfio-pci 0000:21:00.0: can't change power state from D0 to D3hot (config space inaccessible)". This only appears the first time the VM is restarted, when the problem first occurs. It does not happen on subsequent vm reboots while the problem is active.
I can solve this manually by shutting the vm down, and then running the following commands in the proxmox host shell:
When I start the VM again, it can see the gpu fine until the next reboot, when the same problem happens.
Is there a way I can add the above commands to reset the gpu into the VMs reboot process?
Sorry if this is obvious, I am new to proxmox and cant find a solution for this.
If I reboot the VM though, the VM's dmesg is constantly spammed with "the nvidia gpu at (passthrough pcie location) has fallen off the bus" and of course the gpu is unavailable to be used in the VM.
In the proxmox hosts dmesg, the only thing I see related to this is the following message: "vfio-pci 0000:21:00.0: can't change power state from D0 to D3hot (config space inaccessible)". This only appears the first time the VM is restarted, when the problem first occurs. It does not happen on subsequent vm reboots while the problem is active.
I can solve this manually by shutting the vm down, and then running the following commands in the proxmox host shell:
Code:
echo "1" > /sys/bus/pci/devices/{physical card address}/remove
sleep 1
echo "1" > /sys/bus/pci/rescan
When I start the VM again, it can see the gpu fine until the next reboot, when the same problem happens.
Is there a way I can add the above commands to reset the gpu into the VMs reboot process?
Sorry if this is obvious, I am new to proxmox and cant find a solution for this.