gpu passthrough hook scripts run for snapshot backup

Kodey

Member
Oct 26, 2021
107
4
23
Why does the backup need to run the hook scripts that intialise the gpu?
How can claiming the gpu hardware be relevant to creating a backup?
I guess it's complicated as the backup doesn't know about such things, but is there a workaround?
Code:
INFO: creating Proxmox Backup Server archive 'vm/101/2022-09-22T14:00:00Z'
INFO: starting kvm to execute backup task
gpu-hookscript: Resetting GPU for Vitual Machine 101
ERROR: Backup of VM 101 failed - PCI device '0000:0f:00.0' already in use by VMID '112'
INFO: Failed at 2022-09-23 00:00:03
 
The VM has to be started in order to create a backup of the block devices. A VM can only be started when all passthroughed devices are available.
Maybe its resetting the GPU so you won't run into the "GPU reset bug" which would prevent the VM from being started again after the backup fanished?
Backups of VMs won't work when the VMs are sharing a PCI device and any one of these VMs is running.
 
Last edited:
Which block devices need to be backed up?
When a vm is powered off, all the relevant information for restoring it to a previous state are stored on the disks.
firmware and device drivers are initialised at boot and so are any block devices that need to be created, right?
I'm not completely familiar with the backup process, but some devices are powered down and undergo updates on the next boot, so these devices will be altered by the process and the backup won't accurately represent the device at the time the backup was started.
Perhaps I'm missing something, but couldn't a backup be done without powering the device on, say even as an option for some cases?
 
2 reasons why the vm needs to be started up when backing up:

1. we use the qemu internal backup mechanism for that, so we always have to have a qemu process running
2. that way the user is able to start the vm at any arbitrary time when the backup is currently running

if we'd only include the disks, the user would have to wait for the backup to finish or canceld the backup before the vm can be started, which are both not really ideal

if you really want to, you can probably use the vzdump hookscripts to remove the 'hostpci' lines from the config before the vm backup is started (and insert it afterwards), but then it won't be there when the vm is started during backup of course
 

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!