Upgradable templates

I was looking at the Qubes Template Manager, and I found that there are updated versions of the debian-12 templates (from September 7, 2024).
I could not find any info about what changes are in those versions, so I am wondering whether I should upgrade my templates or not.

Also, if I upgrade the templates from the Template Manager, will I lose all the packages and modifications I made to the template VMs using those templates? I am still reasonably new to QubesOS, so there are things about how templates work I still do not understand completely.

Thanks!

2 Likes

Usually all packages provided by Distro (Debian) and qubes specific packages are updated and repacked as a new template.

Yes. You will lose all modifications, customization, packages installed within the template. Some users create salt formulas to automate them.

2 Likes

Thanks!

I have kept my current Debian templates up-to-date (to the newest point version of Debian 12). I have also noticed several Qubes-specific packages upgraded too. Would the result of this be the same as upgrading the template? If so, I’d probably wait until a new major Debian version is released before upgrading the templates.

1 Like

Yes.

1 Like

Going a bit off-topic, I found that now there is a debian-12 template that has the same size as the previous debian-12-minimal, and the debian-12-minimal is now much smaller. So I’m guessing the change is a splitting of the template into a GUI one, a regular no-GUI one, and a truly minimal one.
I realized that none of my VMs depend on the debian-12-minimal template, so I will upgrade and see what happens. :slight_smile:

2 Likes

@pablob asked if the templates which are based on the upgraded template will lose modifications, am I right that your answer targets the upgraded template instead? I mean will template “fedora-40-minimal-with-modifications” (with “fedora-40-minimal” as template) lose it’s modifications when upgrading “fedora-40-minimal” (my guess is not…)?

If it is a clone of the stock template, it will not lose its modifications.

p.s.: And that is for the time. Also related:

For better clarification, here is a snapshot of the new Template Manager and update warning. Ordinary users might not have the new Template Manager for the time as it is in testing branch

Okay, makes sense, as clones are independent from their source… So if I understand correctly (please correct me, if my assumtions are wrong):

  1. Upgrading template is not really needed if you update the template with qubes updater
  2. It is good practice not to modify the stock templates and instead create a clone and make the modifications there so you cannot break changes you made accidently
  3. Restored stock templates on a fresh qubes install will not be manageable with Template Manager, so it is better to not restore them and install them with Template Manager instead

This is great, I think the term “Upgrade” is a bit confusing without the warning, if it would be called “Reinstall” from the beginning I would be more careful to execute this action…

There are very rare cases that it might be necessary due to security concerns (e.g QSB #28). Also at the template end-of-life, you have to decide if you want to do the complex in-place upgrade to new version (e.g. from Fedora 40 to 41). Or you will fetch a fresh new template and reinstall all of your applications and do your customization.

If you are afraid that you might accidentally overwrite your template customization, then the answer is absolutely YES.

Interesting question. And my answer is that I do not know. I never did it. And I never studied its mechanism.