]> git.proxmox.com Git - pve-container.git/commitdiff
vm_stop: make sure the container is stopped using lxc-wait
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 8 Jan 2016 10:46:21 +0000 (11:46 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 8 Jan 2016 10:46:21 +0000 (11:46 +0100)
src/PVE/API2/LXC/Status.pm

index 5e5e11678177ebe73ba8d436cebba9e476d47620..91ad16eb6cc18eaf0aecc8fe0b64e19a054c018a 100644 (file)
@@ -316,6 +316,10 @@ __PACKAGE__->register_method({
                run_command($cmd);
            }
 
+           # make sure container is stopped
+           $cmd = ['lxc-wait',  '-n', $vmid, '-t', 5, '-s', 'STOPPED'];
+           run_command($cmd);
+           
            die $err if $err;
 
            return;