Named Disposable

tommy@dom0:\~$ qvm-shutdown --wait sys-usb ; qvm-prefs sys-usb template fedora-43-xfce ; qvm-start sys-usb ; sleep 3m ; qvm-shutdown --wait sys-usb ; qvm-prefs sys-usb template fedora-42-xfce ; qvm-start sys-usb
qvm-prefs: error: template for disposable must have template_for_dispvms=True
**qvm-prefs: error: template for disposable must have template_for_dispvms=True**

phceac returned this reply can anyone help me solve this issue?

Then there is a problem -I think- that your sys-usb is a “named disposable” qube, so it must have a template that is suitable. I do not remember the name of the setting to make your new template work…

Maybe someone else can help with that one…

A little more context/structured explanation would have been nice.

From what I can see, the message tells you to set template_for_dispvms=True.

So do it :stuck_out_tongue:

I’m using salt for config, I guess that does not apply to you.

Have a look at the docs here, they do not state template_for_dispvms but will propably work anyway.

Can you provide the output ofqvm-prefs sys-usb? I suspect your template is currently set as a disposable template rather than a regular template, which may be causing the issue.

Edit: I suspect your sys-usb is a disposable vm, in which case it cannot use a regular template as its template.

~$ qvm-prefs sys-usb
audiovm D dom0
auto_cleanup D False
autostart - True
backup_timestamp U
bootmode D default
debug D False
default_dispvm D default-dvm
default_user D user
devices_denied D
dispid - 5855
dns D 10.139.1.1 10.139.1.2
gateway D 10.138.23.13
gateway6 D
guivm D dom0
icon D servicevm-red
include_in_backups D True
installed_by_rpm D False
ip D 10.138.23.13
ip6 D
is_preload D False
kernel D 6.18.42-1.fc41
kernelopts D
keyboard_layout D us++
klass D DispVM
label - red
mac D 00:16:3e:5e:6c:00
management_dispvm D default-mgmt-dvm
maxmem - 0
memory - 300
name - sys-usb
netvm - None
provides_network - True
qid - 15
qrexec_timeout D 60
shutdown_timeout D 60
start_time D 1786892873.46
stubdom_mem U
stubdom_uuid D c6de2b9d-73a6-42b3-9ff6-737105e0e94a
stubdom_xid D 2
template - default-dvm
updateable D False
uuid - ba57a88c-5089-4451-8414-7d670013d854
vcpus D 2
virt_mode - hvm
visible_gateway D
visible_gateway6 D
visible_ip D 10.138.23.13
visible_ip6 D
visible_netmask D
xid D 1

I think @unman and you all missed the crucial part. It’s not

qvm-prefs sys-usb template fedora-43-xfce

but

qvm-prefs default-dvm template fedora-43-xfce

@Tbone

That is part of the confusing terminology of Qubes: template ↔ disposable template.

Templates have property klass=TemplateVM.

Disposable templates are AppVMs (qubes based on a template) and have property template_for_dispvms=True.

Disposables (klass=DispVM) have their qvm-prefs template property set to an AppVM.

TemplateVM → AppVM → disposable

The error you are getting is due to the fact that fedora-43-xfce is a template (TemplateVM), not a disposable template (AppVM).

Assuming you already have an AppVM default-dvm based on a TemplateVM of your choice, replace in your commands:

qvm-prefs sys-usb template fedora-43-xfce

with

qvm-prefs default-dvm template_for_dispvms True # Optional, if not already set
qvm-prefs sys-usb default-dvm

There are no assumptions there, or arrogance. Just repeating, for some reason, with more words, what I already wrote in my previous message.

By giving such a subject to a topic, it was obvious that the user already knows what their sys-usb is.

Off-topic

https://inv.nadeko.net/watch?v=UYpmSJ09hRc

OK I am confused my default-dvm is using the fedora-42 template, I want to change that to the default-dvm using fedora-43. uman suggested this:

qvm-shutdown sys-usb
qvm-prefs sys-usb template fedora-43-xfce
qvm-start sys-usb
sleep 3m
qvm-shutdown sys-usb
qvm-prefs sys-usb template fedora-42-xfce
qvm-start sys-usb

Would this be correct?

qvm-shutdown --wait sys-usb

qvm-prefs default-dvm fedora-43-xfce True

qvm-prefs sys-usb default-dvm

qvm-start sub-usb

EDIT: Sorry, Now I see you asked other user.

I’m asking anybody he just replyed, can you tell me if those last 4 lines will work?

They wouldn’t. qvm-prefs default-dvm fedora-43-xfce True doesn’t make sense. Try this.

qvm-shutdown --all --wait

qvm-prefs default-dvm template fedora-43-xfce

qvm-start sys-usb

sleep 3m

qvm-shutdown --all --wait

qvm-prefs default-dvm template fedora-42-xfce

qvm-start sys-usb

Either put the commands in a script and run it, or put all of them in a single line separated with semicolons (“;”). If the keyboard works after the first time sys-usb restarts, just press Ctrl+C to prevent reverting to the Fedora 42 template.

Don’t bring me in to this.
When I put forward that script, it was in a different context and it
worked
for the OP in that thread.
Obviously any contribution in the Forum must be reviewed and adapted to
the circumstances of the user.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

This sets the template of AppVM named default-dvm to fedora-43-xfce:

qvm-prefs default-dvm template fedora-43-xfce

You can restart sys-usb like this:

qvm-shutdown --wait sys-usb; sleep 1; qvm-start sys-usb

This shuts down sys-usb, waits 1 second, then starts it.

You can put this in a bash script and assign a shortcut key to run it - a convenience when using a USB keyboard.