Skip to content

Commit b916ce1

Browse files
committed
fix: Handle "aborted" VM state in shutdown check
`ensure_vm_shutdown` now handles the `aborted` VM state, preventing failed shutdown attempts.
1 parent 1da0ff6 commit b916ce1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

virtualbox/vboxcommon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ def ensure_vm_shutdown(vm_uuid):
299299
if vm_state == "poweroff":
300300
return
301301

302-
# If the state is aborted-saved, the VM is not running and can't be turned off
302+
# If the state is aborted, the VM is not running and can't be turned off
303303
# Log the state and return
304-
if vm_state == "aborted-saved":
304+
if vm_state in ("aborted-saved", "aborted"):
305305
print(f"VM {vm_uuid} state: {vm_state}")
306306
return
307307

0 commit comments

Comments
 (0)