diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index fa7fd3ec6..072ebf955 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -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: