[libvirt] RFC: <memory units=...> [was: libvirt doesn't boot kVM, hangs, qemu on 100% CPU]
eblake at redhat.com
Wed Feb 22 23:42:59 UTC 2012
On 02/21/2012 03:46 PM, Igor Galić wrote:
> Hi folks,
> it's been adventurous.
> Yesterday night I've started debugging this particular
> issue of why my KVMs don't boot on Ubuntu 11.10.
On IRC, we identified the culprit:
There ain't no way on earth you're going to boot a kernel in 2 megabytes
I propose enhancing the XML; on output, libvirt should produce:
<memory units='k'>2048</memory> => 2048 * kibibyte
the output unit must remain the same as it has always been, but the new
attribute will make it easier for humans reading the XML to spot
blunders like what spawned this thread.
On input, the optional attribute is more useful - we can use it to
provide a multiplier (of course, the result will be rounded up to k, and
again rounded up to any higher granularity per the hypervisor):
b => bytes
k, KiB => kibibyte (1024)
KB => kilobyte (1000)
M, MiB => mebibyte (1024*1024)
MB => megabyte (1000000)
and so on for at least G and T (do we need P, E, Z, or Y? and I'm
jealous if you have a machine with 1Y memory).
Thoughts before I propose such a patch?
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 620 bytes
Desc: OpenPGP digital signature
More information about the libvir-list