AlmaLinux 8.6 : Automatically shutdown guest machines on virtual host

I have setup an AlmaLinux 8.6 server as a virtualisation host. I want to know what the default behavior is when you restart the virtual host.

Also how would I customise the server to suspend certain guests on reboot/shutdown or shutdown certain guests on reboot/shutdown?

that’s what libvirtd and libvirt-guests is for - starts guests configured to autostart on boot, and suspends them on shutdown.

I have changed the configuration file but the server does not wait for guest to shutdown when issuing a reboot command. Here’s my configuration setting:
ON_SHUTDOWN=shutdown
PARALLEL_SHUTDOWN=3
SHUTDOWN_TIMEOUT=3600

Guest services wasn’t enabled. It needed systemctl enable --now libvirt-guests.service. This time the virtual host does appear to be waiting for the guest to shutdown.

However, the guest does not appear to have shutdown gracefully. I can’t see any shutdown commands with last -x -F shutdown. Is there a way to determine if server was shut arruptly?

Actually, it does shutdown gracefully on one machine. The other machine is running D3 and AlmaLinux is having issues shutting down the service. I guess the host ends up forcefully terminating the guest due to it taking too long.