禁止VMware虚拟机与Host的时间同步

禁止VMware虚拟机与Host的时间同步

 

1. 查看虚拟机是否安装了 VMware Tools, 如果有安装,则将 VMware Tools 属性窗口的“选项”-->“其他选项”中“虚拟机与宿主机操作系统时间同步(T)”前面的勾去掉,点击确定。

 

2. 关闭虚拟机(是关机,而非休眠),关闭 VMware Workstation。

 

3. 查看宿主机中的服务中是否有名称为 “VMware Tools Service” 的服务,如果有,则禁用该服务。

 

4. 用记事本打开 .vmx 文件,如“F:/My Virtual Machines/Red Hat Enterprise Linux 4/Red Hat Enterprise Linux 4.vmx”

 

5. 将如下配置项的值改为 FALSE

 

6. 如果需要设置虚拟机的启动时间,则修改配置项 rtc.startTime 的值,该配置项的值是从 1970 年 1 月 1 日 0 时 0 分 0 秒到当前时间的秒数。

  如,将 rtc.startTime 的值设置为 1218182888 后,重新启动虚拟机时,虚拟机的时间将被设置为 2008 年 8 月 8 日 8 时 8 分 8 秒


  可以通过这个网址将某个时间转换为 UNIX 时间戳:http://www.onlineconversion.com/unix_time.htm

 

7. 运行 VMware Workstation,启动虚拟机。

 

附 1:如果是 virtual pc 2007,则用记事本打开 .vmc 文件(virtual pc 2007 的配置文件),将 <host_time_sync> 下 <enabled> 的值改为 false,如:

 

 

附 2:对 .vmx 文件中修改的几个配置项的说明(参考于 http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf 第 17 页):

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.

  以下内容参考于 http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf 第 8 页
     You can also force the CMOS TOD clock to start at a specified time whenever the virtual machine is powered on, independent of the real time. To do this, set the configuration file option rtc.startTime. The value you specify is in seconds since Jan 1, 1970 00:00 UTC, but it is converted to the local time zone of the host operating system before setting the CMOS TOD clock (under the assumption that the guest operating system requires the CMOS TOD clock to read in local time). If your guest operating system is running the CMOS TOD clock in UTC or some other time zone, you should correct for this when setting rtc.startTime.

  • 0
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值