Restoring old R4.0 template to R4.2

I have multiple Debian 11 templates from a R4.0 install that I would like to move to R4.2. When I import the templates and attempt to update them in the Qubes OS Update GUI, I get an error on each template:

Updating tpl-deb-11-xxx
/bin/sh: 0: cannot open /etc/qubes-rpc/qubes.VMExec: No such file

Each templates shows the same error. How can I make these templates work with the update GUI?

To upgrade them, you must use the dist upgrade script provided by the Qubes developers.

First run this to upgrade from 4.0 to 4.1, then shutdown the template:

Test the template (e.g. open applications from qubes based on it) to make sure it works.

If it does, use this to upgrade to 4.2:

Test again. If it works, try to update with the Qubes Updater.


Thanks @DVM. That appears to have worked.

I downloaded the for R4.0, copied it to the restored r4.0 template, made it executable, and ran it.

I had to shutdown the template, and test it before I could run the next script. You can’t just run the 2 scripts.

Next, I downloaded the for R4.1, copied it to the restored r4.0 template, made it executable, and ran it.

After that, the template works with the GUI Qubes Update.

Is it recommended to run this for 4.2 on all templates restored from r4.1? I didn’t see mention of this in the Docs on the Qubes site (but I may have missed it).

1 Like

Yes, I don’t recall seeing anything that automatically changes the repo (unless you do a Qubes in-place upgrade, which calls this script). If you do a clean install and restore an old template, you will definitely need to run this script to update the template to the current Qubes release.


@adw I already quoted you on this in another thread, but this seems important for people restoring their backups from an older release. Can you check with the devs to see if this needs an entry in the clean install upgrade process from 4.1 to 4.2 and/or a mention in the documentation?

I suggest you open an issue for this. It’s better to go through the proper channels that we’ve established for this sort of thing.