Any drawbacks to enabling `custom-persist` in TemplateVMs?

Would there be any drawbacks to enabling custom-persist in TemplateVMs? As far as I can see it, it would have the marginal benefit of cleaning up the private storage in TemplateVMs. While having probably only an extremely marginal security benefit, it also seems “right” in that the TemplateVM would only persist its rootfs (even though the private image doesn’t get replicated to AppVMs).

I’ll try it myself but maybe someone already has experiences and could save me from accidentally blowing up a TemplateVM.

Hm. Good idea, didn’t know this exists. The private volume of a template VM is then thrown away after shutdown? I’ve never given this much thought.. Why is this not the default?

How do you enable this?

I think to say this is a security benefit is far fetched - its essentially irrelevant, I’m just surprised that this isn’t the default. I see zero reason to keep it from an admins perspective…

Is the TemplateVMs private volume used as a template when creating a StandaloneVM from a TemplateVM?

qvm-clone --class=StandaloneVM clones the ‘private’ volume from the TemplateVM to the StandaloneVM.

qvm-create and the Create New Qube GUI use a new, empty ‘private’ volume for the StandaloneVM.

Ah ok. Thats why templates have a persistent /home?

If you “turn this off” (I don’t know how, but @Atrate suggests this is possible) then it gets.. which home?

No, it’s just normal for a VM to have a ‘private’ volume. If the VM is a TemplateVM, you can put stuff there that’s useful for maintaining it, but that you don’t want inherited by AppVMs.

Ah. Hmk. I can not think of a usecase of wanting to have anything in the /home dir of a templateVM other than having that same /home in a standalone vm that I later create from it..

I actually use this in “kuhbs” (my enduser focused qubes os config management system I’m working on) that way:

  1. clone debian-13-minimal into tmp-sta-tpl-foobar
  2. do things in tmp-sta-tpl-foobar, may it be in the root or the home volume
  3. kuhbs supports “instances”, as in if I want to have 3 standalone VMs for slightly different purposes (hermes bots for example) that all need the same setup (install hermes + 10k apt packages)
  4. qvm-remove tmp-sta-tpl-foobar

This is the only usecase I can think of. But ok, I mean it really is mostly a fun fact.

@Atrate stated: “enabling custom-persist" - how do you enable that and does it do that exactly? Keep /home ephemeral on TemplateVMs?

@Atrate

I had a thread related to private volume of TemplateVMs some time ago. In case you are interested in what fellow members answered:

Alright. It seems there are drawbacks to enabling custom-persist in TemplateVMs and it’s an actual information leakage bug: Custom-persist can cause TemplateVM's private volume to be used as AppVMs' private volumes · Issue #11054 · QubesOS/qubes-issues · GitHub