mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #24136 from rallytime/bp-24104
Backport #24104 to 2015.5
This commit is contained in:
commit
89cdf976e1
1 changed files with 2 additions and 1 deletions
|
@ -846,7 +846,8 @@ def destroy(name, call=None):
|
|||
vmobj = _getVmByName(name)
|
||||
if vmobj is not None:
|
||||
# stop the vm
|
||||
stop(name, vmobj['vmid'], 'action')
|
||||
if get_vm_status(vmid=vmobj['vmid'])['status'] != 'stopped':
|
||||
stop(name, vmobj['vmid'], 'action')
|
||||
|
||||
# wait until stopped
|
||||
if not wait_for_state(vmobj['vmid'], 'stopped'):
|
||||
|
|
Loading…
Add table
Reference in a new issue