设为首页 收藏本站
查看: 1146|回复: 0

[经验分享] vmware guest 禁用时间同步

[复制链接]

尚未签到

发表于 2018-6-5 13:40:07 | 显示全部楼层 |阅读模式
  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1189
描述
  VMware Tools 控制面板去掉时间同步复选框后,仍然后有时间同步的问题:
  当你暂停一个虚拟机,在下一次恢复虚拟机后时间同不会自动与主机进行同步。
  时间同步用于迁移虚拟机基于vMotion,快照,恢复一个快照,带化虚拟硬盘,或者重启 VMware Tools 服务 在虚拟机(包括重启虚拟机)
  解决方案
  时间同步复选框复选控制周期的进行同步虚拟机当虚拟机正在运行的时候。设置时间同步复选框未勾选的情况下,在默认情况下VMware Tools会同步时间在一些时间。
  有两种方式可以禁用客户机的时间同步。
       
  • 在虚拟机的vmx文件添加配置参数
         

   
   
         
  • 用文本编辑器打开虚拟机配置文件 (/vmfs/volumes/datastore_name/vm_name/vm_name.vmx)      
  • 设置这些选项的值为0,如果参数不存在添加这些项。      
  • 注意: 0 = disable, 1 = enable.         
    tools.syncTime = "0"         
    time.synchronize.continue = "0"           
    time.synchronize.restore = "0"           
    time.synchronize.resume.disk = "0"           
    time.synchronize.shrink = "0"           
    time.synchronize.tools.startup = "0"           
    time.synchronize.tools.enable = "0"           
    time.synchronize.resume.host = "0"      
  • 注意: In GSX, VMware Fusion, VMware Player and VMware Workstation, you must use "FALSE" instead of "0". For example:         
    tools.syncTime = "FALSE"         
    time.synchronize.continue = "FALSE"           
    time.synchronize.restore = "FALSE"           
    time.synchronize.resume.disk = "FALSE"           
    time.synchronize.shrink = "FALSE"           
    time.synchronize.tools.startup = "FALSE"           
    time.synchronize.tools.enable = "FALSE"           
    time.synchronize.resume.host = "FALSE"      
  • vSphere Client中添加配置文件:  选择需要更改的虚拟机,关闭电源。
      在Summary标签,单击Edit Settings.
      点击Options标签,单击通用(在Advanced选件下面)
      点击配置参数,点击Add Row添加如下信息         
             Name    Value           
            tools.syncTime    0           
            time.synchronize.continue    0           
            time.synchronize.restore    0           
            time.synchronize.resume.disk    0           
            time.synchronize.shrink    0           
            time.synchronize.tools.startup    0           
            time.synchronize.tools.enable    0           
            time.synchronize.resume.host    0
       
  官方文档参考
     
Details     
In the VMware Tools control panel, the time synchronization checkbox is unselected, but you may experience these symptoms:
  When you suspend a virtual machine, the next time you resume that virtual machine it synchronizes the time to adjust it to the host.   
    Time is resynchronized when you migrate the virtual machine using vMotion, take a snapshot, restore to a snapshot, shrink the virtual disk, or restart the VMware Tools service in the virtual machine (including rebooting the virtual machine).
  Solution   
The time synchronization checkbox controls only whether time is periodically resynchronized while the virtual machine is running. Even if this box is unselected, by default VMware Tools synchronizes the virtual machine's time after a few specific events that are likely to leave the time incorrect.
  There are two methods to completely disable time synchronization in the guest. Perform one of these procedures:
  Note: Unlike the normal periodic time sync, which can move the guest clock only forward, these special time syncs can move the guest clock either forward or backward. If you want your guests to never sync backward in time, disable the options (by selecting "0" for each option).
  Add configuration options in the virtual machine's .vmx file:
  Open the virtual machine's configuration file (/vmfs/volumes/datastore_name/vm_name/vm_name.vmx) using a text editor.   
        Set these options to zero. If the entries do not exist, add them.
  Note: 0 = disabled, 1 = enabled.
  tools.syncTime = "0"   
        time.synchronize.continue = "0"     
        time.synchronize.restore = "0"     
        time.synchronize.resume.disk = "0"     
        time.synchronize.shrink = "0"     
        time.synchronize.tools.startup = "0"     
        time.synchronize.tools.enable = "0"     
        time.synchronize.resume.host = "0"
  Note: In GSX, VMware Fusion, VMware Player and VMware Workstation, you must use "FALSE" instead of "0". For example:
  tools.syncTime = "FALSE"   
        time.synchronize.continue = "FALSE"     
        time.synchronize.restore = "FALSE"     
        time.synchronize.resume.disk = "FALSE"     
        time.synchronize.shrink = "FALSE"     
        time.synchronize.tools.startup = "FALSE"     
        time.synchronize.tools.enable = "FALSE"     
        time.synchronize.resume.host = "FALSE"
  Add configuration parameters using the vSphere Client:
  Select the virtual machine in the vSphere Client inventory and power it off.   
        On the Summary tab, click Edit Settings.     
        Click the Options tab and click General (under Advanced).     
        Click Configuration Parameters, then click Add Row and add this information:
  Name    Value   
        tools.syncTime    0     
        time.synchronize.continue    0     
        time.synchronize.restore    0     
        time.synchronize.resume.disk    0     
        time.synchronize.shrink    0     
        time.synchronize.tools.startup    0     
        time.synchronize.tools.enable    0     
        time.synchronize.resume.host    0
  Note: When adding tools.syncTime via the Configuration Parameters in vSphere 5.x, it will not be displayed again after the entry has been accepted and closed. When you view the vm_name.vmx file, you see the parameter inserted as tools.syncTime = "FALSE".
  This Article Replaces   
1006449     
Update History     
04/20/2012 - Added time.synchronize.tools.enable = "0" and added note about disbling backward time sync 06/17/2011 - Added time.syncronize.resume.host = "0" as an options 06/18/2013 - Added note on how to set the options in VMware Fusion/Workstation 03/03/2014- Added VMware Player to Note about using Flase for setting options     
Request a Product Feature     
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-518896-1-1.html 上篇帖子: VMware (CentOS 6.x)克隆导致的网卡问题 下篇帖子: Linux Vmware Nat端口映射配置
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表