actual amount of memory allocated by a guest. Also this patch:
- makes it more apparent that 'xm mem-set' has no effect on HVM's.
- show's that memory is changing if 'xm list' is issued while guest is
ballooning (w/o touching balloon driver)
Signed-off-by: Tommie McAfee <tommie.mcafee@unisys.com>
except:
log.exception('Failed to restart domain %s.', str(self.domid))
+ def getSysMem(self):
+ info = dom_get(self.domid)
+ xs_memory=int(info['mem_kb'])/1024
+ return xs_memory
def _preserveForRestart(self):
"""Preserve a domain that has been shut down, by giving it a new UUID,
'destroyDevice','getDeviceSxprs',
'setMemoryTarget', 'setName', 'setVCpuCount', 'shutdown',
'send_sysrq', 'getVCPUInfo', 'waitForDevices',
- 'getRestartCount']
+ 'getRestartCount', 'getSysMem']
exclude = ['domain_create', 'domain_restore']
}
def xm_brief_list(doms):
+ def get_mem_info():
+ dom_sysMem=server.xend.domain.getSysMem(d['domid'])
+ if dom_sysMem:
+ d['mem']=dom_sysMem
+
+
print '%-40s %3s %5s %5s %10s %9s' % \
('Name', 'ID', 'Mem', 'VCPUs', 'State', 'Time(s)')
for dom in doms:
d = parse_doms_info(dom)
+ get_mem_info()
print format % d
def xm_label_list(doms):