Changing sys-usb template

something is screwed up with my standard disposable fedora-34-dvm template.
I’ve created a new one that works fine, & want to delete the old fedora-34-dvm template but its being used by my sys-usb.

I cant change sys-usb template without shutting it down, but when i do that mouse and keyboard stop working and i have to restart.
How can i change my sys-usb template?

I’m rather new to Qubes myself, but could you not just clone the sys-usb qube?

1 Like


If I understand correctly, you created a sys-usb VM (which hid the keyboard from connecting directly with dom0) and you enabled sys-usb to pass the keyboard through to dom0.

If so, then allow the keyboard to connect directly with dom0 so you can shutdown sys-usb and reassign the template.

In dom0 type:

sudo nano /etc/default/grub

Look for GRUB_CMDLINE_LINUX= and remove rd.qubes.hide_all_usb

Save and close.

Then run:

grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot the system.

After rebooting, shutdown sys-usb, change templates & restart sys-usb.

Then go back to dom0 and replace rd.qubes.hide_all_usb to GRUB_CMDLINE_LINUX= in /etc/default/grub

If you are “paranoid” disable local networking, before, during and after the system reboot while dom0 is exposed to the keyboard.

[disclaimer: take my advice at your own risk. If you are feeling cautious, wait until my advice is corroborated by another forum member. If you’re feeling adventurous… go for it! It’s just a bunch of silicon and electrons!]

1 Like

Hey guys, thanks for the replies @FireLaser @necker
im back after locking myself out and needing to borrow a ps2 keyboard, hard to track those down these days :sweat_smile:

I have successfully found a way to change the template of sys-usb though

qvm-shutdown --wait sys-usb; qvm-prefs -s sys-usb template new-template-dvm; qvm-start sys-usb

Ive also found all my usb devices are working on a fedora-34-minimal template including my yubikey.

my issue was my fedora-34-dvm was broken and not routing through my new sys-vpn. I created a new dvm which worked but couldn’t deleted the old dvm because it was in use by sys-usb.
Ive been wanting to shift sys-usb to a minimal template so this all worked out for the best :sunglasses:

1 Like

this would have also been a good option, i already locked myself out before you replied

One finial step to delete the default disposable vm is to get past the “global property default_dispvm” message when trying to delete.
Change default dvm
qubes-prefs default_dispvm <name of new defualt>

Glad that worked for you. My only thought is that I might prefer && in place of ;

Also, maybe a ps/2 adapter to hang on your house keys. :wink: