-
Bug
-
Resolution: Done-Errata
-
Undefined
-
rhel-9.3.0
-
libvirt-10.0.0-1.el9
-
None
-
Moderate
-
rhel-sst-virtualization
-
ssg_virtualization
-
20
-
26
-
None
-
QE ack, Dev ack
-
False
-
-
None
-
None
-
Pass
-
Manual
-
-
10.0.0
-
None
What were you trying to do that didn't work?
Error msg prompts when attaching virtio-mem device to persistent guest config without memory slot.
Please provide the package NVR for which bug is seen:
# rpm -q libvirt
libvirt-9.5.0-7.el9_3.x86_64
How reproducible:
100%
Steps to reproduce
1. Define a guest with below config xml:
<maxMemory unit="KiB">20485760</maxMemory>
<memory unit="KiB">2097152</memory>
<currentMemory unit="KiB">2097152</currentMemory>
...
<numa>
<cell id="0" cpus="0-5" memory="2097152" unit="KiB"/>
</numa>
2. Prepare a virtio-mem device with below config xml:
# cat mem.xml
<memory model='virtio-mem'>
<target>
<size unit='MiB'>512</size>
<block unit='KiB'>2048</block>
<requested unit='MiB'>512</requested>
<node>0</node>
</target>
</memory>
3. Attach the virtio-mem device from step2:
# virsh attach-device vm1 mem.xml --config
error: Failed to attach device from mem.xml
error: unsupported configuration: no free memory device slot available
Expected results
The virtio-mem device should be attached successfully.
Actual results
Error msg "no free memory device slot available" prompts while attaching.
Additional info:
If define the guest with below config xml:
<maxMemory unit="KiB">20485760</maxMemory>
<memory unit="KiB">2097152</memory>
<currentMemory unit="KiB">2097152</currentMemory>
...
<numa>
<cell id="0" cpus="0-5" memory="2097152" unit="KiB"/>
</numa>
...
<memory model='virtio-mem'>
<target>
<size unit='MiB'>512</size>
<block unit='KiB'>2048</block>
<requested unit='MiB'>512</requested>
<node>0</node>
</target>
</memory>
The the guest config could be defined:
# virsh define vm1.xml
Domain 'vm1' defined from vm1.xml
Then attach the virtio-mem device with --config, we could get successful result:
# virsh attach-device vm1 mem.xml --config
Device attached successfully
- is blocked by
-
RHEL-15267 Rebase libvirt in RHEL-9.4.0
- Closed
- links to
-
RHBA-2023:125049 libvirt bug fix and enhancement update
- mentioned on