Github Issue #8580 - Shutting down or rebooting dom0 while VMs are paused takes a very long time

Github Issue #8580 - Shutting down or rebooting dom0 while VMs are paused takes a very long time

on Oct 9, 2023, UndeadDevel writes:

When shutting down or rebooting QubesOS while some VMs are paused, the process hangs for a long time (first there is a stop job running for the full 3 mins and then dracut hangs because it can’t umount old-root), so shutdown/reboot take >3 mins longer than usual.

If I unpause all VMs beforehand this doesn’t happen. I have added autostart commands that will unpause relevant VMs automatically on shut down / reboot / logout etc and that fixes the problem, but I feel like this should be handled by the OS. The best solution would probably be to kill paused VMs shortly after shut down or reboot is triggered. The alternative is to unpause and qvm-shutdown them, but that may not be desired security-wise. It could also be that the real issue lies somewhere else and paused VMs during shutdown merely trigger it, I suppose.

Analysis and diagnosis

This issue is already diagnosed and the PR to solve it is submitted. The related technical discussions are available in PR comments. To sum it up, the existing shutdown mechanism for paused domains fails.

Solution

The final solution is as follow:

  • During ordinary operation of the operating system, trying to shutdown a paused qube via qvm-shutdown (without --force) or shutdown via Qube Manager will fail and an error will be shown:

  • Paused qubes will be killed during system shutdown without waiting. qvm-shutdown --force will effectively kill paused qubes.

The above facts should be taken into consideration. The new behaviour is not much different from what is happening at the moment. It is just faster.

1 Like