使用vmware server创建的虚拟机会有时间不同步的情况,如果是windows的虚拟系统,可以通过安装vmware tools后在控制面板设置好便可以定时同步。如果是linux的虚拟系统,通过编辑vmx文件,添加或修改对应的选项:
tools.syncTime = TRUE
time.synchronize.continue = TRUE
time.synchronize.restore = TRUE
time.synchronize.resume.disk = TRUE
time.synchronize.shrink = TRUE
time.synchronize.tools.startup = TRUE
解释如下:
Option | Effect |
tools.syncTime | If set to TRUE, the clock syncs periodically. |
time.synchronize.continue | If set to TRUE, the clock syncs after taking a snapshot. |
time.synchronize.restore | If set to TRUE, the clock syncs after reverting to a snapshot. |
time.synchronize.resume.disk | If set to TRUE, the clock syncs after resuming from suspend and after migrating to a new host using the VMware VMotion feature. |
time.synchronize.shrink | If set to TRUE, the clock syncs after defragmenting a virtual disk. |
time.synchronize.tools.startup | If set to TRUE, the clock syncs when the tools daemon starts up, normally while the guest operating system is booting. |
参考自:www.vmware.com/pdf/vmware_timekeeping.pdf