From dcf0a1f302c7668499c963f8224420bf7e92b941 Mon Sep 17 00:00:00 2001 From: awokd <34515595+awokd@users.noreply.github.com> Date: Mon, 30 Apr 2018 10:07:59 +0000 Subject: [PATCH] add static Disposable VMs for sys-* --- customization/dispvm-customization.md | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/customization/dispvm-customization.md b/customization/dispvm-customization.md index 00ff06db..2bae0c1a 100644 --- a/customization/dispvm-customization.md +++ b/customization/dispvm-customization.md @@ -57,6 +57,42 @@ 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. +`sys-firewall` will not work unless you have no custom rules set, because per VM rules are stored in a configuration file inside that AppVM. +To create one: + +~~~ +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 VMs that referenced 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 +~~~ + +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.