[libvirt] Inconsistency with documentation virDomainGetMaxMemory(NULL)

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@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

Stefan de Konink schreef:
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.
Doing it the 'proper' way gives an even more interesting answer: virDomainPtr domu = virDomainLookupByID(conn, 0); printf("%ld\n", virDomainGetMaxMemory(domu)); 17179869180 Now... MemTotal: 7990272 kB MemFree: 7527312 kB Buffers: 44400 kB Cached: 50440 kB SwapCached: 0 kB Active: 133236 kB Inactive: 63764 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 476 kB Writeback: 0 kB AnonPages: 102216 kB Mapped: 10848 kB Slab: 20428 kB SReclaimable: 7800 kB SUnreclaim: 12628 kB PageTables: 2648 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 3995136 kB Committed_AS: 568940 kB VmallocTotal: 34359738367 kB VmallocUsed: 412 kB VmallocChunk: 34359737775 kB That doesn't make sense. Stefan

Stefan de Konink schreef:
Stefan de Konink schreef:
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.
Doing it the 'proper' way gives an even more interesting answer:
Checking the free memory also results in strange measures: printf("%llu\n", virNodeGetFreeMemory(conn)); 28672
That doesn't make sense.
I'm running the lastest git version of libvirt... Stefan

Stefan de Konink schreef:
That doesn't make sense.
I'm running the lastest git version of libvirt...
And it seems libvirt cannot handler ballooning. With a hard dom0_mem=limit, I get good values back. Never the less, xm info also returned 0 with the ballooning on. Stefan
participants (1)
-
Stefan de Konink