virt-manager GUI fails to allocate more than 32GB memory to VM

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6 + earlier virt-manager-0.8.6-4.el6
  • Virt-Manager
  • KVM and XEN

Issue

  • Why virt-manager GUI fails to allocate memory above 32GB for VM based on kvm?
  • How much memory can be allocated to KVM guest through virt-manager?
  • Virtualization limits page says KVM guest supports up to 512 GB of memory but virt-manager failed to allocate more than 32G memory to fully virtualized KVM guest.

Resolution

For KVM

  • Add/extend the guest memory manually by editing guest XML config file.
  • Stop the Virtual Machine
  • Run the following command to edit the XML definitions of VM

#virsh edit

  • For example (here, <memory> is the "setmaxmem" value and <currentMemory> is the "setmem" value):
virsh # edit <domain-name>
<domain type='kvm'>
 ...
<memory>514144</memory>
<currentMemory>262144</currentMemory>
...
</domain>
  • Change the memory value as per your requirement and save the configuration.
  • Restart the libvirtd service

For XEN

  • Edit the guest file xml located under /etc/xen/
  • example:

            maxmem = 512   <-- These are the parameters which need to be modified. It is mentioned in MB
            memory = 512    <-- So for 32 GB mention 32000
    

    Restart the libvirtd service

  • This issue is fixed in Red Hat Enterprise Linux 6 with virt-manager-0.8.6-4.el6 (Bugzilla 640781)

Root Cause

  • Virt-manager has some limitation of maximum memory configuration in GUI.
  • It is not possible to allocate more then 32GB memory to VM through virt-manager in RHEL 5.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments