Bug 645285

Summary: virt-manager cannot change mem for KVM guest
Product: Red Hat Enterprise Linux 5 Reporter: min zhan <mzhan>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: amyagi, closms, dallan, dyasny, dyuan, hjiang, llim, mzhan, pmedilal, ricardo.arguello, sputhenp, tru, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 07:21:48 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description min zhan 2010-10-21 04:48:17 EDT
Description of problem:

In virt-manager GUI, try to change guest in shutdown status memory, Change Allocation can not be changed with an error.

Version-Release number of selected component (if applicable):
virt-manager-0.6.1-13.el5
libvirt-0.8.2-8.el5
# uname -a
Linux dhcp-93-197.nay.redhat.com 2.6.18-225.el5 #1 SMP Mon Sep 27 10:32:19 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
Always

Steps to Reproduce:
1. Launch virt-manager GUI.
2. Select a VM in shutdown status, and go to Hardware Tab.
3. Click Memory tab,Change 'Change allocation' value and make sure the value is less than 'Maximum allocation'value, click Apply.

Actual results:
Change is not saved and an error will display.


# tail -f ~/.virt-manager/virt-manager.log
[Thu, 21 Oct 2010 16:42:16 virt-manager 6071] INFO (details:1443) Setting max-memory for rhel55 to 1024.0
[Thu, 21 Oct 2010 16:42:16 virt-manager 6071] INFO (details:1448) Setting memory for rhel55 to 1019.0
[Thu, 21 Oct 2010 16:42:16 virt-manager 6071] DEBUG (error:76) Uncaught Error: Error changing memory values: this function is not supported by the connection driver: virDomainSetMaxMemory : Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1459, 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


Actually I am just changed memory not max-memory in virt-manager.

I also did this in RHEL6, and it works fine.


Expected results:
Changes can be saved.

Additional info:

Via virsh edit <guestname>, user can change memory successfully.
Comment 2 RHEL Product and Program Management 2010-12-07 05:34:28 EST
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.6 and Red Hat does not plan to fix this issue the currently developed update.

Contact your manager or support representative in case you need to escalate this bug.
Comment 9 Cole Robinson 2011-04-29 10:20:52 EDT
Sorry for not replying earlier. This is now fixed in virt-manager-0.6.1-14.el5, so should hit 5.7
Comment 11 Huming Jiang 2011-05-05 03:44:57 EDT
Reproduce:
virt-manager-0.6.1-13.el5
libvirt-0.8.2-18.el5

Verfied it on build :
virt-manager-0.6.1-14.el5
libvirt-0.8.2-18.el5

Steps:

1. Launch virt-manager GUI.
2. Select a VM in shutdown status, and go to Hardware Tab.
3. Click Memory tab,Change 'Change allocation' value and make sure the value is
less than 'Maximum allocation'value, click Apply.
4. The result has been changed.
Comment 12 Michael Closson 2011-05-19 11:57:59 EDT
Where can I get these RPMs:


virt-manager-0.6.1-14.el5
libvirt-0.8.2-18.el5
Comment 13 Cole Robinson 2011-05-19 12:20:23 EDT
(In reply to comment #12)
> Where can I get these RPMs:
> 
> 
> virt-manager-0.6.1-14.el5
> libvirt-0.8.2-18.el5

They aren't released yet. If you are a customer you should be able to get access to them when the alpha or beta is released, but I'm not really sure how it all works TBH.
Comment 14 Huming Jiang 2011-06-15 04:00:25 EDT
Now this bug has been verified, but there exists some other problems, we have filed two bugs to track:

Bug 712343 - virt-manager: set memory of guest make user confused.

Bug 707147 - virt-manager: The memory value of "change allocation" is always equal with "maximum allocation", and the value of "maximum allocation" is no less than the last value.
Comment 15 errata-xmlrpc 2011-07-21 07:21:48 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1055.html