How does Qubes work: DVM Reboot does not impact disp from DVM

Wecome @onisec!

If I understand correctly what you wrote, I think you’re correct!

This is how the inheritance chain for disposables works:

  1. The template (templateVM) is like any other template (no network, etc), and its role is mostly to provides the system directories
  2. A “regular” VM (appVM) based on that template has a special option enabled to become a template for dispVM. That allows it to be used as a template for disposable VMs. It provides them with its home directory (and the system directories that it itself got from the templateVM, does that make sense?)
  3. A disposable VM (dispVM) that is created using the appVM as a template

Now, when you want to update a regular appVM after making changes to a templateVM, you need to shutdown the templateVM and restart the appVM.

Similarly, when you want to update a dispVM after updating the appVM that it originates from, you need to shutdown the appVM and restart the dispVM.

Depending on what you want to add or remove from your dispVM, you might end up, for example:

  1. installing a package in the templateVM (since that modifies the system directories, it must be done in the templateVM if you want the changes to be persistent)
  2. shutting down the templateVM
  3. restarting the appVM (if it was running) so that it is updated with what changed in its template
  4. starting the appVM and configuring your new app (assuming that config gets stored somehwere in the /home/user directory)
  5. shutting down the appVM
  6. (Re-)starting the dispVM (which now contains both the new package and the config, respectively from the templateVM and the appVM-that-is-a-template-for-dispVMs) Pfeww! :sweat_smile:

I answered a similar question with a little “drawing”, that you might find useful:

And here is the relevant section of the Templates (Inheritance and persistence) documentation:

3 Likes