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):
|
||||
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:
|
||||
taskid = getattr(proxmox.nodes(vm[0]['node']), VZ_TYPE)(vmid).status.shutdown.post()
|
||||
while timeout:
|
||||
|
Loading…
Reference in New Issue
Block a user