I got a Python script for that. Put in dom0 and run it. Unlike Andrews
script this one will update all VMs in parallel and is interactive
rather than non-interactive.
https://gist.github.com/JimmyAx/818bcf11a14e85531516ef999c8c5765
Here it is, embedded in the email:
#!/usr/bin/python2
import subprocess
from time import sleep
from qubes.qubes import QubesVmCollection
if __name__ == "__main__":
qvm_collection = QubesVmCollection()
qvm_collection.lock_db_for_reading()
try:
qvm_collection.load()
finally:
qvm_collection.unlock_db()
vms = qvm_collection.values()
exclude_vms = ("debian-8-hvm", "win7", "win7-orig")
#"archlinux-aur", "archlinux")
processes = []
for vm in vms:
dom0 = vm.qid == 0
if not dom0 and vm.updateable and
vm.name not in exclude_vms:
print "Updating VM template %s..." %
vm.name
if not vm.is_running():
vm.start()
sleep(3)
p = vm.run_service("qubes.InstallUpdatesGUI", gui=True,
wait=False, passio_popen=True)
processes.append((vm, p))
print "Waiting for VMs to complete updating..."
for vm, p in processes:
p.wait()
if vm.is_running():
vm.shutdown()
subprocess.check_call(["sudo", "/usr/bin/qubes-dom0-update"])