mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-29 12:38:19 +00:00
deactivate volumes if vm start command fails
also for current master cleanup of patch from Dhaussy Alexandre from 02/15/2016 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
07ca4ceb92
commit
77cde36b4e
@ -4577,8 +4577,12 @@ sub vm_start {
|
|||||||
|
|
||||||
eval { run_command($cmd, timeout => $statefile ? undef : 30,
|
eval { run_command($cmd, timeout => $statefile ? undef : 30,
|
||||||
umask => 0077); };
|
umask => 0077); };
|
||||||
my $err = $@;
|
|
||||||
die "start failed: $err" if $err;
|
if (my $err = $@) {
|
||||||
|
# deactivate volumes if start fails
|
||||||
|
eval { PVE::Storage::deactivate_volumes($storecfg, $vollist); };
|
||||||
|
die "start failed: $err";
|
||||||
|
}
|
||||||
|
|
||||||
print "migration listens on $migrate_uri\n" if $migrate_uri;
|
print "migration listens on $migrate_uri\n" if $migrate_uri;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user