Call xm to set maxmem, instead of direct call to xend.

Previous one hangs sometimes with 100% occupied by xend.
This will also be simpler to port to xl/libxl interface.
This commit is contained in:
Marek Marczykowski 2011-05-01 12:02:27 +02:00
parent f49c3a4224
commit 4a76bf2981

View File

@ -889,7 +889,7 @@ class QubesVm(object):
print "--> Loading the VM (type = {0})...".format(self.type)
if not self.is_netvm():
xend_session.xend_server.xend.domain.maxmem_set(self.name, self.maxmem)
subprocess.check_call(['/usr/sbin/xm', 'mem-max', self.name, str(self.maxmem)])
mem_required = self.get_mem_dynamic_max()
qmemman_client = QMemmanClient()