-
Bug
-
Resolution: Unresolved
-
Undefined
-
rhel-9.3.0
-
qemu-kvm-9.1.0-1.el9
-
None
-
Low
-
rhel-sst-virtualization
-
ssg_virtualization
-
3
-
QE ack
-
False
-
-
None
-
None
-
Requested
-
None
-
-
x86_64
-
None
What were you trying to do that didn't work?
When trying to start guest with invaid target size for dimm type memory, the error info is not so accurate. And it's difficult to know how to correct the setting according to the error info.
Steps to reproduce
- Allocate 1G hugepage memory:
#echo 5 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
2.Mount 1G hugepage path and restart virtqemud:
#mkdir /dev/hugepages1G
#mount -t hugetlbfs -o pagesize=1G hugetlbfs /dev/hugepages1G
#systemctl restart virtqemud
3.Edit guest xml with 1G hugepage setting and a dimm type memory device with 500M target size:
#virsh edit vm1
<domain>
...
<maxMemory slots='16' unit='KiB'>25600000</maxMemory>
...
<memoryBacking>
<hugepages>
<page size='1048576' unit='KiB' nodeset='0'/>
</hugepages>
</memoryBacking>
...
<devices>
...
<memory model='dimm'>
<target>
<size unit='KiB'>524288</size>
<node>0</node>
</target>
<alias name='ua-c80aba6e-b6d8-448b-ab6e-8c7b5c29f353'/>
<address type='dimm' slot='0'/>
</memory>
...
</devices>
<domain>
4.Start the guest:
# virsh start vm1
error: Failed to start domain 'vm1'
error: internal error: QEMU unexpectedly closed the monitor (vm='vm1'): 2023-08-10T03:22:44.187869Z qemu-kvm: memory size 0x20000000 must be equal to or larger than page size 0x40000000
5.Edit the target size of dimm type memory device to 1280M:
#virsh edit vm1
...
<memory model='dimm'>
<target>
<size unit='KiB'>1310720</size>
<node>0</node>
</target>
<alias name='ua-c80aba6e-b6d8-448b-ab6e-8c7b5c29f353'/>
<address type='dimm' slot='0'/>
</memory>
....
6.Start the guest again:
# virsh start vm1
error: Failed to start domain 'vm1'
error: internal error: QEMU unexpectedly closed the monitor (vm='vm1'): qemu_madvise: Invalid argument
madvise doesn't support MADV_DONTDUMP, but dump_guest_core=off specified
2023-08-10T03:25:41.864154Z qemu-kvm: cannot bind memory to host NUMA nodes: Invalid argument
7.Can start the guest successfully with 1G target size dimm type memory device.
Expected results
The error info should be more accurate, such as: 'memory size of dimm type memory device must be Integer multiple of the hugepage size'.
Actual results
Can not get accurate failed reason from 'Invalid argument'
- links to
-
RHBA-2024:139949 qemu-kvm bug fix and enhancement update