mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-01 04:11:00 +00:00
suspend: continue cleanup even if savevm-end QMP command fails
The savevm-end command also fails when no snapshot operation was started before. In particular, this is the case when savevm-start failed early, because of unmigratable devices. Avoid potentially leaving an orphaned volume and snasphot-related configuration keys around by continuing with cleanup instead. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
88e18f9c5d
commit
c799e40fbf
@ -6406,7 +6406,8 @@ sub vm_suspend {
|
||||
if ($err) {
|
||||
# cleanup, but leave suspending lock, to indicate something went wrong
|
||||
eval {
|
||||
mon_cmd($vmid, "savevm-end");
|
||||
eval { mon_cmd($vmid, "savevm-end"); };
|
||||
warn $@ if $@;
|
||||
PVE::Storage::deactivate_volumes($storecfg, [$vmstate]);
|
||||
PVE::Storage::vdisk_free($storecfg, $vmstate);
|
||||
delete $conf->@{qw(vmstate runningmachine runningcpu)};
|
||||
|
Loading…
Reference in New Issue
Block a user