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: