From 47b49c4755d04d9a16d5a90536a461cc6951db39 Mon Sep 17 00:00:00 2001 From: Christopher Laprise Date: Fri, 29 Dec 2017 23:24:41 -0500 Subject: [PATCH] Do not remove VMs installed via rpm --- qubes/api/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qubes/api/admin.py b/qubes/api/admin.py index 7a1a66e6..f200da9c 100644 --- a/qubes/api/admin.py +++ b/qubes/api/admin.py @@ -1051,6 +1051,10 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI): if not self.dest.is_halted(): raise qubes.exc.QubesVMNotHaltedError(self.dest) + + if self.dest.installed_by_rpm: + raise qubes.exc.QubesVMInUseError(self.dest, \ + "VM installed by package manager: " + self.dest.name) del self.app.domains[self.dest] try: