]> git.proxmox.com Git - qemu-server.git/commitdiff
vm_stop: do not use ha commands if $migratedfrom is set
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 29 Jul 2014 04:51:02 +0000 (06:51 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 29 Jul 2014 04:51:02 +0000 (06:51 +0200)
PVE/API2/Qemu.pm

index a4c5f21e7f8c8f86ca7cd1826fef8e0dc3d8b41b..165dc3dd1cf6496ebebf6266bb3aaa61cde29535 100644 (file)
@@ -1674,7 +1674,7 @@ __PACKAGE__->register_method({
            node => get_standard_option('pve-node'),
            vmid => get_standard_option('pve-vmid'),
            skiplock => get_standard_option('skiplock'),
            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',
            timeout => {
                description => "Wait maximal timeout seconds.",
                type => 'integer',
@@ -1718,7 +1718,7 @@ __PACKAGE__->register_method({
 
        my $storecfg = PVE::Storage::config();
 
 
        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;
 
            my $hacmd = sub {
                my $upid = shift;