From: Dietmar Maurer Date: Tue, 29 Jul 2014 04:51:02 +0000 (+0200) Subject: vm_stop: do not use ha commands if $migratedfrom is set X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff_plain;h=debe88829e468928271c6d0baf6592b682a70c46 vm_stop: do not use ha commands if $migratedfrom is set --- diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index a4c5f21..165dc3d 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1674,7 +1674,7 @@ __PACKAGE__->register_method({ node => get_standard_option('pve-node'), vmid => get_standard_option('pve-vmid'), skiplock => get_standard_option('skiplock'), - migratedfrom => get_standard_option('pve-node',{ optional => 1 }), + migratedfrom => get_standard_option('pve-node', { optional => 1 }), timeout => { description => "Wait maximal timeout seconds.", type => 'integer', @@ -1718,7 +1718,7 @@ __PACKAGE__->register_method({ my $storecfg = PVE::Storage::config(); - if (&$vm_is_ha_managed($vmid) && $rpcenv->{type} ne 'ha') { + if (&$vm_is_ha_managed($vmid) && ($rpcenv->{type} ne 'ha') && !defined($migratedfrom)) { my $hacmd = sub { my $upid = shift;