Slow to shut down and reboot

I’m running FreePBX distro under KVM. Everything is working fine, and I have the kvm guest agent installed, with the appropriate channel assigned to the virtual machine. The problem is, when I issue the guest shutdown command, it takes forever. It took around 5 minutes from the time the shut down command was sent, until the time it actually powered off.

I’m not sure if systemd isn’t stopping a service it should be or if its just a really slow shutdown process, but I need advise on things to check or if this is just the “nature of the beast”. My KVM host will continue with a shutdown if the guest shutdown script hangs for more than 2 minutes on a particular guest machine, and my host is set to power off during power failures after my UPS battery gets to around 10%. I’m not sure what service isn’t being shut down or is causing a hang or why it takes so long to reboot or shutdown. Thanks in advance!

I’m using the Freepbx 14 distro and even when I was on the Freepbx 13 distro it didn’t take more than 10 seconds for the reboot to kick me out and the machine rebooted.

Figured it out. Turned off some kernel command line features so I could see the output. mariadb was hanging on shutdown. Did some more research courtesy of google and found KVM likes to use UTC for hardware time, so I made an adjustment in /etc/adjtime and changed LOCAL to UTC, which fixed a time issue and now it shuts down perfectly.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.