Fix VMs hang up after destroy action

This commit is contained in:
Андрей Лимачко 2022-03-09 04:54:15 +04:00
parent 2cdfa7c198
commit 5bb1f17aae

View File

@ -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: