Manually Updating VM (via dom0 command)

Hello

How can I manually update a Qubes VM using a dom0 command?

qubes-posts/2021-05-06-updating-via-direct-commands-no-longer-recommended.md at update-commands · QubesOS/qubes-posts · GitHub - maybe of interest

Updating Qubes OS | Qubes OS regular documentaationn

You can run the native tools, for example:
qvm-run -u root -p <qube> 'apt update && apt upgrade'

But it is recommended that you use the Qubes update mechanism:
sudo qubesctl --skip-dom0 --show-output --targets=<qube> state.apply update.qubes-vm

1 Like

The first suggestion → qvm-run I tried this and the process just hung and had to be stopped. Not sure how long it should take? The second suggestion, returned the same error caused by Salt Stack →

ImportError: cannot import name ‘_supported_dists’ from ‘platform’ (/usr/lib/python3.9/platform.py)

The first will take “as long as it takes” - depends on the number of
packages and your download speed.
The second suggestions is SaltStack, so will duplicate any problems
that you encounter using the Update Tool.

If you want to troubleshoot the first method, you should be seeing
output in dom0 - that’s what the “-p” flag does.
Try separating the two commands.
qvm-run -u root -p <qube> 'apt update '
qvm-run -u root -p <qube> 'apt upgrade'
(And if you want to script this you should use apt-get instead)

Any clues as to what is causing Salt Stack to return the error?

(updated title for clarity)

I suspect you have not upgraded the template used by your
management_dispvm. What are you using?

Default Disposable VM Template is fedora-30-dvm

The only other alternative is whonix-ws-15-dvm

This should be updated ASAP as Fedora-32 is no longer supported (fedora 30 has not been supported since May 26, 2020). This also means they are not getting important security updates. Tip: always keep an eye on Qubes announcements (they are plastered everywhere - forum, mailing lists, website, etc.)

Find links to update instructions here:

1 Like