mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-09 18:24:26 +00:00
suspend: output some information about progress
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
b3983fa1dc
commit
b0a9a38568
@ -5226,6 +5226,7 @@ sub vm_start {
|
|||||||
if ($is_suspended) {
|
if ($is_suspended) {
|
||||||
# enforce machine type on suspended vm to ensure HW compatibility
|
# enforce machine type on suspended vm to ensure HW compatibility
|
||||||
$forcemachine = $conf->{runningmachine};
|
$forcemachine = $conf->{runningmachine};
|
||||||
|
print "Resuming suspended VM\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($cmd, $vollist, $spice_port) = config_to_command($storecfg, $vmid, $conf, $defaults, $forcemachine);
|
my ($cmd, $vollist, $spice_port) = config_to_command($storecfg, $vmid, $conf, $defaults, $forcemachine);
|
||||||
@ -5426,6 +5427,7 @@ sub vm_start {
|
|||||||
value => 2) if (!defined($conf->{balloon}) || $conf->{balloon});
|
value => 2) if (!defined($conf->{balloon}) || $conf->{balloon});
|
||||||
|
|
||||||
if ($is_suspended && (my $vmstate = $conf->{vmstate})) {
|
if ($is_suspended && (my $vmstate = $conf->{vmstate})) {
|
||||||
|
print "Resumed VM, removing state\n";
|
||||||
delete $conf->@{qw(lock vmstate runningmachine)};
|
delete $conf->@{qw(lock vmstate runningmachine)};
|
||||||
PVE::Storage::deactivate_volumes($storecfg, [$vmstate]);
|
PVE::Storage::deactivate_volumes($storecfg, [$vmstate]);
|
||||||
PVE::Storage::vdisk_free($storecfg, $vmstate);
|
PVE::Storage::vdisk_free($storecfg, $vmstate);
|
||||||
@ -5723,6 +5725,7 @@ sub vm_suspend {
|
|||||||
sleep(1);
|
sleep(1);
|
||||||
next;
|
next;
|
||||||
} elsif ($state->{status} eq 'completed') {
|
} elsif ($state->{status} eq 'completed') {
|
||||||
|
print "State saved, quitting\n";
|
||||||
last;
|
last;
|
||||||
} elsif ($state->{status} eq 'failed' && $state->{error}) {
|
} elsif ($state->{status} eq 'failed' && $state->{error}) {
|
||||||
die "query-savevm failed with error '$state->{error}'\n"
|
die "query-savevm failed with error '$state->{error}'\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user