How to manually remove a VM?

178 views
Skip to first unread message

almigh...@gmail.com

unread,
Dec 18, 2016, 9:29:42 PM12/18/16
to qubes-users
So I made a HVM Template and renamed it through VM Manager, something went wrong and the VM Manager did not reflect the name change. (Can't seem to reproduce this bug)

I was just wondering if I've successfully removed the HVM Template manually. The process I went through was:

1. Remove template folder from /var/lib/qubes/vm-templates
2. Remove old template reference from VM Manager (or manually from qubes.xml)
3. Remove template's *.desktop files from ~/.local/share/applications

Is there any files I have missed? Also, perhaps a short doc with this would be useful for when things go wrong and a VM needs to be manually removed.

Thanks

Andrew David Wong

unread,
Dec 19, 2016, 1:03:06 AM12/19/16
to almigh...@gmail.com, qubes-users, Marek Marczykowski-Górecki
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2016-12-18 18:29, almigh...@gmail.com wrote:
> So I made a HVM Template and renamed it through VM Manager,
> something went wrong and the VM Manager did not reflect the name
> change. (Can't seem to reproduce this bug)
>
> I was just wondering if I've successfully removed the HVM Template
> manually. The process I went through was:
>
> 1. Remove template folder from /var/lib/qubes/vm-templates 2.
> Remove old template reference from VM Manager (or manually from
> qubes.xml)

How did you perform this step? Did you manually edit qubes.xml?

> 3. Remove template's *.desktop files from
> ~/.local/share/applications
>

I can't immediately think of anything else to remove. At any rate,
these should be the most important ones.

There's also:

qvm-remove --just-db <vm-name>

which only removes the entry from the Qubes Xen DB without removing
any files. What exactly does "Xen DB" refer to in this context, Marek?

> Is there any files I have missed? Also, perhaps a short doc with
> this would be useful for when things go wrong and a VM needs to be
> manually removed.
>
> Thanks
>

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

iQIcBAEBCgAGBQJYV3gLAAoJENtN07w5UDAwzQAP/2mHEAZRHbCJDWvUB+MQ8QFt
oECgQ/sDRQOY9W1j6FPaVLAgCtFFUHFeBvbjezFTddutOqh4Y+s8Z+CiDu0gFQ99
LuDg+JhQc84ibGz+5YvZUJW2YROtKNY/mVwBsNw8BlFjlsns3TmxQgmcjXMQOAXQ
vGiO3mbxDZRDZ/1v8DtW1hCtlLxb/slUQsBGKaiRxYLYSMR/jHNNsMX5WKw0iubH
J0S7Iae94R/inhthDWr5vAvtvTJZrkzih4QUoKszHBpqVFW1rZV8ewg8FUZAayGR
+zmXLHCtlMnAMruqQXY6xbNreF3sb4fAckpHzKCWhZ88QM0HRSeIBJeEjoP0xMa0
ABUWAWCnSg3EJ+5aQH8Cl6SOoCo/xmiArlVbpFMgh7ymuqI7++XbxXXSDrz6L5ZG
pRT8Gt3mf3Y4ymjDgh2e6StezQ2l2iXOg4rpG83IT2jwpb4vUiYukNj8zUKCLTdo
n1z2hDtA6v4CMz8X6wF7KLcqMR++XNIzaDCRCgMGB6xezhipw7jyIVJHYIODnY1Q
OB06ciLmmq0aCWFLJ2t2SLm11iBPkK5YryUZxmhe+Lr+i2b18IUaRCwi88+auyhO
WEz44PJqiJq32YU0FHWXDs6EncqcZuCN7+Rt76fY9bzLxldCTcVdPboRSgaKasK/
eWeuHk1j65B/9m8yipf+
=sOuC
-----END PGP SIGNATURE-----

v3g4n

unread,
Dec 19, 2016, 1:57:45 AM12/19/16
to qubes...@googlegroups.com
On 12/19/2016 02:29 AM,
I will let someone more knowledgeable on the manual removal process
answer, but why not just remove it using Qubes VM Manager? Just curious
about the manual process?

almigh...@gmail.com

unread,
Dec 19, 2016, 7:35:33 PM12/19/16
to qubes-users, almigh...@gmail.com, marm...@invisiblethingslab.com
On Monday, December 19, 2016 at 4:33:06 PM UTC+10:30, Andrew David Wong wrote:
> How did you perform this step? Did you manually edit qubes.xml?

The VM Manager allowed me to 'remove' the VM. Because the VM was renamed, as far as I can tell it just removed it from qubes.xml.

On Monday, December 19, 2016 at 5:27:45 PM UTC+10:30, v3g4n wrote:
> I will let someone more knowledgeable on the manual removal process
> answer, but why not just remove it using Qubes VM Manager? Just curious
> about the manual process?

A bug in the VM Manager occured when I went to rename a VM, the VM files were renamed but the VM Manager didn't update it's records and still showed the old name. It leaves a bunch of references to something that no longer exists (in the VM Manager and in the application menu). I haven't succeeded in reproducing this bug, I was renaming a HVM template I had just installed an OS onto and shutdown.

Of course manually removing VMs is not the ideal way to do it, but unfortunately things sometimes go wrong like it did for me.

Marek Marczykowski-Górecki

unread,
Dec 19, 2016, 7:51:23 PM12/19/16
to Andrew David Wong, almigh...@gmail.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, Dec 18, 2016 at 10:02:54PM -0800, Andrew David Wong wrote:
> On 2016-12-18 18:29, almigh...@gmail.com wrote:
> > So I made a HVM Template and renamed it through VM Manager,
> > something went wrong and the VM Manager did not reflect the name
> > change. (Can't seem to reproduce this bug)
> >
> > I was just wondering if I've successfully removed the HVM Template
> > manually. The process I went through was:
> >
> > 1. Remove template folder from /var/lib/qubes/vm-templates 2.
> > Remove old template reference from VM Manager (or manually from
> > qubes.xml)
>
> How did you perform this step? Did you manually edit qubes.xml?
>
> > 3. Remove template's *.desktop files from
> > ~/.local/share/applications
> >
>
> I can't immediately think of anything else to remove. At any rate,
> these should be the most important ones.
>
> There's also:
>
> qvm-remove --just-db <vm-name>
>
> which only removes the entry from the Qubes Xen DB without removing
> any files. What exactly does "Xen DB" refer to in this context, Marek?

I think this is bug in help message. It's about qubes.xml. Do we have
some other term for it?

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYWICIAAoJENuP0xzK19csKEgIAIy6FIcX5z7k9XeasrJv8TjI
wkxoDuDkWXjLcAgt5Q7sN1DwKDs/U0IJRrPBGgYXOZTeO3kwOlF4rQcWo6kMrI3t
rtVEOjV16XqpVPR5hGrZh0H4lp8uOXpDiEBBqQ8yj9IKNxCEVmAjotxE8/X3w9FY
zdP5Pbpt8lnuutsk8CcwBcnpjRQBMFppqySWkGDfcYlK5yL4sxNRBFW/DfacKd2+
fa6k+qOhZESWkQy29e/vgnv7el1qIQYRhb8a3xR0csSOjg34KQjxTTdokE8xRoHf
7jpAlFRlT6p/RaGznnDjVI5x9NshB3XDaxo/DoEGFgoMbUbwyn4uOxAGyuYkVd8=
=sZGF
-----END PGP SIGNATURE-----

Andrew David Wong

unread,
Dec 20, 2016, 3:30:55 AM12/20/16
to Marek Marczykowski-Górecki, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2016-12-19 16:51, Marek Marczykowski-Górecki wrote:
> On Sun, Dec 18, 2016 at 10:02:54PM -0800, Andrew David Wong wrote:
>> There's also:
>
>> qvm-remove --just-db <vm-name>
>
>> which only removes the entry from the Qubes Xen DB without
>> removing any files. What exactly does "Xen DB" refer to in this
>> context, Marek?
>
> I think this is bug in help message. It's about qubes.xml. Do we
> have some other term for it?
>

Ok, just an inconsistency in the help message, then. No, I'm not aware
of any other term for it. PR submitted:

https://github.com/QubesOS/qubes-core-admin/pull/84

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

iQIcBAEBCgAGBQJYWOwxAAoJENtN07w5UDAwq+EQAJsa2xfkOuUVIfzn/7n5TwXU
gLiXxwury2w7zBHqtV47IaIyECrfGFbf7jVhjbJEpD5UFHd/4xSVmqOo8x/ZCtYK
zWMvGKhBDttBUgHK/5nVZl1Q5uymuyyniYB6Mbj6BkJWm+3e8pXWFYNuqoyJH4fa
+shZmMmla2IyR+QvAQWzdvOLtnmsSgqH/uXAJpLivWivej+YfqyBfhlMe/NiJg+V
FEbNxv/aGy56dYB0YjGvG6Zu/62PA9zNAbxaID8+j8cw5gX8927aycO7lduF6USO
cvqkTfapLniaVqs+vyHQWcZzUsNopE/OVTAGQeNEG14uNAgCoxNp7Fr3O2s1mP/q
ldL1yo1wpuUkPjzon8lf8QiPII197gkDkUBKMCeVTb0aZaZdHEugrbBg4F/39a/y
LLBoBucXTpn8u87wfTIJpDkOYjVDHQzewOH7n730OtRGFvyHxtb0qQXG2o4NW9SF
7Xny32eDOzWvkhwRx/pFPGCkYgg7GRCDHk81DWFpCYWfjK5j9BWt4tnMe9GH/vDp
egnROC6GBmrU377q/JfPUK3zVBw/ucjk9zl4Q82wK/o0zTOBPDkPStxhIJcm17YT
L+Wkqmlb4iv0bWvozTCBamzA33HYkmFaqFfoeB1JMRhncGCDpZCcMhcQBYOgQsX2
4hlDaFsa8ozuq2lGvi4k
=TnTO
-----END PGP SIGNATURE-----

Andrew David Wong

unread,
Dec 20, 2016, 8:51:47 AM12/20/16
to almigh...@gmail.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2016-12-18 18:29, almigh...@gmail.com wrote:
Instructions added to documentation:

https://www.qubes-os.org/doc/remove-vm-manually/

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

iQIcBAEBCgAGBQJYWTdlAAoJENtN07w5UDAwcFoP/j9BSrDgy8zNCb1FoSCEn1/9
CkKBQC5bpz5ZUKQXzJC7Twlr5uAlfsgTbZWtYIDkPYFILIrLvyVDo/4FcmuVVDPq
/hBiYSx6z7Vr9exZM6wbMkTLP/cK51McV35uoyl9Va+/2dTbbiJONJXeB3fMeeHf
y7v4K+leN34zpxvDqpBiPsqm7DUovQmSIJXZSd4ad/NAbKtKWIqZJ3oEkHrseQCa
F129LX0O5tA6qhVB8VcVn3j3ClA37h/QEmbCl03SPHuMzGbvP/YtY/yEH0PwLyPF
IZaPk6KwkbSm4qznzdiOVnfEOqsNtC6Y3aeemc2ABPEp83zBr6m1RCxJYxMCJY/m
6Ol7m60KjJVEcpgaUoOiRJVmN+L4SiQOQQ87Frd0m78i6/XrRz8P0LqZR6ATy5/k
l+jdkgxM+BA9pBTIfDnlvXtA/bgE5EftawZxtf5GPDnlScHy0PnkiFcNK+7Y6szk
Pa8uEYFZfyFwq3bPPxT3h+Ugzr2RH4/U3ySVFPlyc7WJSU52gYWL6kzcBmZVNtot
r2uqv4fuCqTmoo8Urz1OXT2dOfr7dqNpJVvQaQg5iLG3ObO4bnYzYkPa6njSKhg7
KcDzV6fQtXLza8cCmSwBOZ55IBngyH/5f5TGQgXOS5rgq6OvP7pQtUTv2jntuC41
e83jNtnuWUAV2TAphVsY
=MnXl
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages