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 949206

Summary: Virsh command line behaves differently as compare to Virt-manager
Product: Red Hat Enterprise Linux 7 Reporter: CongDong <codong>
Component: virt-managerAssignee: virt-mgr-maint
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, codong, cwei, dallan, gkong, hyao, lcui, mkletzan, mzhan, pankaj.kapila, 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: 922635 Environment:
Last Closed: 2013-07-24 08:42:54 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: 922635    
Bug Blocks:    

Description CongDong 2013-04-07 02:31:14 UTC
+++ This bug was initially created as a clone of Bug #922635 +++
Can reproduce on REHL7, and clone the bug.
Version-Release number of selected component (if applicable):
libvirt-1.0.2-1.el7.x86_64
virt-manager-0.9.4-4.el7.noarch
qemu-kvm-1.3.0-6.el7.x86_64


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).

--- Additional comment from Pankaj on 2013-03-21 07:30:59 EDT ---

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
=====================================================================

--- Additional comment from CongDong on 2013-04-02 04:41:08 EDT ---

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

--- Additional comment from Pankaj on 2013-04-02 06:26:13 EDT ---

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

--- Additional comment from Pankaj on 2013-04-03 01:47:42 EDT ---

Please update the status on this bug. We are testing a customer configuration with RHEL6.3. We have to report issues with this configuration.

--- Additional comment from Pankaj on 2013-04-04 11:33:52 EDT ---

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 2 Martin Kletzander 2013-07-24 08:42:54 UTC

*** This bug has been marked as a duplicate of bug 922635 ***