[SOLVED] A problem witn VM's backup

Nychary

Member
Oct 25, 2021
13
0
6
39
Hello, I need some help. I can't solve the bug with Windows virtual machine backup: command 'qm shutdown 100 --skiplock --keepActive --timeout 600' failed: exit code 255

In other words, Proxmox can't automatically shut down the virtual machine. If the virtual machine is shut down, a backup goes through without errors. There is no problem with Unix systems.

It is quite possible that the reason is Windows. We have tried changing group policies: "Shutdown Event Tracker" and "Shutdown: Allow system to be shut down without having to log on". This had no result.

Maybe someone knows how to solve this problem? Proxmox version 7.0-11.
 
Hey,

does it fail immediately or after the timeout?
 
You can try --forceStop, since it works with other VMs it has very likely to do something with windows.
 
You must install QEMU guest agent in the VM and configure the VM to use the agent:

https://pve.proxmox.com/wiki/Qemu-guest-agent#Windows

When starting a backup (or even issuing a "shutdown" from Proxmox webUI), Proxmox sends an ACPI signal to the OS, which Windows will ignore by default under most circunstances and wont close the OS.

Also, the agent will issue a Windows VSS snapshot within the OS, so you can use "snapshot" mode for your backups being sure that the backup will be consistent. On Linux, the agent does issue a disk flush and quiesce the disks before the backup.
 
You must install QEMU guest agent in the VM and configure the VM to use the agent:

https://pve.proxmox.com/wiki/Qemu-guest-agent#Windows

When starting a backup (or even issuing a "shutdown" from Proxmox webUI), Proxmox sends an ACPI signal to the OS, which Windows will ignore by default under most circunstances and wont close the OS.

Also, the agent will issue a Windows VSS snapshot within the OS, so you can use "snapshot" mode for your backups being sure that the backup will be consistent. On Linux, the agent does issue a disk flush and quiesce the disks before the backup.
QEMU was installed and configured after the system's install. In my opinion, the problem is something else.
 
You can try --forceStop, since it works with other VMs it has very likely to do something with windows.
When I try to stop the VM through the console, everything is fine. When the backup procedure tries to do the same, this error appears.
 
Check that you can really reach the agent. From the host currently running the VM, ping the agent:

Code:
qm guest cmd VMID ping

If communication among host and agent is not possible, you will get "QEMU guest agent is not running". If QEMU guest agent is not configured in the VM options you will always get this message, even when the service is running. Check also that the device driver is loaded and running for VIOSerial Device vport0p1.

You can also try to shutdown the VM using the agent, which is the same action that is used when doing a backup with Agent enabled:

Code:
qm guest cmd VMID shutdown
{
   "result" : null
}
 
Check that you can really reach the agent. From the host currently running the VM, ping the agent:

Code:
qm guest cmd VMID ping

If communication among host and agent is not possible, you will get "QEMU guest agent is not running". If QEMU guest agent is not configured in the VM options you will always get this message, even when the service is running. Check also that the device driver is loaded and running for VIOSerial Device vport0p1.

You can also try to shutdown the VM using the agent, which is the same action that is used when doing a backup with Agent enabled:

Code:
qm guest cmd VMID shutdown
{
   "result" : null
}
It's really help! Thank you.

Qemu Guest Agent was not running. I reconfigured it and problem was solved.

Thank you again.
 

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!