The numbers in /proc/xen/balloon have nice units
All math is done in kilobytes for consistency
Output is in MB
+
+ Bail if /etc/invirt/nocreate exists
"""
+ try:
+ os.stat('/etc/invirt/nocreate')
+ print 0
+ return 0
+ except OSError:
+ pass
+
p = Popen(['/usr/sbin/xm', 'info'], stdout=PIPE)
output = p.communicate()[0]
if p.returncode != 0: