Generally we assume that a VM will remain running, even if its attendant netvm (i.e Net qube, the VM which is providing network to it) suddenly terminates.
However, some VMs are shutting down automatically when their netvm is terminated through qvm-kill. AppVMs shutting down unexpectedly is really bad and can lead to data loss!
So far I am primarily seeing this affect whonix-workstation-17 and whonix-gateway-17 based VMs, but I can’t rule out it affecting other VMs as well.
I dont use Whonix and have never seen this. I’d suggest it’s a
Whonix issue and raised as a bug there. (Though it may be a deliberate
design decision in Qubes-Whonix.)
I believe I have seen this on normal qubes, but it is extremely rare that I use qvm-kill, and not qvm-shutdown, which asks the user if it finds dependent qubes.
Added note: was probably in a no longer supported version.
If kill is really necessary, I (try to remember to) set the netvm temporarily to none for any dependents.
I do think it would be nice to have a ‘–temporary’ option for qvm-prefs, for using only on running qubes, to limit persistence of the change to the current instance.
It would avoid the need to remember to reset things when I have done with a temporary lockdown, etc. Probably too much complexity for a quite unusual use-case.
Using qvm-kill is probably excessive. You can always use “qvm-shutdown --force” to force the shutdown of a qube providing network to other qubes.
The qubes updater uses the same mechanism to restart sys-net, for example, after its template is updated.
I’m using Whonix-17. I can’t find a Whonix-18 template in the Template Manager. Maybe that’s part of the problem – the template repos on my machine may be incomplete.
using qvm-shutdown --force on the firewall VM still resulted in sys-whonix shutting down. A Whonix-based dispVM shut down once sys-whonix did, but multiple Whonix-based non-disposable appVMs did not.
shutting down sys-net did not trigger sys-whonix shutting down, but shutting down the firewall VM did.
When (for instance) shutting down sys-net while sys-firewall has it for its network VM, I’ve noticed in 4.3 it does ask first but I feel like I am being steered to tell it to shut down, which is the less safe option (perhaps because the button reads “OK” not “Yes”; “OK” is in my experience generally used to acknowledge messages, rather than approve a proposed action.
I’d like to suggest redoing that dialog so the default action is NOT to shut down the qube if other qubes are dependent on it.
Your issue is undoubtedly Whonix - it could be a feature to ensure
that your downstream qubes dont run through clearnet if the upstream
disconnects from Tor. If so, it’s cack handed, and bad UX.
I’m sure the Whonix folk will resolve that issue.
I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.
I use qvm-kill in scripts and I’ve also never seen this. I use it a couple of times daily in fact (like many many times, while working on kuhbs).
Might be a whonix paranoia thing where its scared that you might attach another netvm other than whonix-gateway, so it rather commits suicide than let you do that.
The onion forum is not available, so I cant comment on the reasoning
here.
If not a Whonix issue, then it is Qubes-Whonix specific. I thought
that the Whonix devs took responsibility for such issues.
I dont use Whonix so my troubleshooting will be limited.
Try in - /var/log/xen/console/guest-QUBE.log /var/log/qubes/guid.QUBE.log /var/log/qubes/qrexec-QUBE.log
Obviously journalctl -r in dom0
I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.
I shut down sys-whonix at 12:03 UTC. Two Whonix Workstation-based VMs were connected and shut down on their own. The dom0 logs for both VMs were identical. Here are the relevant log sections from both. It looks like shutting down sys-whonix resulted in a kernel panic in the connected VMs.