Skip to content

Commit

Permalink
Unpause a paused qube before shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Sep 3, 2024
1 parent 68070df commit a2ad22f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,11 @@ async def shutdown(self, force=False, wait=False, timeout=None):
if self.__waiter is None:
self.__waiter = asyncio.get_running_loop().create_future()
waiter = self.__waiter
self.libvirt_domain.shutdown()

if self.is_paused():
self.libvirt_domain.destroy()

Check warning on line 1390 in qubes/vm/qubesvm.py

View check run for this annotation

Codecov / codecov/patch

qubes/vm/qubesvm.py#L1389-L1390

Added lines #L1389 - L1390 were not covered by tests
else:
self.libvirt_domain.shutdown()

Check warning on line 1392 in qubes/vm/qubesvm.py

View check run for this annotation

Codecov / codecov/patch

qubes/vm/qubesvm.py#L1392

Added line #L1392 was not covered by tests

if wait:
if timeout is None:
Expand Down

0 comments on commit a2ad22f

Please sign in to comment.