diff --git a/customization/dispvm-customization.md b/customization/dispvm-customization.md index 00ff06db..39160125 100644 --- a/customization/dispvm-customization.md +++ b/customization/dispvm-customization.md @@ -57,6 +57,60 @@ It is possible to change the settings for each new Disposable VM (DispVM). This 4. Shutdown the qube (either by `poweroff` from qube's terminal, or `qvm-shutdown` from dom0 terminal). +### Using static Disposable VMs for sys-* ### + +You can use a static DispVM for `sys-*` as long as it is stateless. +For example, a `sys-net` using DHCP or `sys-usb` will work. +In most cases `sys-firewall` will also work, even if you have configured AppVM firewall rules. +The only exception is if you require something like VM to VM communication and have manually edited `iptables` or other items directly inside the firewall AppVM. + +To create one that has no PCI devices attached, such as for `sys-firewall`: + +~~~ +qvm-create -C DispVM -l red +qvm-prefs autostart true +qvm-prefs netvm +qvm-prefs provides_network true +~~~ + +Next, set the old `sys-firewall` autostart to false, and update any references to the old one to instead point to the new. +For example, with `qvm-prefs work netvm sys-firewall2`. + +To create one with a PCI device attached such as for `sys-net` or `sys-usb`, use the additional commands as follows. + +**Note** You can use `qvm-pci` to [determine](/doc/assigning-devices/#r40) the ``. +Also, you will often need to include the `-o no-strict-reset=True` [option](/doc/assigning-devices/#r40-1) with USB controllers. + +~~~ +qvm-create -C DispVM -l red +qvm-prefs virt_mode hvm +qvm-service meminfo-writer off +qvm-pci attach --persistent dom0: +qvm-prefs autostart true +qvm-prefs netvm '' +# optional, if this DispVM will be providing networking +qvm-prefs provides_network true +~~~ + +Next, set the old `sys-` VM's autostart to false, and update any references to the old one. +For example, `qvm-prefs sys-firewall netvm `. +See below for a complete example of a `sys-net` replacement: + +~~~ +qvm-create -C DispVM -l red sys-net2 +qvm-prefs sys-net2 virt_mode hvm +qvm-service sys-net2 meminfo-writer off +qvm-pci attach --persistent sys-net2 dom0:00_1a.0 +qvm-prefs sys-net2 autostart true +qvm-prefs sys-net2 netvm '' +qvm-prefs sys-net2 provides_network true +qvm-prefs sys-net autostart false +qvm-prefs sys-firewall netvm sys-net2 +qubes-prefs clockvm sys-net2 +~~~ + +Note that these types of DispVMs will not show in the Application menu, but you can still get to a terminal if needed with `qvm-run gnome-terminal`. + ### Adding programs to Disposable VM Application Menu ### For added convenience, arbitrary programs can be added to the Application Menu of the Disposable VM.