On Wed, 7 Oct 2015 23:29:07 +0800
Yi Wang wrote:
> Hi, all
> When I create a vm using virsh, it will fail if maxMemory(2G) equals
> to memory(2G) in XML:
> error: Failed to create domain from vm1.xml
> error: internal error: process exited while connecting to monitor:
> qemu-kvm: -msg timestamp=on: invalid value of -m option maxmem: memory
> slots were specified but maximum memory size (0x8000) is equal to
> the initial memory size (0x8000)
-m initial_memory[,slots=X,maxmem=Y]
By design 'initial_memory' is not hotplugable and slots,maxmem should be
used if hotplug is needed and maxmem should be greater than initial_memory.
There isn't point specifying maxmem == initial_memory (i.e. 0-sized hotplug
space) and that's what QEMU is complaining about.
>
> However, if I allocate 1G memory for the guest at boot time(maxMemory
> is still 2G), and then hotplug 1G to it, and it will success! Now
> total memory is 2G and it equals to maxMemory. Is this a bug? if so, I
> would be happy to work on a patch to fix this. Please tell me how this
> designs if this is not a bug.
>
> Thanks a lot.
>