I have a virtual machine running headless in my machine. When I start it for the first time, the result of date command is correct. But after about a day or 2, I SSH into it and the date command has become late. Like when I tried today, it's already 5 days behind. A restart of the machine fixes this issue (but I don't want to restart all the time).How do I keep the time/date updated on my server virtual machine over time?I've noticed this behavior with CentOS 7 and Turnkey Linux (Debian 7) guest OSes. The host is a Mac mini and I'm virtualizing with VirtualBox.
How do I keep the time on a server (virtual machine) updated over time?
virtualbox;virtual machine;clock