Merge remote-tracking branch 'qubesos/pr/176'
* qubesos/pr/176: Do not remove VMs installed via rpm
This commit is contained in:
commit
d83a07177b
@ -1052,6 +1052,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:
|
||||
yield from self.dest.remove_from_disk()
|
||||
|
Loading…
Reference in New Issue
Block a user