Scenario is that I run various VirtualBox VMs on my Ubuntu 16.04 workstation. The workstation is set to go into suspend mode after a period of inactivity.
Problems arise with VMs when I resume power after automatic suspend - time not in sync, VMs sometimes refusing to respond. OK, I could turn off the power management option but is there any way I can get Ubuntu to check if certain processes are running before it suspends power?
Am happy to write (and share) a script to do this if somebody could point me to the way that the system deals with power management?