The time in my guest VM is faster than the host time by about 20-30 minutes. What can can I do so that the time in the guest is the same as on the host?
migrated from stackoverflow.com Aug 18 '12 at 2:16
This question came from our site for professional and enthusiast programmers.
For a Linux host, first install the DKMS (Dynamic Kernel Module Support) package on the guest machine (source):
Then install Guest Additions into guest system:
Also, here are descriptions of some commands to tune VirtualBox time synchronization.
The following setup allows my guest to reliably maintain a time that is accurate to within 1 second of my host. It is tested with the host running VirtualBox 4.3.26 and the guest running the same version of VirtualBox Guest Additions.
On the host, list VMs to ascertain the name of the relevant VM.
On the host, configure time synchronization parameters for the guest by running the commands below. First set
The values of the time parameters above have been constrained to multiples of 10. It may be tempting to set
On the host, view the updated relevant values for the guest. These can be reconfirmed at any time.
On the guest, stop and disable all internal NTP and related timekeeping services. They should not be used as they are likely to interfere with VirtualBox. On a CentOS 6 guest:
On the guest, restart the service named
If the time on the guest is not yet synced, reboot the guest.