Confirmation no simplier way : switch sys-usb template for desktop

Hi,

I’m blocked switching template for sys-usb : it relies on default-dvm template, which relies on fedora-41-xfce, that i want to upgrade to fedora-42-xfce to get rid of fedora-41-xfce (this is its last usage). Template switcher must have the vm down for switching, and this is a desktop :frowning:

I found a workaround : Qubes OS hasn’t another “builtin” feature to do that ?

1 Like

Best way to update is to clone template to version 42, update cloned template and then switch template in every qubes using old one.
Wait and use 2-3 days and if no problem arise then delete old v41 template.

After an update, it will show you all services and app qubes based on the template, you can hit update and it will do a restart after.

Recently I updated in one computer the sys-usb from fedora-41-xfce to debian-13-xfce. If I recall correctly, I just stopped sys-usb, then changed the template for ‘default-dvm’ to debian-13-xfce, and then restarted sys-usb. It seemed to work with no problems (save for forgetting to install qubes-video-companion for webcam sharing). It should work the same to change to fedora-42-xfce (or any other template).

Edited to add: In my case (this was a desktop computer), I use a dedicated USB controller for the keyboard and mouse that stays with dom0. I definitely recommend this, it makes your life a lot easier, it does not increase attack surface significantly (since it only has known-good devices plugged it), and it is not very expensive. Otherwise you need workarounds, as you found out.

Ok, thx, it definitively seems “the simple way” (or at least “the safe way”) to do that. Seems I’m gonna use this method.

Thank you @pablob for this hint.
I assume these are internal (PCIx ?) adapters ?
My fault, I did not mentionned : this peculiar machine is a mini PC :cry:

Yes, it’s a simple PCIx USB adapter with 2 ports. If you do not have internal slots, then it seems you’d be SOL…

Yes, I do agree, this is definitively not the best hardware for Qubes OS, I have to cope with that (I shall add it in HCL btw), and using it with a kvm for two different rooms is a bit tricky :smiley: … so I’ll switch-template-by-cloning, just have to be used to :slight_smile:
Thx

[EDIT] : ended locked out of Qubes OS during switching, saved with ‘e’ at grub startup, so … not so easy, I’ll write myself a procedure next time.

Hi,
I’m still stuck with this problem, since sys-usb’s template is default-vm, which template is fedora-42-xfce, that i cannot upgrade since sys-usb (mouse and keyboard) is running … i was thinking to a dom0 script launched with crontab after stopping all the VM … anyway it could work ?

This is a common problem.

There is a possible solution, but you must adapt it. An example is here, given by @unman:

It is designed to be created as an executable script in dom0…

If you are comfortable with shell scripts, then it should be easy to understand. I do recommend to change the shutdown commands to
qvm-shutdown --wait ....
to be sure that the shutdown finishes before trying to change the template.

2 Likes

thx @phceac , yes, indeed, now it’s working, the same way you mentionned (and previously), I was just erratic with template cloning, default-dvm cloning, template switching while in use, etc . Think I autolocked by not being … simple enough :slight_smile:
, i’m just saving my script that worked (with sleep 15 … arbitrary ? --wait should be finer ?) for next template update :+1:

1 Like