forked from saratov/infra
Fix VMs hang up after destroy action
This commit is contained in:
parent
2cdfa7c198
commit
5bb1f17aae
@ -795,7 +795,7 @@ def start_vm(module, proxmox, vm, vmid, timeout):
|
|||||||
|
|
||||||
def stop_vm(module, proxmox, vm, vmid, timeout, force):
|
def stop_vm(module, proxmox, vm, vmid, timeout, force):
|
||||||
if force:
|
if force:
|
||||||
taskid = getattr(proxmox.nodes(vm[0]['node']), VZ_TYPE)(vmid).status.shutdown.post(forceStop=1)
|
taskid = getattr(proxmox.nodes(vm[0]['node']), VZ_TYPE)(vmid).status.stop.post()
|
||||||
else:
|
else:
|
||||||
taskid = getattr(proxmox.nodes(vm[0]['node']), VZ_TYPE)(vmid).status.shutdown.post()
|
taskid = getattr(proxmox.nodes(vm[0]['node']), VZ_TYPE)(vmid).status.shutdown.post()
|
||||||
while timeout:
|
while timeout:
|
||||||
|
Loading…
Reference in New Issue
Block a user