From 13f832645aa8d6a48ae63b083ed3e0c2b7a554d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 25 Jun 2016 00:20:40 +0200 Subject: [PATCH] qvm-remove: undefine libvirt domain even when not removing files Fixes QubesOS/qubes-issues#2112 --- qvm-tools/qvm-remove | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qvm-tools/qvm-remove b/qvm-tools/qvm-remove index ccb10212..b574d0de 100755 --- a/qvm-tools/qvm-remove +++ b/qvm-tools/qvm-remove @@ -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"