dom0/core: fix HVM settings on upgrade

This commit is contained in:
Marek Marczykowski 2013-01-11 16:21:25 +01:00
parent c5ae049e3b
commit 367db74378

View File

@ -2305,6 +2305,13 @@ class QubesHVm(QubesVm):
kwargs["memory"] = default_hvm_memory
super(QubesHVm, self).__init__(**kwargs)
# Default for meminfo-writer have changed to (correct) False in the
# same version as introduction of guiagent_installed, so for older VMs
# with wrong setting, change it based on 'guiagent_installed' presence
if "guiagent_installed" not in kwargs:
self.services['meminfo-writer'] = False
# HVM normally doesn't support dynamic memory management
if not ('meminfo-writer' in self.services and self.services['meminfo-writer']):
self.maxmem = self.memory