Do not remove VMs installed via rpm

This commit is contained in:
Christopher Laprise 2017-12-29 23:24:41 -05:00
parent 3065e0de94
commit 47b49c4755
No known key found for this signature in database
GPG Key ID: 448568C8B281C952

View File

@ -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: