This post will tell the process of shutdown a VM when you press the ‘shutdown’ button from AdminPortal.

Here is the detailed process of a VM shutdown:

1. On AdminPortal, click ‘shutdown’ button on a VM.

2. RHV engine sends the “PoweringDown” to vdsm.

3. vdsm talks with libvirt to release VM resources. The below similar log can be seen in the vdsm.log:

2020-08-14 04:59:21,964+0900 INFO (libvirt/events) [virt.vm] (vmId='xxxxxxxxxxx') Release VM resources (vm:5168)

4. libvirt invoke virDomainShutdown to check domain connection and qemu driver.

5. Qemu driver invoke qemuDomainShutdown.

  • If ovirt-guest-agent is installed and running well on the VM guest, Qemu will notify VM through Ovirt Guest Agent and then do the shutdown operation.
  • If ovirt-guest-agent isn’t installed on the VM guest, qemu will check if ACPI service is running. Then it will invoke qemuMonitorSystemPowerdown to send system_powerdown command and VM will be powered off.