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 736975 - Qemu-kvm fails to unregister virtio-balloon-pci device when unplugging
Summary: Qemu-kvm fails to unregister virtio-balloon-pci device when unplugging
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 743047
TreeView+ depends on / blocked
 
Reported: 2011-09-09 08:15 UTC by Shaolong Hu
Modified: 2013-01-10 00:18 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.192.el6
Doc Type: Bug Fix
Doc Text:
Hot-plugging a baloon device after hot-unplugging a previous one failed. This was fixed by unregistering the balloon device from the balloon core in QEMU. With the fix, balloon devices can be added and removed without problems.
Clone Of:
Environment:
Last Closed: 2011-12-06 16:03:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1531 0 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2011-12-06 01:23:30 UTC

Description Shaolong Hu 2011-09-09 08:15:52 UTC
Description of problem:
------------------------
Qemu-kvm fails to unregister virtio-balloon-pci device when unplugging, causes following virtio-balloon-pci device plugging failed.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
qemu-kvm-0.12.1.2-2.188.el6.x86_64
2.6.32-196.el6.x86_64


How reproducible:
------------------
100%


Steps to Reproduce:
--------------------
1. boot guest with:
usr/libexec/qemu-kvm -enable-kvm -M rhel6.2.0 -smp 4 -m 4G -name rhel6.1-64 -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=RHEL-Server-6.1-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -boot order=cd,menu=on -vnc :10 -monitor stdio -monitor unix:/tmp/tt,server,nowait

2.in qemu monitor:
(qemu) info balloon
Device 'balloon' has not been activated by the guest
(qemu) device_add virtio-balloon-pci,id=balloon1
(qemu) info balloon
balloon: actual=4096
(qemu) balloon 2048
(qemu) info balloon
balloon: actual=2048
(qemu) device_del balloon1
(qemu) info balloon
balloon: actual=4096
(qemu) balloon 2048
(qemu) info balloon
balloon: actual=4096
(qemu) device_del balloon1
Device 'balloon1' not found
(qemu) device_add virtio-balloon-pci,id=balloon1
Another balloon device already registered
Device 'virtio-balloon-pci' could not be initialized
(qemu) device_add virtio-balloon-pci,id=balloon2
Another balloon device already registered
Device 'virtio-balloon-pci' could not be initialized

  
Actual results:
----------------
As in step 2, can not hotplug a virtio-balloon-pci device any more.


Expected results:
-----------------
Recently, patch has been added to limit there is only one balloon device assigned to guest, but when this balloon device unplugged, should allow another balloon device plugged.

Extra expected result will be after balloon device unplugged, when issue "info balloon" in qemu monitor, it should prompt "Device 'balloon' has not been activated by the guest", and cannot run "balloon xxx" in qemu monitor.

Comment 2 Amit Shah 2011-09-09 09:16:04 UTC
Patches posted upstream:
http://thread.gmane.org/gmane.comp.emulators.qemu/116640

Comment 8 langfang 2011-09-27 06:33:42 UTC
Reproduced this issue with qemu-kvm-0.12.1.2-2.190.el6.x86_64
kernel:2.6.32-202.el6.x86_64

steps:
1.boot guest 
  #/usr/libexec/qemu-kvm -smp 2.......
2.1.boot guest 
  #/usr/libexec/qemu-kvm -smp 2.......
2.(qemu) device_add virtio-balloon-pci,id=balloon1
(qemu) info balloon
balloon: actual=2048
(qemu) balloon 1024
(qemu) info balloon
balloon: actual=1024
(qemu) device_del balloon1
(qemu) info balloon
balloon: actual=2048
(qemu) device_del balloon1
Device 'balloon1' not found
(qemu) device_add virtio-balloon-pci,id=balloon1
Another balloon device already registered
Device 'virtio-balloon-pci' could not be initialized
(qemu) device_add virtio-balloon-pci,id=balloon2
Another balloon device already registered
Device 'virtio-balloon-pci' could not be initialized
(qemu) 

Results:as step 2,can not hotplug a virtio-balloon-pci device .

Veriry this issue with hostA(rhel6.2):qemu-kvm-0.12.1.2-2.192.el6.x86_64
kernel:2.6.32-202.el6.x86_64
using steps as same as reproduce

Results:1)can unhotplug balloon device
        2)can not hotplug more than one balloon device
        3) when one balloon device unplugged, should allow another
balloon device plugged.
    
     
Above all,this issue have been fixed.

Comment 10 Amit Shah 2011-11-18 12:06:48 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Hot-plugging a baloon device after hot-unplugging a previous one failed.  This was fixed by unregistering the balloon device from the balloon core in QEMU.  With the fix, balloon devices can be added and removed without problems.

Comment 11 errata-xmlrpc 2011-12-06 16:03:04 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-2011-1531.html


Note You need to log in before you can comment on or make changes to this bug.