(bug-fix) For retrieving the max memory a libvirt VM can obtain, don't use the 'maxMem' field (not fully reliable as returns a too high value wrt what can be allocated to the VM, at least in Xen) but instead use the 'memory' field. In fact, if one tries to allocate to a Xen VM 'maxMem' memory, it likely obtains the error: 'libvirt: Xen Light Driver error : invalid argument: cannot set memory higher than max memory'