Do not remove VMs installed via rpm
This commit is contained in:
parent
3065e0de94
commit
47b49c4755
@ -1051,6 +1051,10 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI):
|
|||||||
|
|
||||||
if not self.dest.is_halted():
|
if not self.dest.is_halted():
|
||||||
raise qubes.exc.QubesVMNotHaltedError(self.dest)
|
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]
|
del self.app.domains[self.dest]
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user