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 808522 - regression in parsing libvirt-generated xml memory limits
Summary: regression in parsing libvirt-generated xml memory limits
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 796526 813972
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-30 15:22 UTC by Eric Blake
Modified: 2012-06-20 06:51 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.10-10.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 796526
Environment:
Last Closed: 2012-06-20 06:51:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Comment 1 Eric Blake 2012-03-30 15:24:21 UTC
The correct fix is to relax the parser to accept up to a megabyte discrepancy (since that's all the more that the qemu driver would introduce) and round down current memory when a discrepancy is found; as well as to fix the qemu driver to update the xml when rounding occurs.

Comment 2 Eric Blake 2012-03-30 15:56:31 UTC
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2012-March/msg01343.html

Comment 6 dyuan 2012-04-25 09:03:17 UTC
Verified with libvirt-0.9.10-14.el6.

Create a guest with the following xml:

  <memory unit='MB'>1000</memory>
  <currentMemory unit='MB'>1000</currentMemory>

# virsh dumpxml xp|grep mem -i
  <memory unit='KiB'>976896</memory>
  <currentMemory unit='KiB'>976896</currentMemory>

And the mem is using correct in guest.

Reproduce this bug with libvirt-0.9.10-9.el6.

Create a guest with the following xml:

  <memory unit='MB'>1000</memory>
  <currentMemory unit='MB'>1000</currentMemory>

# virsh dumpxml xp
  <memory unit='KiB'>976563</memory>
  <currentMemory unit='KiB'>976896</currentMemory>

# virsh list
 Id    Name                           State
----------------------------------------------------
 1     xp                           running

# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]

# virsh list
 Id    Name                           State
----------------------------------------------------

but the qemu process is still existing.

# ps aux|grep qemu
qemu     23391 37.4 13.8 2175244 1050520 ?     Sl   16:16   0:38 /usr/libexec/qemu-kvm -S -M rhel6.3.0 -enable-kvm -m 954 -smp 4,sockets=4,cores=1,threads=1 -name xp -uuid 18585065-c348-1c4f-46b9-fdfee279543b -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/xp.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/var/lib/libvirt/images/winXP-32-virtio.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive file=/usr/share/virtio-win/virtio-win.vfd,if=none,id=drive-fdc0-0-0,format=raw,cache=none -global isa-fdc.driveA=drive-fdc0-0-0 -netdev tap,fd=22,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:3a:5f:6c,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,addr=127.0.0.1,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x7 -device qxl,id=video2,vram_size=67108864,bus=pci.0,addr=0x8 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

Comment 8 errata-xmlrpc 2012-06-20 06:51:36 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-2012-0748.html


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