[libvirt] Inconsistency with documentation virDomainGetMaxMemory(NULL)

Stefan de Konink skinkie at xs4all.nl
Sat Jul 19 12:52:10 UTC 2008


I was making a some test code to checkout some code before I start on my 
brand new Invite/Tender cluster distribution engine(tm ;)

 From docs:

Retrieve the maximum amount of physical memory allocated to a domain. If 
domain is NULL, then this get the amount of memory reserved to Domain0 
i.e. the domain where the application runs.


skinkie at xenapi ~/development/htdocs/cherokee $ ./experiment
libvir: Domain error : invalid domain pointer in virDomainGetMaxMemory
0
262144

Code:
     printf("%ld\n", virDomainGetMaxMemory(NULL));
     virDomainPtr domu = virDomainLookupByName(conn, "klant1_gentoo");
     printf("%ld\n", virDomainGetMaxMemory(domu));
     virDomainFree(domu);


Stefan




More information about the libvir-list mailing list