Hey Daniel,<div><br></div><div>Here is the output of 'xm list' from both machines:</div><div><br></div><div>Xen 3.0.3 - This machine has 2GB total memory and should report 256MB free:</div><div><br></div><div><div>
[root@node2 ~]# xm list</div><div>Name                                      ID Mem(MiB) VCPUs State   Time(s)</div><div>Domain-0                                   0      997     1 r-----  31431.7</div><div>test1                                     74      255     1 -b----   2412.4</div>
<div>test2                                     73      511     1 -b----   2434.3</div></div><div><br></div><div><br></div><div>Xen 3.3 - This machine has 3GB total memory and should report 0MB free:</div><div><br></div><div>
<div><div>[root@node1 ~]# xm list</div><div>Name                                        ID   Mem VCPUs      State   Time(s)</div><div>Domain-0                                     0  2901     2     r-----    588.5</div><div>
<br></div><div>Both machines are i386 architecture.</div><div><br></div><div>Here's the output of the getCellsFreeMemory call:</div><div><br></div><div>Xen 3.0.3:</div><div><br></div><div><div>[root@node2 ~]# python</div>
<div>Python 2.4.3 (#1, Jan 21 2009, 01:10:13) </div><div>[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2</div><div>Type "help", "copyright", "credits" or "license" for more information.</div>
<div>>>> import libvirt</div><div>>>> conn = libvirt.open('xen:///')</div><div>>>> print(conn.getCellsFreeMemory(0,10))</div><div>[268972032L]</div></div><div><br></div><div>Xen 3.3:</div>
<div><br></div><div><div>[root@node1 ~]# python</div><div>Python 2.4.3 (#1, Jan 21 2009, 01:10:13) </div><div>[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2</div><div>Type "help", "copyright", "credits" or "license" for more information.</div>
<div>>>> import libvirt</div><div>>>> conn = libvirt.open('xen:///')</div><div>>>> print(conn.getCellsFreeMemory(0,10))</div><div>[576460752303423488L]</div><div><br></div><div><div>I appreciate the help.</div>
<div><br></div><div>Hany</div></div></div><div><br></div></div><div class="gmail_quote">On Wed, Jun 10, 2009 at 6:24 AM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Tue, Jun 09, 2009 at 06:00:29PM -0400, Hany Fahim wrote:<br>
> Hi,<br>
> I'm currently running 2 CentOS 5.3 systems, one running Xen 3.3 and libvirt<br>
> 0.6.4 (called node1) and the other running Xen 3.0.3 (stock CentOS) and<br>
> libvirt 0.6.4 (called node2). The machines are practically identical except<br>
> for the upgraded Xen installation. When using the libvirt-python module, I'm<br>
> getting strange values from getFreeMemory() on the Xen 3.3 machine. See<br>
> below:<br>
><br>
> Xen 3.0.3:<br>
><br>
> [root@node2 ~]# python<br>
> Python 2.4.3 (#1, Jan 21 2009, 01:10:13)<br>
> [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2<br>
> Type "help", "copyright", "credits" or "license" for more information.<br>
> >>> import libvirt<br>
> >>> conn = libvirt.open('xen:///')<br>
> >>> print(conn.getFreeMemory())<br>
> 268959744<br>
> >>><br>
><br>
> Which is correct since there's approximately 256MB free. Now in the Xen 3.3<br>
> box:<br>
><br>
> Xen 3.3:<br>
><br>
> [root@node1 ~]# python<br>
> Python 2.4.3 (#1, Jan 21 2009, 01:10:13)<br>
> [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2<br>
> Type "help", "copyright", "credits" or "license" for more information.<br>
> >>> import libvirt<br>
> >>> conn = libvirt.open('xen:///')<br>
> >>> print(conn.getFreeMemory())<br>
> 576460752303423488<br>
> >>><br>
><br>
> node1 should actually be reporting 0MB free, but instead I'm getting this<br>
> huge number. It would be nice if I had this much memory though... Anybody<br>
> else run into this?<br>
<br>
</div></div>For Xen we get the free memory information from a hypercall. I suspect<br>
that Xen 3.3 has changed the hypercall ABI in some way that is tripping<br>
up libvirt. Can you provide the output of 'xm info' for the 2 machines<br>
you have. Also what architecture are they ?<br>
<br>
Also can you check the per-node info with  print(conn.getCellsFreeMemory(0,10))<br>
<br>
<br>
Daniel<br>
<font color="#888888">--<br>
|: Red Hat, Engineering, London   -o-   <a href="http://people.redhat.com/berrange/" target="_blank">http://people.redhat.com/berrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>  -o-  <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a>  -o-  <a href="http://ovirt.org" target="_blank">http://ovirt.org</a> :|<br>

|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|<br>
</font></blockquote></div><br></div>