I am unable to assign a different amount of memory to my virtual machines from virt-manager. How may I get this done?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • KVM

Issue

  • I am unable to assign a different amount of memory to my virtual machines from virt-manager. How may I get this done?

  • I get the following traceback call when trying to increase the amount of memory of my guest:

    Traceback (most recent call last):
      File "/usr/share/virt-manager/virtManager/details.py", line 1466, in config_memory_apply
        self.vm.set_max_memory(maxmem.value * 1024)
      File "/usr/share/virt-manager/virtManager/domain.py", line 1280, in set_max_memory
        self.vm.setMaxMemory(memory)
      File "/usr/lib64/python2.4/site-packages/libvirt.py", line 627, in setMaxMemory
        if ret == -1: raise libvirtError ('virDomainSetMaxMemory() failed', dom=self)
    libvirtError: this function is not supported by the connection driver: virDomainSetMaxMemory
    

From virsh console:

virsh # setmaxmem rhel-5 2048000
error: Unable to change MaxMemorySize
error: this function is not supported by the connection driver: virDomainSetMaxMemory

Resolution

Update to virt-manager-0.6.1-14.el5.

Alternatively, you may assign a different amount of memory to virtual machines with the virsh edit command.

# virsh edit <name-of-the-guest>

You should edit the <memory> line:

<domain type='kvm' id='3'>
  <name>rhel6</name>
  <uuid>17c5692f-3feb-ea92-44b4-32108764bbcd</uuid>
  <memory>500000</memory>
  <currentMemory>367616</currentMemory>
  <vcpu>1</vcpu>
...

Root Cause

A bug in the virt-manager component is causing this error.

  • Component
  • kvm

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