Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disposable qubes to be based directly on regular templates #6720

Open
ninavizz opened this issue Jun 19, 2021 · 8 comments
Open

Allow disposable qubes to be based directly on regular templates #6720

ninavizz opened this issue Jun 19, 2021 · 8 comments
Labels
C: core P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. ux User experience

Comments

@ninavizz
Copy link
Member

The problem you're addressing (if any)
Today a user must create a "Disposable Template" from an App VM.
It is well understood why a user may desire that, but it feels odd to be forcing it.

Describe the solution you'd like
Allow users to create Templates that are only to be used to spawn Disposable qubes from.

Where is the value to a user, and who might that user be?

  1. Users new to Qubes OS and learning its ecosystem
  2. It feels a bit silly to have to create at least one Template and one App Qube, to be able to have a Disposable Qube. Again, for the use-case where a user would desire having a Disposable Qube spawned from an App Qube for unusually sensitive things, it's awesome that this capability exists! It's just breaks an intuitive mental-model of how Qubes works, to shoehorn today's dependency on an App VM intermediary as a requirement.

Describe alternatives you've considered
Nope

Additional context
From a private conversation with @marmarek:

"One corner case (not a blocker for the idea) is what to do about template's private disk. Currently template's private disk is not share with anything based on it. On the other hand, DispVM does get snapshot of its template private disk (which is that intermediate app qube right now). If we're going to remove that intermediate qube, we need to decide: should DispVM get always clean private disk in this case, or should template's private disk be no longer that private?"

Relevant documentation you've consulted
Nope

Related, non-duplicate issues
Nope

@ninavizz ninavizz added T: enhancement P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Jun 19, 2021
@andrewdavidwong andrewdavidwong changed the title Allow Disposable qubes to be based off of "Template" template qubes Allow disposable qubes to be based directly on regular templates Jun 19, 2021
@andrewdavidwong andrewdavidwong added this to the TBD milestone Jun 19, 2021
@unman
Copy link
Member

unman commented Jun 21, 2021 via email

@ninavizz
Copy link
Member Author

ninavizz commented Jul 2, 2021

@unman The goal for this issue is to make the entire ecosystem of how qubes work within Qubes OS, easier to understand and more straightforward. To better inform the total mental-model of how Qubes works—without zeroing-in on one specific type of qube, to the possible exclusion of smooth comprehension of the broader system. Likewise, to make the persistence properties of app-qubes-as-templates an option, and not a forced attribute.

As a user new to Qubes, it also feels incredibly strange that a qube serving in the functional role of a disposable template must be an app qube, by type. The persistence properties of an app qube functioning in the role of a disposable template, is great—but it should be optional. Why is it forced?

I don't want to muddle any mental models. Quite the opposite. But, if I don't desire the filesystem persistence property of an app qube, I should be able to base my Disposable Qubes off a proper Template.

@marmarek
Copy link
Member

marmarek commented Jul 2, 2021

The need for a Disposable Template (being App qube) in between is only to customize files in default user home dir for Disposable qube, while not adding yet another full template that needs to be updated uses disk space etc. While architecturally it correct thing to do, UX-wise it is confusing - why for this particular role a template is app qube? And in fact, unless the user want to customize something in the disposable qube, there is no really need for this intermediate object.

So, adding an option to TemplateVM (type) being a template (role) for a DisposableVM simplifies the (common) picture. The other option (with "disposable template" in between) will remain there, for those who do want customized disposablevm - but that is part of "advanced configuration" that can be expected to require a bit more knowledge, compared to simple usage of "get me a DisposableVM with Debian/Fedora/Whonix/whatever".

@unman
Copy link
Member

unman commented Jul 2, 2021 via email

@SvenSemmler
Copy link

SvenSemmler commented Jul 2, 2021 via email

@marmarek
Copy link
Member

marmarek commented Jul 2, 2021

I would appreciate if a template's /rw aka 'home' would be applied to a brand new qube based of that template. Currently I work around that by having a 'setup_qube' bash script I run after creating every new qube to setup the 'home' directory the way I want.

The canonical place for initial home directory content in Linux (that works in Qubes too) is /etc/skel. See also https://www.qubes-os.org/doc/templates/#inheritance-and-persistence

In the "Create new qube" dialog one could add "Disposable qube based on a template" as a type. The user can then choose a template (e.g. Fedora) and give a name. As a result the UI then creates an AppVM with that name, sets template_for_dispvm to true and the appmenus-dispvm feature.

Indeed this is a good idea too. It's still a bit more complex when it comes to manage it (especially when switching to another template - like fedora-N to fedora-N+1), but maybe that could also be solved at UI level.

@SvenSemmler
Copy link

SvenSemmler commented Jul 2, 2021 via email

@zellchristensen
Copy link

I was about to start an issue about the inability to create a new disposable qube based on the debian-11 or other templates as they don't appear in the drop down list but after reading the thread here I understand the reason why being I have no debian based appVMs. Also all the issues here are regarding R4.1 (both rc1 and rc2).

I have to agree that the way disposable templates are handled currently in the UI is a bit confusing.

A standard install creates default DVMs based on whonix-ws and fedora as well as a default-mgmt-dvm. (I assume it makes a debian one if debian is selected as the default during initial install instead of fedora but I haven't tried it yet.)

The fedora and whonix-ws DVMs both list the main templates as the template they're based on and not any appVM.

In addition, every full Template has the Advanced >> Disposable template checkbox unchecked and the option cannot be checked in any full template (Invalid property 'template_for_dispvms').

However, using the UI to manually create a new DVM based on another template to mirror these is impossible because as soon as DisposableVM is selected in the drop down menu, all full template VMs are removed from the list. Only the fedora-dvm and whonix-ws-dvm qubes are shown.

The drop down list is another element of confusion as both the fedora and whonix-ws DVMs have the Disposable template checkbox checked (makes sense) but the default-mgmt-dvm also has the checkbox checked while it is not displayed in the drop down list. I'm sure there's a good reason why, but it's not obvious why from the UI.

Another issue is that the default system created DVMs actually list all the full templates in their settings menu and can be changed to any existing template. This allows the user to at least clone one of the default DVMs and then change to another template without the appVM creation or checking the Disposable template checkbox anywhere.

The differences between the default system created DVMs and manually created DVMs is the main source of confusion for me at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. ux User experience
Projects
None yet
Development

No branches or pull requests

6 participants