Private.img not following through from templates

I have been trying to find something regarding this issue but I can not yet find anything and this is an issue that is bothering me.
I have been using Qubes for years now and I have been wondering why this was never working and I thought it was just a bug my end, but it has never resolved itself.

When I create a template I alter it just fine for the root image. Then I add things to the rc.local script on the private image to install things in folders and perform actions.
As a developer I have one virtual per client that I do coding for, to keep everything separate.
Since i perform installation of certain applications every time I start the virtual based on what I’m doing, it isn’t working.
I then found out that the template private.img isn’t cloned over when creating a new AppVM.

Why is this not cloned over when it is a part of the template itself?
Can it be added to the clone procedure so that it can be done automatically?

It could be just a checkbox to say “Clone the private image” if that would be beneficial. But why it doesn’t clone the whole template I don’t know, is this just a bug?

It was an intentional change in R4.0, see the long discussion in #1335 for context (starting with this comment).


See also: Inheritance and persistence

1 Like

Well that is just stupid, it’s a TEMPLATE for a reason…
If you are not going to have the /rw/config folder copy over that does all the configurations for the template itself, that’s rhediculous…
But if it doesn’t copy over that template, then it shouldn’t have a private.img to copy over to create at all, because it doesn’t actually have a template.

So where does it actually get it’s template from for each virtual?

Why would the private.img have things that shouldn’t be in the AppVM?

that whole discusison of things is stupid too.

I mean they say " * New VMs will not inherit that private.img at all - will start with empty one"

But they start with one that has stuff in it, it isn’t empty. It’s a template.

The whole point of a template is to be a template, then the Appliance Virtuals are alterations of the template.

So my statement and query is still 100% true.
Can there be a checkbox to enable private clone from the templates to newly created VMs ?
One in the virtual creation window, and one in the main settings to set it on or off as a default.

My templates are templates, not separate workstations on their own.

So, can it be done?

about being respectful

That was a singular way to address people before asking for their help.

As strongly as you might feel about the adequacy of technical decisions, please remember that you agreed to abide by the forum’s community guidelines when participating in it, and that the spirit of the document is to enable respectful conversation.


I did nothing that violates those guidelines.
Please know the guidelines and don’t have a knee-jerk reaction just because you disagree and react to the TONE of my post.

moderation note

Your original response is restored but you should take the advice given to heart. Calling things stupid and ridiculous in your second post ever to the forum is very unlikely to make people consider your ideas.

So if you are actually interested in achieving something, I’d try a different way of communicating.

The CoC does cover behavior that would reasonably be considered inappropriate in a professional setting. You are hard on the line there.



I have read the FAQ, ToS, Policy and all many times in the past.

What I was doing was not in breach or anywhere close to breaching them.

I admit that some people might have thought to take offence to something, but the fact is that anything that is said could be taken as offence, even saying “hello” is offensive to some people and very inappropriate.

Telling the truth and giving my opinion is just the way it is.

But my behavior is not anywhere considered “inappropriate” in a professional setting.

However, if it was a personal attack or anything like that then it could be considered inappropriate in a personal environment.

As far as the T&C and Policy go, I did nothing even close to wrong.

I appreciate the advice and will in future be more careful to accuratly target things better.

Of course it’s possible. The point is that you would need to argue for it and convince the team to do it – or do it yourself, submit a PR and then still argue successfully for why that’s a good idea. In that context it’s probably more productive to be respectful of previous choices and show why your idea is better. A good idea there would be to study the discussion that lead to the original design decision and then show how your argument differs from anything that was previously discussed and decided against.

The "correct"™ way currently would be to use /etc/skel to stage all the things you want to be copied into the /home directory by default. Of course, if you want stuff in /rw/config you’d probably need to have some script in your home directory that puts that in place (once).


Okay, well, it isn’t much of an arguement about it since the code already exists for it.

But /etc/skel is for all the virtuals, yes? not just the ones that I want them for.
So having only 1 isn’t good as I need them different for each virtual type that I would make.

like one for Fedora, one for Debian, one for Windows, one for Devuan, one for ArchLinux, etc…

So that isn’t very practical?
Anyhow, ther eis only .bash_logout , .bash_profile and .bashrc in that directory. So that isn’t very good either, since it doesn’t have anything in it for the /rw/ folder.

So modifying the actual details for templates makes things harder.

Where would I put the things for the base template of /rw/ ?

How would I contact someone to get options added into the VM creation to also clone the private.img file over?

/etc/skel is a Linux thing: a template for newly created /home directories. You could find that out easily by using any search engine. My previous reply already included the consideration of /rw.

There is no one you would contact to get options added. You argue for it here in the hope to convince first someone to implement it and then the project lead to accept that change. That is extremely unlikely since it appears to be a settled question.

Nothing stops you from understanding the code and patching your personal install to behave the way you would like.

Why can’t you add the script to the template and run it with systemd?

Exactly, it’s only for the /home directories, and it’s for ALL of the templates including Dom0? Or is it just for the Fedora? And the Windows? and the Debian? and the Kylix? And the Devuan? And the RedHat? And the CentOS?
Is that one folder for all those templates?
Using a search engine does not give me the details that I’m asking for, so that is why I was asking you.
If I had gotten my answers from a search engine or elsewhere on these forums then I would not be asking.

So perhaps my query was not accurate enough for you to be able to grasp what I was asking?

So I’ll ask it this way…

  • You have the /etc/skel folder.
  • Is this folder for all virtuals or only for one?
  • I put in there a script that will run every time a new virtual is created and run for the first time.
  • Will that script run on every virtual or is that only for a specific one?

Does that make more sense?

Because not all variants will run the script from the base template.
Not all will have to run it.
I hate Microsoft SystemDestroyer

Good enough reason?

I can’t tell whether you are talking about different templates for these different operating systems.

If you are, then that piece of the problem is solved. Set up your debian template one way, your fedora template another, etc., in /etc/skel.

Beyond that, if you have (for exampl) two different ways you might want a Debian AppVM to be set up, you’ll likely need two different templates. Life might be easier if you create a debian template with software installed but no configuration, then clone it twice and put different configurations on each. At least it saves you having to install things multiple times.

Unfortunately I don’t have that much storage space.
If I had that much storage space then I would be looking at doing that.
But the templates are huge in size, towards 6 GB…
The -min- templates don’t have networking or functionality.
The main templates, I try to remove the bloatware and it tries to remove all of Qubes that is built into it for display and everything.

This is why I wanted to have things set up differently per template just using the /rw/ directory and have scripts in there that can run whenever the guest starts, and set up by the main template.

So I just want a template to be a template, not only half a template.

One option in the manager is all that it takes, and un comment some code that used to be there… I’m not asking for anything difficult as it’s already built and exists. The only thing that needs to be added is a checkbox… And an option in the settings to have that as a default to clone from the templates when creating an AppVM using that template.

If the coding had any semblence of logic and flow then I’d be able to follow it and find out what is going on and do it myself. But I think it’s easier for those that coded it to do it.

It’s part of the OS in the template. There is nothing Qubes OS specific about it. It’s Linux.

Again, I feel like the very basics are not understood. /etc/skel is a Linux mechanism for newly created /home directories. You can put in there whatever you like (including a script that runs automatically, does something and then deletes itself).

Obviously that won’t help you with Windows.

Maybe read this.

1 Like

You can use qvm-service to only have it run in qubes where the service is added to the Services tab in the qube settings.

Well I can see that noone here can help with my query at this time.

I look forward to the time when there will be someone who knows plenty about Qubes who can answer the query.

I appreciate the attempts to answer a question that was not my question that provided insignt, but not the answer.

Sven, the skel directory did nothing. I’ve tried it so many times, but nothing.
But, in my research, all I can reall ydo is manually create the guest MANUALLY, edit the XML MANUALLY, then clone the drives MANUALLY… What’s the point of the “qubes-manager” that absorbs sooo many resources again?

Anyway, Hopfully one day Qubes will work better again in the way of development and advancement.