How to delete or upgrade app VMs?

50 views
Skip to first unread message

Kyle Breneman

unread,
Feb 20, 2018, 11:48:24 PM2/20/18
to qubes-users
I'm running Qubes 3.2.  I have the default Fedora 23 template VM, and the default app VMs built from it, but I also installed a Fedora 26 template VM.  Now I want to delete or upgrade my Fedora 23 app VMs, but I cannot figure out how to do this.  The "Delete VM" menu option in the Qubes VM Manager always seems to be grayed-out.  How can I either delete these app VMs based on Fedora 23, or switch them over to my Fedora 26 template?

Regards,
Kyle

Andrew David Wong

unread,
Feb 21, 2018, 1:25:10 AM2/21/18
to Kyle Breneman, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Does this help?

https://www.qubes-os.org/doc/templates/fedora/#after-installing

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEZQ7rCYX0j3henGH1203TvDlQMDAFAlqNELUACgkQ203TvDlQ
MDDjCBAAuCHhRevjEfHIRhSkpTs6QIh8c8BBy+dWceVM14Qu24187j6hZ5OedsJZ
QVoP00tdW+xRZfnroW15f9Rzb5MPWQp/RW84rESGVBt1f7mCwzwR1aLRa7ivBPWf
+idL5WdJIMAYrCTAaI7zksPFfYrgK9tSgmULVqrkOkpYI3K24/N8JZyRmRJc6GEU
O6+8pprFykzoRE2pvSL0J1Vg24a4paYyuaKTT1wHBqkHg87Sm42amueTQUkXP8p7
d1hQ0JHyfMma53Qv2taA0l1K9WR9ifB+HH5dc0w5d7KUvc5Bs0fr5ed/5vim75fX
HyJn5P/wugaaw0+vBwU381WkCYuq/tB/HLPDirsDjK0iX9hkh6/McDZ7uD0mWmCH
NZnHKjifEkF57P5wNLVFaz90q6YfrGnyS8jJKNEopcurZOtpd0wHKnW7eh/0iO6H
EEeYkJ5M309AvFFWLE1UDHfCuPgTll/l3WB+SzUTGeF9wq7JP6RlsT02at7kXCHt
mAxfycSJ6b3B35XxBdqVmUKo9jB/XwjgGOT/RJGU/w9PxXcgmI7yR8oOXPtopH7v
HKR/dwSHlMfox+tAzAf2SFE7KIwr3JtEjcrLDP0+fDrW3QnK0zhdC5R7jXI//cwM
bFQ7jKlS8wI1ZEOYZw2oBWm72nkFO0uIt8A+60mxdq4/zY++FPg=
=Xrgv
-----END PGP SIGNATURE-----

Yuraeitha

unread,
Feb 21, 2018, 10:12:39 AM2/21/18
to qubes-users
uh, that guide confuses even me who knows the steps >.< not everyone think the same way, so I'll put a different perspective below.

In broad sense, there are two major steps you need to do, which won't take long.
- Change (untie) any AppVM's that use the template, to your new template.
- Then, and only then, can you delete a template once it's untied from any AppVM''s.

It's that easy, pretty straight forward. But be warned not to confuse when to use dnf remove and qvm-remove, more on that below.



On how to do this;
Right click on desktop and open your dom0 Terminal, write in "qvm-ls", drag the window a bit larger so you can better see the table. Any AppVM's still using the old template will show here.

Once you're done moving templates over to your new template, write in dom0 "Qubes-Global-Settings"and check if the old template isn't being listed here, if it is, change it to the new template instead.

Default system templates, which include both does pre-installed or the ones you download with the command you used, can be removed with "sudo dnf remove qubes-template-fedora-23".

It's here very important that you distinguish between dnf remove and qvm-remote, as it can mess up your system. Only use qvm-remove on regular AppVM's or cloned templates (cloned templates, the ones you cloned and copied yourself). Qvm-remove may also be needed on some standalone VM's, but it's a less frequent situation.

In order to remove a default template, such as fedora, debian, whonix, you need to use the dnf remove command, but first, you need to completely untie your old fedora version, as shown above. If you're unsure how to untie them, it's pretty straight forward, just go to each VM's GUI Settings, and change the template in the first tab window, and that's it. You may want to verify if the AppVM works before you delete the old template though.

Qubes is very modular in this sense, it's a smart build. Simply by untying to the templates, and it'll become delete-able.

Kyle Breneman

unread,
Feb 22, 2018, 9:00:51 PM2/22/18
to Andrew David Wong, qubes-users
Yes, somewhat, but I found #7 on this page more helpful.  I've almost gotten everything configured the way I want, but one thing still puzzles me.  I used "sudo dnf remove qubes-template-fedora-23" from the terminal (mistakenly did this before deleting/switching all app VMs that depended on it), but apparently that didn't completely remove fedora-23 template VM because even after several restarts the fedora-23 template VM is still showing up in the Qubes VM Manager.  How can I get rid of it for good?

Regards,
Kyle

Kyle Breneman

unread,
Feb 22, 2018, 9:02:53 PM2/22/18
to Andrew David Wong, qubes-users

Yes, somewhat, but I found #7 on this page more helpful.  I've almost gotten everything configured the way I want, but one thing still puzzles me.  I used "sudo dnf remove qubes-template-fedora-23" from the terminal (mistakenly did this before deleting/switching all app VMs that depended on it), but apparently that didn't completely remove fedora-23 template VM because even after several restarts the fedora-23 template VM is still showing up in the Qubes VM Manager.  How can I get rid of it for good?
​See link in first line.  I forgot link the first time I sent this.​

Andrew David Wong

unread,
Feb 23, 2018, 3:22:39 AM2/23/18
to Kyle Breneman, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2018-02-22 20:02, Kyle Breneman wrote:
>> Yes, somewhat, but I found #7 on this page
>> <https://www.qubes-os.org/doc/template/fedora/upgrade-23-to-24/> more
Try this:

https://www.qubes-os.org/doc/remove-vm-manually/#how-to-remove-a-templatevm-manually

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEZQ7rCYX0j3henGH1203TvDlQMDAFAlqPz0EACgkQ203TvDlQ
MDDNHg/+N7nL72Oq9NhkPu7Or5uqgSEFF7mlFU5jCqmV6M/+t29sBAXK5f8sRrZ0
7MWuTq1y+foJTD2ENnD2N0s++LtnH87xC3tubcnCsTipNve92JGINbTDz4AtRRvK
qNw7Z5DGCjW74CE1qxoOitHpPoNozyjlQ1WsxXjubIzryWGXgcpVMFA4RK1JILN/
1/v1emEGD7+RgpUmTy8uN3OXxxSzV6ZY3T5o2EsG2gWIZdb9EchPS+h9thK4mJsq
9CBmdAzmoMsS6wqeGu3rTAdhKTrJpDhUk1iicSGdQELB/qCLNBQaunqpzdHgVwad
XPf/ksGz5xknc3WYmgEvshhXcDUlgBMISRb3mL6lTIzcGZ7wIVls9M11nVLfq+Dv
lkHt6smQNZrZThZPSTN+fWKty1PJJvYsxwhmys4PX1/tr3/oUp4NfAcePrV3xnzZ
JKABfs29MSO6ctn3Tr1eagBhjsbfS+liQGF4+V6n0gCPikYcZ6Ux0/3hCpZWBmxF
3DHOFmggfRJMjclMLvvOPnaUw5A/VyPT+ZdpAH6NHFwya7TiqQMd5AAvBOkckus8
PfYPMb5ivOlZQKgf53QU+09ca9upXbDlz0dwX6TrrKtnU7Zt/P+/eBXz2LlkexNt
91nN17KVU5ezZuCMS+dtqxv8o2SUeiaXjxg0tuiJmSw+ERUxrY4=
=mCfK
-----END PGP SIGNATURE-----


Yuraeitha

unread,
Feb 23, 2018, 1:44:04 PM2/23/18
to qubes-users
It's an issue someone else encountered in the past, somewhere on these mail threads, at least a good couple months back if memory serves. I thought it had since then been made impossible by now to remove the template prematurely? But it seems not. In this case, you can now only remove it manually once the damage has been done. At least to my knowledge about it. The link Andrew linked should do the trick.

Currently there is not enough redundancy to prevent mistakes such as premature removal, or mixing up qvm-remove and "dnf remove", which both can cause mayharm.

Is this something that's been put on github tracking issues/features? anyone knows?

Unman

unread,
Feb 23, 2018, 2:03:55 PM2/23/18
to Yuraeitha, qubes-users
I dont think it is possible to mix up qvm-remove and dnf remove. You
cannot use qvm-remove on a template installed using dnf, and dnf remove
wont do anything on a cloned template.
Also, isnt there still a warning if trying to remove a template which
has qubes using it? If not, that's a bad regression. I'm sure there was.

Does the template still appear if you run 'dnf list *template*'?
If a template remains, I would first try dnf-remove again and note the
response.
Then manually remove it , if that hasnt worked and errors cant be fixed,
but that sounds like a dnf issue.

Yuraeitha

unread,
Feb 23, 2018, 5:22:56 PM2/23/18
to qubes-users
Now that I read your post, I'm actually unsure which one of two scenarios it was that happened for this user posting some months back, it was either (qvm-remove on a rpm installed template that went through without being stopped), or it was ('dnf remove' which removed the template despite there still being AppVM's and system processes tied to it). Frustratingly I don't remember which one it was, it's been too long now.

I remember the user who had issues with this (one of the two scenarios above), was an issue that wasn't possible on Qubes 3.2., and that it was a issue that only happened on Qubes 4, at least at the time.

I tried looking for this thread, but I can't find it. It'd be best to link to it as a source before making claims like these, to which I'm sorry but I can't find it.

It also doesn't seem very safe to test this on ones own system to verify, unless one has the free time and knowledge to undo any harm it does, so I'll refrain from testing it out. Maybe it's a thing to test if one is planning to re-install anyway, as a last thing to do before shutting down? It'd be good to know what is possible and was isn't possible, in order to help others avoid the situation.
Reply all
Reply to author
Forward
0 new messages