Thank you @whoami for your feedback, I will incorporate it in the next draft.
when debian-12 is out all I have to do is change the TEMPLATE value of the script
Ideally. That’s what I did when upgrading from debian-10 to debian-11. But of course there is no guarantee, things might break but in case of debian they are usually well documented. Like debian-11 no longer including Qt4.
I see an upgrade just as a special case of (re-)creating your qubes. Once you tested your scripts with a particular version, they will always work with that version and chances are they will continue to work with the next.
Lol. Imagine the poor folks using Fedora and having to do this every 6 months or so. How would you even keep your sanity without automating it?
Afterwards re-assign all AppVM to new mini-templates and delete all obsolete templates. Does it make sense to also automate this steps or would it be advisable to always to this re-assigning and remove of templates manually?
Here is what I do:
qvm-ls --field=name, template > tmp
chmod +x tmp
nano tmp
In nano I then
- remove the first line, the dom0 line, all the template lines and all the lines of qubes based on a dvm template. As a result I now have a list of all my qubes and their templates.
- add
qvm-prefsat the beginning of each line - search and replace
deb-10bytemplate deb-11 - safe & exit nano
Then qvm-shutdown --all --wait && ./tmp … and done.