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

[Improvement]Auto-resolve Hyper-V enlightenments dependence

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • No
    • None
    • rhel-virt-core-libvirt-1
    • ssg_virtualization
    • 5
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • x86_64
    • None

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

      As subject

      What is the impact of this issue to you?

      Without this, it is inconvenient to resolve the error for the dependence of Hyper-V enlightenment

      Please provide the package NVR for which the bug is seen:

      libvirt v10.10.0-82-g247357cc29
      qemu-kvm-9.1.0-7.el9.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. Prepare a domain with <evmcs state='on'/>  only for hyperv
        XML:
      <domain ...>
      ...
        <features>
          <acpi/>
          <apic/>
          <hyperv mode='custom'>
            <evmcs state='on'/>
          </hyperv>
          <smm state='on'/>
        </features>
      ...
      </domain>

      Create the domain:

      ➜  ~ virsh create win11.xml
      error: Failed to create domain from win11.xml
      error: internal error: QEMU unexpectedly closed the monitor (vm='win11'): 2024-12-30T06:49:12.221621Z qemu-kvm: Hyper-V enlightened VMCS (hv-evmcs) requires Hyper-V virtual APIC (hv-vapic)

      It failed because of missing hv-vapic dependency

      For the dependence of hyper-v features, see https://www.qemu.org/docs/master/system/i386/hyperv.html#existing-enlightenments

      Expected results

      expect libvirt could add hyper-v feature dependence automaticlly. For the example above, the domain could be created. Then hv-vapic  is added to the live XML:

      <domain ...>
      ...
        <features>
          <acpi/>
          <apic/>
          <hyperv mode='custom'>
            <vapic state='on'/>
            <evmcs state='on'/>
          </hyperv>
          <smm state='on'/>
        </features>
      ...
      </domain>

      BTW, add a info log to the virtqemud log, like:

      info: Add vapic to hyperv due to the dependence of evmcs

      Actual results

      As above

              virt-maint virt-maint
              rhn-support-hhan Han Han
              virt-maint virt-maint
              Liang Cong Liang Cong
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated: