Comment 67 for bug 1304001

Galland (victor-lopez) wrote :

I had this problem on a PC with Xen and Linux VMs. The VMs are configured to boot with just 400 MB of RAM allotted to them and up to 8GB max RAM.
I was never able to get above some 4.3GB in any VM, and log showed the "reserve_additional_memory: add_memory() failed: -17" message at that point

The SOLUTION that fixes it was proposed at qubes-devel mailing list (Qubes is a Xen+Linux distro for ultra-secure PCs):
     https://groups.google.com/d/msg/qubes-devel/VRqkFj1IOtA/UgMgnwfxVSIJ

As proposed there: if I set initial RAM to 800MB and max ram scales above 4.3GB (actually tested to up to 11GB), without any "add_memory() failed" messages.

The explanation given is that the VM's kernel allocates its memory related structures at boot time and the memory available at that time limits the max memory it may scale up to. When that happens, it starts throwing the balloon error messages.