Add qm unlock command to start of backup

jhar

New Member
Oct 18, 2024
4
0
1
Hello Proxmoxers!

I am stuck. I have a production pve running multiple guest windows vms. All is great on most vm guests, however, one guest vm is running windows 10 with a specific server application and every time the scheduled backups attempt to run a snapshot on this guest vm id to my proxmox backup server, that specific guest vm crashes. If I manually start the snapshot backup command and watch for the vm guest to flip from green arrow to file icon and on the command line type qm unlock <id of the vm> the lock icon switches back to green arrow and the snapshot completes just fine.

I cannot do this manually every day / week. I need to pass this argument at the start of the backup scheduling tasks. Any idea how to do this?

Thank you!
 
Instead, you need to find out the real problem. Why does the VM crash? Any hint in the backup log or syslog?
 
Instead, you need to find out the real problem. Why does the VM crash? Any hint in the backup log or syslog?
The software that runs is a medical server application with a very poorly and well documented record for being a PIA. The software wants you to schedule stop and start scripts to stop the service every night for backups as it cannot be copied while running. This start and stop has become increasingly unstable. Most on reddit with same software have moved to VM the instance so they can snapshot without having to stop / start the service. Those that I have spoke to have simply switched to vitalizing the instance and ensuring that a lock does not occur while copying and none have reported any issues. None so far though have used proxmox, I seem to be the only one. I simply need to pass qm unlock when the backup starts so that the vm guest does not go into a lock state during backup.


thank you
 
That sounds super annoying! I had a similar issue with one of my VMs crashing during backups. I ended up using a script to automatically run qm unlock <id> right after the backup starts. It saved me from having to do it manually every time. I’d recommend checking if there’s a way to skip the lock in the backup options too; that might do the trick. Just make sure to test whatever solution you choose to avoid any issues later on!
 
That sounds super annoying! I had a similar issue with one of my VMs crashing during backups. I ended up using a script to automatically run qm unlock <id> right after the backup starts. It saved me from having to do it manually every time. I’d recommend checking if there’s a way to skip the lock in the backup options too; that might do the trick. Just make sure to test whatever solution you choose to avoid any issues later on!
It most definitely is annoying! Would you be able to share your script solution?

I think a tick box addition in proxmox backup next to each vm to add to schedule that pushes a script to keep vm unlocked during backup would be a great code addition!
 
Hello! Would you be willing to share the script you used for the solution to enable qm unlock at the start of a backup?

Thank you!
 

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!