Is it possible to change libvirt xml configuration for disp qubes?

For normal qubes I can copy the /etc/libvirt/libxl .xml file to /usr/…/libvirt/xen/by-name and make the changes.

How do I do the same for disposable qubes that don’t have an XML file or static filename?

I know I can change xen.xml, but I would like to make changes that only apply to the disp-mgmt qubes, and maybe to sys-net-dm and sys-usb-dm.

What are “normal qubes”?

Did you try to make changes to unnamed disposable dvm-template’s xml?

By normal, I mean the non-disposable qubes.

There are no xml files for disposable vm or templates.

Yes, but there’s a third class, the disposable virtual machine template. Which is really an appvm with a special flag set. So if what you’re looking for exists on AppVMs, it probably exists on disposable VM Templates too.

You just reminded me of a rant I want to write about how things are named and described in menus. I still get confused sometimes as to what will happen if I try to open (say) an xterm on something listed in the menu as SomeVM-dvm. I will either get a named disposable named SomeVM-dvm, a numbered disposable (disp1234…), or actually open the disposable virtual machine template itself. I’m going to argue that we need a new naming convention in menus.

1 Like

My mistake was using the files from /etc/libvirt/libxl and not the xen.xml file.

I guess the solves my disp-mgmt problem, I can just make a copy of xen.xml for each template I have.

But I still don’t know how to change the configuration for the qubes named disp1234

Those qubes should be based on a dvm template. If you change that template, you change the disposables spawned from it.

It might not be obvious what that template is. You generally get a disp1234 because you did something in some other qube; if you open the settings for that qube (or, command line; qvm-prefs), you’ll see an entry (on the gui it’s on the advanced tab) default disposable template. THAT is the name of the template you will want to do this on. The trick will be getting the template to open an XTerm (or whatever tool you want to use to do the modifications), rather than to have it just create disp666 for you and open the tool in that (useless for present purposes). Since I don’t know what your menuing system looks like I can’t necessarily help. (If you’re on KDE, it will be labeled "Template (disp): "). I simply don’t recall what the xfce menu calls that, and I think you might have to enable it to even show up with a special flag in qvm-prefs or qvm-features.

On the command line, though, you can type "qvm-start " then go to the blue qube (qui-domains tool) on the menu bar, select it and open a terminal. You’ll actually be in the template; changes made there will persist in disp9876 qubes and you should be able to do your xen wizardry there.

Well I think it’s now time to say what are you trying to achieve.

I want to change the cpuset

It doesn’t work.

Custom libvirt config

I think the config is only applied if the domain name match, and disp1234 is randomly generated everytime.

I can change the global xen.xml file that change is applied to the disp1234 qubes.

Whoops. I didn’t anticipate that whatever it was you were doing would expect a hard-coded qube name.

Is there some way you could install this stuff on starting the qube in a script?

I got it to work with using jinja in the xen.xml file, for my use case it’s much easier to use jinja than the by-name approach.

1 Like