I want to make net cube disposable

Can I make net cube disposable after installation?

It’s indeed possible!

First, make a backup of your /var/lib/qubes/qubes.xml file. Then edit it so it contains a fragment similar to this:

<domain id="domain-6" class="DispVM">
<property name="autostart">True</property>
<property name="dispid">4026</property>
<property name="name">sys-net</property>
<property name="provides_network">True</property>
<property name="virt_mode">hvm</property>
<property name="default_dispvm"></property>
<property name="netvm"></property>
<property name="template">fedora-36-dvm</property>

Keep in mind that dispid must be a unique value in this file.
Save it, and reboot your machine.

If you mean sys-net, that qube is disposable by default in 4.1

You can make any qube in to a disposable just by setting qvm-prefs QUBE template_for_dispvms True - now the qube is a disposable template
Configure the qube as you will, and any disposable based on it will
inherit the configuration.

If you want disposables with a set name (like sys-net), it’s covered in
the docs

1 Like

Sys-net disposable by default? Somehow that didn’t happen with me, and I’m on 4.1. (I’m new enough to never have been on anything else.) Sys-firewall is a disposable (a named one–otherwise it’d be impossible to use it as a netvm), sys-net is not. (If it were, it’d likely have to be a named one as well, for the same reason.)

Still it’s good to know it can be done that way and it will work. I’m slowly converting every app cube on which I never store anything permanently (and that’s almost all of them) into a named disposable; I may even go unnamed in some cases.

1 Like