will uninstalling a base template delete a clone of the template?

40 views
Skip to first unread message

cybe...@national.shitposting.agency

unread,
Nov 25, 2017, 11:31:35 PM11/25/17
to qubes-users
I recently made a kali template vm by cloning the qubes debian 8 template and converting it to kali.

If I were to remove the base debian 8 template from dom0, would this also remove the cloned kali template vm?

Yuraeitha

unread,
Nov 26, 2017, 4:26:58 AM11/26/17
to qubes-users
On Sunday, November 26, 2017 at 4:31:35 AM UTC, cybe...@national.shitposting.agency wrote:
> I recently made a kali template vm by cloning the qubes debian 8 template and converting it to kali.
>
> If I were to remove the base debian 8 template from dom0, would this also remove the cloned kali template vm?

I imagine it's possible to see directly if your kali is acting like a debian-8 template, despite being converted to kali. I'm not entirely sure how to go about that though, maybe wait till someone can answer this possibility.

As far as I know though, it will yes. But I'm only almost sure, someone might say otherwise. Just, don't take the risk unless you're ready for the possibility of loosing it.

qvm-remove should remove specific VM's, while dnf remove should remove all of the templates and copies thereof.

You could however perform a hack, and make a backup of your template. Then ensure the integrity of the backup, and then throw yourself into deepwater and see if you can remove only one of them. If the other also goes, then you can rely on your backup to return it.

Just be sure to have multiple of backups for anything important data. Though templates shouldn't be much of a loose for you if it turns out badly? I mean, you can just re-install all the app's you require in a fresh new template.

I.e. 'qubes-dom0-update qubes-template-debian-8' would re-install your debian 8 template if it is lost, and then you can just re-install all your apps in a whole new fresh template.

So that's 3 different approaches. Also you would need somewhere to temporary put your AppVM template in your AppVM settings, i.e. debian-9 maybe if you got it installed? Then just don't start it until it's back to debian-8 template. Possibly you can use a fedora temporary template too, since if you don't start it, then ""nothing should"" be changed in the home folder.

Just be very careful and have redundancy backups if you're doing this on anything important.

Perhaps, the better question is why do you want to remove debian-8? Is it to gain drive space? Maybe there are other solutions you can have a look at for that, i.e. checking if trimming is working as it should.

In Qubes 3.2. trimming is manual, in Qubes 4 it's supposed to be automatic. Which Qubes are you on?

Chris Laprise

unread,
Nov 26, 2017, 4:38:03 AM11/26/17
to qubes...@googlegroups.com
On 11/26/2017 04:26 AM, Yuraeitha wrote:
> On Sunday, November 26, 2017 at 4:31:35 AM UTC, cybe...@national.shitposting.agency wrote:
>> I recently made a kali template vm by cloning the qubes debian 8 template and converting it to kali.
>>
>> If I were to remove the base debian 8 template from dom0, would this also remove the cloned kali template vm?
>

The answer is No. Cloned templates are not dependent on each other.

If you have appVMs dependent on the debian-8 template, you'll have to
re-assign them to another template before you do the removal.

--

Chris Laprise, tas...@posteo.net
https://github.com/tasket
https://twitter.com/ttaskett
PGP: BEE2 20C5 356E 764A 73EB 4AB3 1DC4 D106 F07F 1886

Yuraeitha

unread,
Nov 26, 2017, 5:12:30 AM11/26/17
to qubes-users

Are you sure? or was it maybe changed in between older Qubes and current perhaps?

Also you're making a distinction between "qvm-remove" and "dnf remove" here?

Unman

unread,
Nov 26, 2017, 8:38:44 AM11/26/17
to Yuraeitha, qubes-users
Chris is absolutely right, and this is not dependent on Qubes version.

The difference between qvm-remove and dnf-remove is that you cannot
remove a template installed using dnf by qubes-remove.
SO if you have a base debian-8 template installed using
qubes-dom0-update or at original install, then you must remove it using
dnf remove.

If you have cloned a template you can remove the clone using qvm-remove,
but NOT dnf remove.

As Chris says, you must make sure that you have no appVMs using the
template you want to remove before you remove it. This applies whether
you use a clone or not.

unman

Unman

unread,
Nov 26, 2017, 8:39:25 AM11/26/17
to cybe...@national.shitposting.agency, qubes-users
On Sat, Nov 25, 2017 at 08:31:35PM -0800, cybe...@national.shitposting.agency wrote:
> I recently made a kali template vm by cloning the qubes debian 8 template and converting it to kali.
>
> If I were to remove the base debian 8 template from dom0, would this also remove the cloned kali template vm?
>

The short answer: NO

Yuraeitha

unread,
Nov 26, 2017, 11:00:07 PM11/26/17
to qubes-users

aha, so the qvm-remove is there to handle the clones or backup-restoed VM's, and not just intended to be a single VM removal tool in regards to templates. While both understandings are similar, the slight misunderstanding in the variation between the two, can have quite the difference in certain impacts, indeed.

It's not that I have any doubts in what you said, but I had to go and try it out on a custom installed fedora-26 template, in order to beat the misunderstanding out of my self by doing it in practice. Cloned the template I planned to remove, and performed a "sudo dnf remove qubes-template-fedora-26", which indeed only removed the fedora-26, and left alone the clone thereof.

Essentially I had to beat it out of my self, because the other understanding between the correct way of seeing it, and the wrong way of seeing it, are so close to each others that it can be tricky to make a lasting distinction. It seems so counter intuitive once the wrong interpretation has taken root.

I wonder how such misunderstandings, or false interpretations, can be avoided among the people, like me, who are learning about Qubes (and Linux in general). But that's something for another time and topic, but an interesting one nonetheless.

Thanks for the clarification btw, you nailed this one.

Reply all
Reply to author
Forward
0 new messages