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

Shutdown should prefer qemu-ga first instead of ACPI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • CNV v4.19.0
    • CNV v4.15.2
    • CNV Virt-Cluster
    • None
    • NEXT UpstreamCI Platfrm Sprint, CNV Virtualization Sprint 259
    • 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

       

              kbidarka@redhat.com Kedar Bidarkar
              rhn-support-gveitmic Germano Veit Michel
              Kedar Bidarkar Kedar Bidarkar
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: