Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-57943

[CNV 4.18] Shutdown should prefer qemu-ga first instead of ACPI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • CNV v4.18.5
    • CNV v4.15.2
    • CNV Virtualization
    • None
    • CNV Virt-Cluster Sprint 269, CNV Virt-Cluster Sprint 270
    • Moderate
    • No

      Description of problem:

      When a shutdown is requested, virt-launcher asks libvirt to do a shutdown via ACPI (power button).

      func (l *LibvirtDomainManager) SignalShutdownVMI(vmi *v1.VirtualMachineInstance) error {
      ...
      if domState == libvirt.DOMAIN_RUNNING || domState == libvirt.DOMAIN_PAUSED
      { err = dom.ShutdownFlags(libvirt.DOMAIN_SHUTDOWN_ACPI_POWER_BTN) <-----
      ... }
      

       

      This is not an optimal graceful shutdown method, the Guest OS configuration may ignore this, ask confirmation etc.

      Guest Agent is the prefered method over ACPI, its even in our RHEL9 documentation: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/configuring_and_managing_virtualization/index#virtualization-features-that-require-qemu-guest-agent_enabling-qemu-guest-agent-features-on-your-virtual-machines

      Other products such as RHV (and vSphere) will also try to shutdown first via Guest Agent if its connected, and only fallback to ACPI if that is not available.

      This reduces the chances of VMs getting stuck on shutdown and also possibly killed by timeout, which is not ideal.

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

      4.15.2

      How reproducible:

      Always

      Steps to Reproduce:

      1. Get a Windows VM and set some custom power policy so that the power button is ignored, or asks the user to confirm etc https://www.bringingyourtechtolife.com/post/changing-what-your-power-button-does-on-laptop
      2. Send the graceful shutdown request from console
      

      Actual results:

      Guest doesn't shutdown gracefully

      Expected results:

      Guest shutdown gracefully

       

        1. image-2025-03-13-10-01-59-884.png
          387 kB
          Kedar Bidarkar
        2. image-2025-05-15-15-11-07-801.png
          358 kB
          Sibo Wang

              lpivarc Luboslav Pivarc
              rhn-support-gveitmic Germano Veit Michel
              Sibo Wang Sibo Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: