More of an open discussion than a guide, but might be useful for people searching for help later on.
When qubes fails to shut down a qube with an error like this:
The following error occurred while attempting to shut down qube qube_name:
Got empty response from qubesd. See journalctl in dom0 for details.
Or like this, if using qvm-shutdown --wait --timeout:
qvm-shutdown: error: Failed to shut down: qube_name
I solve it by asking daddy libvirt to clean up the mess (somewhat ironic considering that qubes throws libvirtError in journalctl):
sudo virsh destroy qube_name
Which leads to the qube being registered as down after hanging for a second in the qube list applet. Just be careful with this command, it is “the equivalent of ripping the power cord out” for the guest.
I did it a couple of times so far, and I see no consequences to my actions. Please correct me if it has any implications.
I think it’s ok, as a last resort. Aslo, I always supposed that the “Kill” action available in the graphical “Qube Manager”/qui uses virsh to achieve that (probably using the same command-line that you wrote).
It may be so, but kill action is not available in the applet (I haven’t checked the manager) if a qube gets stuck like that. Applet won’t respond until the qube fails to shut down.
It is a good point since you should be able to kill a qube after pausing it, but I suspect that trying to pause such a qube may fail as well.
If you exclude everything else that kill() does, such as checking for qube state, waiting for a correct state for the thing to be managed by qubesd, yes, it is the same.
Don’t use virsh commands, prefer the qvm-* alternatives when possible.