From 97393c54a54290614494f0872435400f2386f0fd Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Fri, 1 Apr 2011 01:17:18 +0200 Subject: [PATCH] Really block 'updateable' flag change --- dom0/qvm-core/qubes.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 863751a0..9786fab6 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -306,14 +306,17 @@ class QubesVm(object): else: return False + def set_updateable(self): + if self.is_updateable(): + return + + raise QubesException ("Change 'updateable' flag is not supported. Please use qvm-create.") def set_nonupdateable(self): if not self.is_updateable(): return - assert not self.is_running() - # We can always downgrade a VM to non-updateable... - self.updateable = False + raise QubesException ("Change 'updateable' flag is not supported. Please use qvm-create.") def is_template(self): return isinstance(self, QubesTemplateVm)