Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 503790

Summary: virtio balloon: add a command-line option to disable it at runtime
Product: Red Hat Enterprise Linux 5 Reporter: Eduardo Habkost <ehabkost>
Component: kvmAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED ERRATA QA Contact: Lawrence Lim <llim>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: azarembo, byang, lihuang, mjenner, ovirt-maint, Rhev-m-bugs, sghosh, tburke, tools-bugs
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kvm-83-83.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 09:33:15 UTC Type: ---
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: 503811    
Bug Blocks: 505147    

Comment 15 lihuang 2009-07-03 08:17:32 UTC
Tested in beta9.1 -balloon option works well, Change the status to *VERIFIED*

# cat /etc/redhat-release 
Red Hat Enterprise Virtualization Hypervisor release 5.4-2.0.99 (9.1)
# rpm -q kvm
kvm-83-83.el5



1 balloon is default enabled 

# /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -drive file=/data/images/images/RHEL-Server-5.3-64-virtio.qcow2,if=virtio,media=disk,cache=off,index=0,boot=on -cpu qemu64,+sse2 -net nic -net tap -vnc :12 -monitor stdio
QEMU 0.9.1 monitor - type 'help' for more information
(qemu) info  balloon 
balloon: actual=128
(qemu) 
[root@localhost ~]# lsmod | grep -iE "balloon|virtio"
virtio_blk             41417  3 
virtio_pci             41921  0 
virtio_ring            37441  1 virtio_pci
virtio                 39365  2 virtio_blk,virtio_pci
[root@localhost ~]# lspci | grep -iE "balloon|virtio"
00:04.0 Mass storage controller: Qumranet, Inc. Virtio block device
00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon
[root@localhost ~]#

2 balloon can be disabled from command line 
# /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -drive file=/data/images/images/RHEL-Server-5.3-64-virtio.qcow2,if=virtio,media=disk,cache=off,index=0,boot=on -cpu qemu64,+sse2 -net nic -net tap -vnc :12 -monitor stdio -balloon none
QEMU 0.9.1 monitor - type 'help' for more information
(qemu) info  balloon 
Ballooning not activated in VM
(qemu) 

[root@localhost ~]# lspci | grep -iE "balloon|virtio"
00:04.0 Mass storage controller: Qumranet, Inc. Virtio block device
[root@localhost ~]# lsmod | grep -iE "balloon|virtio"
virtio_blk             41417  3 
virtio_pci             41921  0 
virtio_ring            37441  1 virtio_pci
virtio                 39365  2 virtio_blk,virtio_pci
[root@localhost ~]# 


3 balloon is enabled by commline option *-balloon virtio*
# /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -drive file=/data/images/images/RHEL-Server-5.3-64-virtio.qcow2,if=virtio,media=disk,cache=off,index=0,boot=on -cpu qemu64,+sse2 -net nic -net tap -vnc :12 -monitor stdio -balloon virtio
QEMU 0.9.1 monitor - type 'help' for more information
(qemu) info balloon 
balloon: actual=128
(qemu) 

[root@localhost ~]# lsmod | grep -iE "balloon|virtio"
virtio_blk             41417  3 
virtio_pci             41921  0 
virtio_ring            37441  1 virtio_pci
virtio                 39365  2 virtio_blk,virtio_pci
[root@localhost ~]# lspci | grep -iE "balloon|virtio"
00:04.0 Mass storage controller: Qumranet, Inc. Virtio block device
00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon

4. help information is printed :
# /usr/libexec/qemu-kvm --help | grep balloon
-balloon none   disable balloon device
-balloon virtio
                enable virtio balloon device (default)

5. qemu-kvm can handle the error parameter :
# /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -drive file=/data/images/images/RHEL-Server-5.4-64-virtio.qcow2,if=virtio,media=disk,cache=off,index=0,boot=on -cpu qemu64,+sse2 -net nic -net tap -vnc :12 -monitor stdio -balloon aa    
Unknown -balloon argument aa

Comment 16 lihuang 2009-07-03 12:42:01 UTC
BTW : the *Qumranet, Inc* in lscpi is OK ? 
00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon
                   ^^^^^^^^^^^^^^^^

Comment 17 Eduardo Habkost 2009-07-03 16:04:29 UTC
(In reply to comment #16)
> BTW : the *Qumranet, Inc* in lscpi is OK ? 
> 00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon
>                    ^^^^^^^^^^^^^^^^  

The only thing exposed by the virtual hardware is a numeric PCI ID. If the guest is showing the PCI ID as "Qumranet, Inc", it is a guest issue, not KVM issue. On RHEL-5 the PCI ID table is on the 'hwdata' package.

Comment 18 lihuang 2009-07-04 07:51:36 UTC
Yes . PCI ID is 1af4:1002.

in PCI ID table:

1af4  Qumranet, Inc.
        1000  Virtio network device
        1001  Virtio block device
        1002  Virtio memory balloon
        1003  Virtio console

Comment 20 errata-xmlrpc 2009-09-02 09:33:15 UTC
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/RHEA-2009-1272.html