On Fri, 2 Feb 2018, Bernhard wrote:
> Did by chance someone write a dom0-script that
> a) fetches a list of all (running) appvm's that use sys-net.
> b) setting their net-vm to "none"
> c) reboot sys-net
> d) undoes step (b)
> That would allow to confortably reboot sys-net (same ideas apply to
> sys-firewall & sys-whonix) and could help many people in many
> situations. I am not a bash hero, and before losing half a day on this
> useful script, I prefer asking if someone did it already :)
I didn't have it already but it wasn't too difficult to do so I wrote one
as it seems somewhat useful.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.
[ $# -ge 1 ] && vm="$1"
echo "Restarting $vm..."
explicitlist=$(qvm-ls --raw-data state netvm name-raw | \
grep -e "^Running|$vm|" | cut -d '|' -f 3)
defaultlist=$(qvm-ls --raw-data state netvm name-raw | \
grep -e "^Running|[*]$vm|" | cut -d '|' -f 3)
for i in $explicitlist $defaultlist; do
qvm-prefs -s $i netvm none
qvm-shutdown --wait "$vm"
for i in $explicitlist; do
qvm-prefs -s $i netvm "$vm"
for i in $defaultlist; do
qvm-prefs -s $i netvm default