qvm-remove: undefine libvirt domain even when not removing files

Fixes QubesOS/qubes-issues#2112
This commit is contained in:
Marek Marczykowski-Górecki 2016-06-25 00:20:40 +02:00
parent 748a3a90a2
commit 13f832645a
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -79,6 +79,10 @@ def main():
exit (1)
try:
if options.remove_from_db_only:
# normally it is done by vm.remove_from_disk(), but it isn't
# called in this case
vm.libvirt_domain.undefine()
if vm.installed_by_rpm:
if options.verbose:
print >> sys.stderr, "--> VM installed by RPM, leaving all the files on disk"