I am running a few Ubuntu VMs on a MacBook Pro host.
Whenever I pause a VM or save its state to disk, the next time I restart it, the system clock goes out of sync.
Is there a way for the VM to know it has just been resumed, and run a command? (for example, running
ntpdate -u time.nist.gov as root would do the trick)
I tried modifying the scripts in
/etc/pm/sleep.d, but these don't appear to be called on VM suspend/resume.