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 1432332 - It is unreasonable that guest can get overcommit memory from host via hotplug
Summary: It is unreasonable that guest can get overcommit memory from host via hotplug
Keywords:
Status: CLOSED DUPLICATE of bug 1269774
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: All
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Igor Mammedov
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1472561 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-15 07:04 UTC by Min Deng
Modified: 2017-07-20 08:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-16 09:22:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Min Deng 2017-03-15 07:04:52 UTC
Description of problem:
It is unreasonable that guest can get overcommit memory from host via hotplug
Version-Release number of selected component (if applicable):
ppc64le
kernel-3.10.0-600.el7.ppc64le (host/guest)
qemu-kvm-rhev-2.8.0-6.el7.ppc64le
SLOF-20160223-6.gitdbbfda4.el7.noarch
x86
kernel-3.10.0-595.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Boot up guest with the following cli,
  /usr/libexec/qemu-kvm -name virt-tests-vm1 -sandbox off -machine pseries-rhel7.4.0 -nodefaults -vga std -chardev socket,id=hmp_id_humanmonitor1,path=/tmp/monitor-humanmonitor1-20151207-185515-CKlGrjUv,server,nowait -mon chardev=hmp_id_humanmonitor1,mode=readline -chardev socket,id=qmp_id_qmp1,path=/tmp/monitor-qmp1-20151207-185515-CKlGrjUv,server,nowait -mon chardev=qmp_id_qmp1,mode=control -chardev socket,id=hmp_id_catch_monitor,path=/tmp/monitor-catch_monitor-20151207-185515-CKlGrjUv,server,nowait -mon chardev=hmp_id_catch_monitor,mode=readline -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20151207-185515-CKlGrjUv,server,nowait -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=03,disable-legacy=off,disable-modern=on -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=rhel74-ppc64le-virtio-scsi-latest.qcow2 -device scsi-hd,id=image1,drive=drive_image1 -numa node -qmp tcp:0:4444,server,nowait -vnc :1 -rtc base=utc,clock=host,driftfix=slew -boot order=cdn,once=c,menu=off,strict=off -enable-kvm -monitor stdio -device pci-ohci,id=usb1 -device usb-kbd,id=input0 -device usb-mouse,id=input1 -device usb-tablet,id=input2 -netdev tap,script=/etc/qemu-ifup,downscript=/etc/qemu-down,id=hostnet1,vhost=on -device virtio-net-pci,netdev=hostnet1,id=net1,mac=00:52:11:36:3f:00 -m 1G,slots=32,maxmem=50G -numa node
2.check the host's memory 
  hostname:ibm-p8-rhevm-17.rhts.eng.bos.redhat.com
  memory is approximately:32768 MB
  check it on hosts as well,
  cat /proc/meminfo 
  MemTotal:       32395008 kB
  MemFree:        22368384 kB
  MemAvailable:   30882496 kB
3.Do the following steps
 (qemu) object_add memory-backend-ram,id=mem1,size=45G
 cannot set up guest memory 'mem1': Cannot allocate memory

4.And change to a smaller value but it is still bigger that host's
(qemu) object_add memory-backend-ram,id=mem1,size=40G
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1
(qemu) info memdev
memory backend: 0
  size:  42949672960
  merge: true
  dump: true
  prealloc: false
  policy: default
  host nodes: 128

Actual results:
The guest's original memory' setting was following as below, 
"-m 1G,slots=32,maxmem=50G"
At the moment,the hotplug did succeed and checked the value in the guest
Total memory:42971840KB,it was bigger than host's 32395008KB.It is unreasonable from QE's opinions.

Expected results:
The memory hotplugged for guest should not exceed the host's memory

Additional info:
x86 and ppc64le all have the issue.

Comment 2 Igor Mammedov 2017-03-16 09:22:33 UTC
it's not a bug but a variation of issues as in bug 1269774,
i.e. by default overcommit is enabled on host.
you can disable overcommit on host and enable preallocate policy when adding memory backend object on qemu side.

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

Comment 3 Igor Mammedov 2017-07-20 08:24:48 UTC
*** Bug 1472561 has been marked as a duplicate of this bug. ***


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