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

VM can start successfully with invalid rom setting

    • None
    • None
    • rhel-sst-virtualization
    • ssg_virtualization
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      VM can start successfully with invalid rom setting

      Please provide the package NVR for which bug is seen:

      libvirt-9.5.0-7.el9_3.x86_64

      How reproducible:

      100%

      Steps to reproduce

      1. the interface with <rom bar="off" file="/usr/share/ipxe/1af41000.rom"/> can start successfully.

      # virsh dumpxml rhel --xpath //interface
      <interface type="network">
        <mac address="52:54:00:66:84:76"/>
        <source network="default"/>
        <model type="virtio"/>
        <rom bar="off" file="/usr/share/ipxe/1af41000.rom"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface>
      
      # virsh start rhel
      Domain 'rhel' started
      
      # virsh dumpxml rhel --xpath //interface
      <interface type="network">
        <mac address="52:54:00:66:84:76"/>
        <source network="default" portid="60f0a578-42bb-4502-8e03-5be19ba82208" bridge="virbr0"/>
        <target dev="vnet15"/>
        <model type="virtio"/>
        <alias name="net0"/>
        <rom bar="off" file="/usr/share/ipxe/1af41000.rom"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </interface>
      

      2. Hotplug interface with <rom bar="off" file="/usr/share/ipxe/1af41000.rom"/> will fail:

      # virsh domiflist rhel
       Interface   Type   Source   Model   MAC
      ------------------------------------------
      
      # cat interface.xml
      <interface type="network">
        <source network="default"/>
        <model type="virtio"/>
        <rom bar="off" file="/usr/share/ipxe/1af41000.rom"/>
      </interface>
      
      # virsh attach-device rhel interface.xml
      error: Failed to attach device from interface.xml
      error: internal error: unable to execute QEMU command 'device_add': Hot-plugged device without ROM bar can't have an option ROM
      

      Expected results

      The validation should be the same for hotplug and start vm

      Actual results

      Start vm should fail with the confusing rom setting

              mkletzan@redhat.com Martin Kletzander
              yalzhang@redhat.com Yalan Zhang
              Martin Kletzander Martin Kletzander
              Yanqiu Zhang Yanqiu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: