mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #24136 from rallytime/bp-24104
Backport #24104 to 2015.5
This commit is contained in:
commit
89cdf976e1
@ -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…
Reference in New Issue
Block a user