Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 922635

Summary: Virsh command line behaves differently as compare to Virt-manager
Product: Red Hat Enterprise Linux 6 Reporter: Pankaj <pankaj.kapila>
Component: virt-managerAssignee: Martin Kletzander <mkletzan>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.3CC: acathrow, codong, dyuan, gkong, hyao, lcui, mkletzan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 949206 (view as bug list) Environment:
Last Closed: 2013-07-24 08:41:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 949206    
Attachments:
Description Flags
Virsh-manager Error none

Description Pankaj 2013-03-18 07:01:35 UTC
Created attachment 711781 [details]
Virsh-manager Error

Description of problem:
While executing the command "virsh setmem <VM Domain name> memsize> Max memory " it returns error "invalid argument: cannot set memory higher than max memory" but while performing the same via Virt-manager it says the changes will be reflected after next guest shutdown but both should behave similarly.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Login to hypervisor and execute "virsh setmem <VM Domain name> memsize" where memsize should be higher than the max memory. This returns an error "invalid argument: cannot set memory higher than max memory".
2. Go to Virt-manager (via VNC) and select the respective VM and click on "Show virtual hardware details" and select memory.
3. Now change the current allocation higher than maximum allocation it returns "The changes will take effect after the next guest shutdown" with the error details shows "libvirtError: Requested operation is not valid: cannot resize the maximum memory on an active domain".
  
Actual results:
Both Virt-manager and virsh command should are behaving differently.

Expected results:
Both Virt-manager and virsh command should behave in same way.

Additional info:
Reproducible on RHEL and Windows guest VM's (any flavor).

Comment 1 Pankaj 2013-03-21 11:30:59 UTC
virt-manager error details :
==================================================================================
Requested operation is not valid: cannot resize the maximum memory on an active domain

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 2317, in _change_config_helper
    func(*args)
  File "/usr/share/virt-manager/virtManager/domain.py", line 756, in hotplug_both_mem
    self.hotplug_maxmem(maxmem)
  File "/usr/share/virt-manager/virtManager/domain.py", line 742, in hotplug_maxmem
    self._backend.setMaxMemory(maxmem)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1294, in setMaxMemory
    if ret == -1: raise libvirtError ('virDomainSetMaxMemory() failed', dom=self)
libvirtError: Requested operation is not valid: cannot resize the maximum memory on an active domain
==================================================================================

virsh setmem error details :
=====================================================================
error: invalid argument: cannot set memory higher than max memory
=====================================================================

Comment 2 CongDong 2013-04-02 08:41:08 UTC
reproduce on RHEL6.4

[root@localhost ~]# rpm -qa virt-manager libvirt qemu-kvm
virt-manager-0.9.0-18.el6.x86_64
libvirt-0.10.2-18.el6.x86_64
qemu-kvm-0.12.1.2-2.355.el6.x86_64
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

Comment 3 Pankaj 2013-04-02 10:26:13 UTC
We can not update the packages, until a bug is related and fixed to the particular package. We have to list the issue to the customer for using these packages.
How we handle this situation.

-Pankaj

Comment 4 Pankaj 2013-04-03 05:47:42 UTC
Please update the status on this bug. We are testing a customer configuration with RHEL6.3. We have to report issues with this configuration.

Comment 5 Pankaj 2013-04-04 15:33:52 UTC
Verified on RHEL 6.4:
[root@linux132-126 scr2]# rpm -qa virt-manager libvirt qemu-kvm
virt-manager-0.9.0-18.el6.x86_64
qemu-kvm-0.12.1.2-2.355.el6.x86_64
libvirt-0.10.2-18.el6.x86_64

The error is same as of RHEL6.3

Comment 6 Pankaj 2013-04-08 06:07:41 UTC
Info: this burt is cloned to RHEL 7.
https://bugzilla.redhat.com/show_bug.cgi?id=949206

Comment 7 Martin Kletzander 2013-07-24 08:41:53 UTC
I'm probably missing what is the real problem here.  Because you are increasing the current memory allocation above the maximum, to make it intuitive, the maximum is changed as well.  Because of that, the change can be done only after the guest is shut down.  And that is exactly what the message tells you: "The changes will take effect after the next guest shutdown."  The fact that there is an "error message" in the expandable area of the dialog box doesn't change anything about that and the error message just explains the reason why this change needs to be done upon next boot: "cannot resize the maximum memory on an active domain".  There is no real error and the tool behaves as expected.  Virtual Machine Manager is not just a GUI for virsh, these are two different tools and they should behave differently as virt-manager aims to be more user-friendly.

In case you've been misunderstood, have further needs or want to propose a different solution to this, engage the support organization so that your BZs can be properly prioritized if you have a contract with Red Hat.

Comment 8 Martin Kletzander 2013-07-24 08:42:54 UTC
*** Bug 949206 has been marked as a duplicate of this bug. ***