Bug 833674

Summary: Deactivate memory balloon with type of none get wrong error info
Product: Red Hat Enterprise Linux 6 Reporter: EricLee <bili>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, dallan, dyasny, dyuan, mzhan, rwu, veillard, whuang, zhpeng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.9.13-3.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:17:57 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:

Description EricLee 2012-06-20 06:38:50 UTC
Description
Deactivate memory balloon with type of none get wrong error info

Version
qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64
kernel-2.6.32-279.el6.x86_64
libvirt-0.9.10-21.el6_3.1.x86_64

How reproducible:
100%

Steps to Reproduce
Setup:
1. Modify the guest xml to deactivate memory balloon, Change memballoon model value as none.

    ...
    <memballoon model='none'>
    </memballoon>
    ...

2. # virsh start test
Domain test started

3. # virsh setmem test 524288
error: Requested operation is not valid: cannot set memory of an active domain
(this error info let we think we can set memory of an inactive domain)

But
4. # virsh destroy test
Domain test destroyed

5. # virsh setmem test 524288
error: Requested operation is not valid: domain is not running

Actual results:
As steps.

Expected results:
Give right error info in cmd line as like:
error: Requested operation is not valid: cannot set memory for memballoon is not active.

Additional info:
when guest running with  <memballoon model='virtio'>, setmem is working well.

# virsh setmem test 524288

# virsh dominfo mig
Id:             25
Name:           test
UUID:           74b67915-0115-fc45-25c2-d6762ed49cdd
OS Type:        hvm
State:          running
CPU(s):         4
CPU time:       22.4s
Max memory:     1048576 kB
Used memory:    524288 kB
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: selinux
Security DOI:   0
Security label: system_u:system_r:svirt_t:s0:c720,c1022 (enforcing)

Comment 2 Osier Yang 2012-06-25 14:03:02 UTC
968b6c60 in upstream. move to POST.

Comment 4 zhpeng 2012-07-24 05:24:19 UTC
Test with libvirt-0.9.13-3.el6.x86_64:

# virsh dumpxml ccc
    ...
    <memballoon model='none'>
    </memballoon>
    ...

# virsh start ccc
Domain ccc started

# virsh setmem ccc 524288
error: Requested operation is not valid: Unable to change memory of active domain without the balloon device and guest OS balloon driver

# virsh destroy ccc
Domain ccc destroyed

# virsh setmem ccc 524288
error: Requested operation is not valid: domain is not running


These results are expect, so this is verified.

Comment 5 errata-xmlrpc 2013-02-21 07:17:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0276.html