Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7495

Error msg should be more user friendly and precise when attaching memory device without guest numa configured.

    • Minor
    • sst_virtualization
    • ssg_virtualization
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      Error msg should be more user friendly and precise when attaching memory device without guest numa configured.

      Version-Release number of selected component (if applicable):

      1. rpm -q libvirt
        libvirt-8.9.0-2.el9.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1.Start a guest vm without maxMemory and guest numa configured.

      1. virsh start vm1
        Domain 'vm1' started

      2.Prepare a memory device xml like below:
      <memory model='dimm'>
      <source>
      <pagesize unit='KiB'>1048576</pagesize>
      <nodemask>0-1</nodemask>
      </source>
      <target>
      <size unit='KiB'>1048576</size>
      <node>0</node>
      </target>
      </memory>

      3.Attach the memory device with xml from step2.

      1. virsh attach-device vm1 dimm1G.xml
        error: Failed to attach device from dimm1G.xml
        error: can't add memory backend for guest node '0' as the guest has only '0' NUMA nodes configured

      Actual results:
      Unfriendly error msg prompts:
      error: can't add memory backend for guest node '0' as the guest has only '0' NUMA nodes configured

      Expected results:
      The error msg should be more friendly and precise to describe the issue

      Additional info:
      if define maxMemory and only 1 guest numa cell '0' like below:
      <maxMemory slots='16' unit='KiB'>15242880</maxMemory>
      ...
      <numa>
      <cell id='0' cpus='0-1' memory='2097152' unit='KiB'/>
      </numa>

      Then the guest vm can be started and attach the memory device.
      So the error msg for this issue makes user confused. Since the below scenario also has '0' numa node exists in guest.

            khanicov@redhat.com Kristina Hanicova
            lcong@redhat.com Liang Cong
            Kristina Hanicova Kristina Hanicova
            Liang Cong Liang Cong
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: