Upgrade single template to 4.2? Debian Template fails to synchronize applications on upgrade

I have gotten into the 4.2 release candidate and I really love some of the features, but have had a serious problem getting my debian templates updated. I have debian-11 and debian-12 that I used on 4.1 and had used the upgrade script to go to 4.2 with.

However, since the upgrade, I had errors on both of them saying “there is no longer a release file” which would stop updates immmediately. Because the templates got messed up during the update somehow and no longer booted, I loaded them from a recent (pre-4.2) backup. Now they update fine. But it leaves me with a question:

Is there something in the templates that requires upgrading to qubes 4.2 in some way? I feel like there is because there was some activity in the upgrade script, but that script seems to have broken the debian templates for me. Now that I restored the old “4.1” version I had from backup, they are updating like normal. Can someone explain if I need to upgrade the template somehow to 4.2 or if they are fine as they are?

Thanks!

yes you need.

To update a single template to 4.2, use the option of the qubes-dist-upgrade tool.

sudo qubes-dist-upgrade --help
[user@dom0 ~]$ sudo qubes-dist-upgrade --help
Usage: /usr/sbin/qubes-dist-upgrade [OPTIONS]...

This script is used for updating current QubesOS R4.1 to R4.2.

Options:
    --update, -t                       (STAGE 1) Update of dom0, TemplatesVM and StandaloneVM.
    --release-upgrade, -r              (STAGE 2) Update 'qubes-release' for Qubes R4.1.
    --dist-upgrade, -s                 (STAGE 3) Upgrade to Qubes R4.1 and Fedora 32 repositories.
    --template-standalone-upgrade, -l  (STAGE 4) Upgrade templates and standalone VMs to R4.1 repository.
    --finalize, -x                     (STAGE 5) Finalize upgrade. It does:
                                         - resync applications and features
                                         - cleanup salt states
    --all-pre-reboot                   Execute stages 1 do 3
    --all-post-reboot                  Execute stages 4 and 5

    --assumeyes, -y                    Automatically answer yes for all questions.
    --usbvm, -u                        Current UsbVM defined (default 'sys-usb').
    --netvm, -n                        Current NetVM defined (default 'sys-net').
    --updatevm, -f                     Current UpdateVM defined (default 'sys-firewall').
    --skip-template-upgrade, -j        Don't upgrade TemplateVM to R4.2 repositories.
    --skip-standalone-upgrade, -k      Don't upgrade StandaloneVM to R4.2 repositories.
    --only-update                      Apply STAGE 4 and resync appmenus only to
                                       selected qubes (comma separated list).
    --keep-running                     List of extra VMs to keep running during update (comma separated list).
                                       Can be useful if multiple updates proxy VMs are configured.
    --max-concurrency                  How many TemplateVM/StandaloneVM to update in parallel in STAGE 1
                                       (default 4).

Make a clone of your template (or not as you have a backup) before updating it.

sudo qubes-dist-upgrade -l -x --only-update <YOUR_TEMPLATE>

https://github.com/QubesOS/qubes-dist-upgrade/blob/main/scripts/upgrade-template-standalone.sh
The template update invole:

  • change the repo to 4.2 release
  • change the gpg key to 4.2
  • upgrade the template with new packages (of the 4.2 repo)
1 Like

Thank you! This makes sense to me. Unfortunately, everytime I try to upgrade my debian templates, they fail in STAGE 5 with the error:

---> (STAGE 5) Cleaning up salt
Error on ext_pillar interface qvm_prefs is expected
local:
    True
[CRITICAL] Specified ext_pillar interface qvm_prefs is unavailable
local:
    ----------
    beacons:
    clouds:
    engines:
    executors:
    grains:
        - grains.boot_mode
        - grains.pci_devs
        - grains.redefined_dom0_grains
        - grains.whonix
    log_handlers:
    matchers:
    modules:
        - modules.debug
        - modules.ext_module_qvm
        - modules.module_utils
        - modules.qubes
        - modules.qubes_dom0_update
        - modules.topd
    output:
    pillar:
        - pillar.qvm_prefs
    proxymodules:
    renderers:
    returners:
    sdb:
    serializers:
    states:
        - states.debug
        - states.ext_state_qvm
        - states.status
    thorium:
    utils:
        - utils.__init__
        - utils.fileinfo
        - utils.matcher
        - utils.nulltype
        - utils.pathinfo
        - utils.pathutils
        - utils.qubes_utils
        - utils.toputils
---> (STAGE 5) Adjusting default kernel
  Failed to find logical volume "qubes_dom0/Qubes41UpgradeBackup"

After that, then they seem to lose half the applications I had installed on the template. My fedora template upgraded fine. I filed a bug report here: Debian-11 template fails to upgrade to 4.2 in STAGE 5 · Issue #8500 · QubesOS/qubes-issues · GitHub

As stated, its expected behaviour (aka: not really an error).

It’s also expected behaviour if you didn’t make a snapshot backup when asked in previous step.
And as you only ran the stage 4 and 5, you didn’t have this question and therefore don’t have this backup.

It’s mostly improbable.
What do you mean by that ?
That the application are no more in the menu ?
It could be a bug in the synchronization of the appmenu shorcuts, but the application should still be there.

What do you have in the Applications tab of the qube setting ?
Do the applications are still there ? (in the available colums ? or the other one ?)
You could try to click on refresh applications button.
You could try to remove all application to the ‘shown in menu’ column, refresh, and then, add them again.

Yes you are correct: I meant that the applications are not in the app menu anymore, and for some reason even the applications that are in the menu won’t launch.

I just tried clicking on refresh applications and it went through and synchronized them. Now the template works again! I am not sure what bug causes it, but I have repeated this process several times now. If I run the upgrade, it goes through the process but will fail to synchronize half of the applications. Then the template is not functional. If I refresh the applications list, it correctly lists everything and then it works. So there is some error occurring in the synchronization part of the upgrade.