-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2020-05-11 14:26, 'Ryan Tate' via qubes-users wrote:
> Saw the new f31 templateVM (thanks for that) and just curious how
folks generally migrate to a new templateVM.
>
> I manually maintain this big text list of packages and just use
> that
to manually update the fresh templateVM to what I need. There's
typically also some non package installs, which I include basic pointers
for (think downloaded rpms and so forth), as well as some outside repos
to add (e.g. keybase). There's also typically some packages I forgot to
put on the list, which I can usually suss out by going through the bash
history for the old template, although often there's one or two that
slip through the cracks, which I find out about eventually and it's not
a huge deal.
>
> I'm particularly curious if anyone does anything more
> sophisticated
than that, using salt or some other automated deploy system to prep new
template images.
>
> Thanks for any tips!
>
I also keep a list of packages I want to have on each of my templates.
For the switching part of each AppVM to the new TemplateVM (e.g.
fedora-30 to fedora-31) I use a simple Python script that utilizes the
Qubes Admin API:

#!/usr/bin/python3

import qubesadmin
from qubesadmin.exc import *

from_templatevm = 'fedora-30'
to_templatevm = 'fedora-31'

qubes = qubesadmin.Qubes().app.domains

for qube in qubes:
    if qube.name == from_templatevm:
        appvms = qube.appvms
        for appvm in appvms:
            print('Changing TemplateVM of:', appvm.name)
            try:
                appvm.__setattr__('template', to_templatevm)
            except QubesVMNotHaltedError:
                print("Cannot change TemplateVM while qube is turned on!
")

I usually just run this after my next reboot when almost (don't forget
to shutdown the NetVMs) all my qubes will be turned off. This is much
better than switching them manually one by one in Qubes Manager.

After that all I do is clone, for example, fedora-30-dvm to
fedora-31-dvm with its template now changed.


-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQQBj7nebfoT+xj7VVL5uQ1E+D3V8gUCXrm5oQAKCRD5uQ1E+D3V
8qS/AQCtW8COW7f2ndgpDTAJD/VYRzfqgo333UeR7EmcC1JKqAD+O0Jh2Z3tseRn
cmEcBRFQyOYmPjvGCdHfq/Ypnj66VQo=
=9oMW
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/b2444535-cd8c-ca3c-274e-e16f024e54b0%40zohomail.eu.

Reply via email to