Skip to content

Commit

Permalink
Kill paused qubes on system shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Sep 3, 2024
1 parent 68070df commit 2ff9968
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,13 @@ 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() and not force:
raise qubes.exc.QubesVMNotRunningError(self)
elif self.is_paused():
self.libvirt_domain.destroy()
else:
self.libvirt_domain.shutdown()

if wait:
if timeout is None:
Expand Down

0 comments on commit 2ff9968

Please sign in to comment.