分享

HELP: VMware - Fixing Time Keeping Problems with the Guest OS

 cwhbox 2012-09-02

Because virtual machines work by time-sharing host physical hardware, a virtual machine cannot exactly duplicate the timing behavior of a physical machine. VMware virtual machines use several techniques to minimize and conceal differences in timing behavior, but the differences can still sometimes cause timekeeping inaccuracies and other problems in guest software.

This problem occurs because current VMware for Linux products do not have complete support for host power management features (such as Intel SpeedStep, or AMD PowerNow or Cool'n'Quiet) that vary the processor speed. To work around this problem, specify the correct maximum CPU speed in your global configuration file.  This can be done on either a Windows host server or a Linux host server.

On a Windows host server:

  1. Find the speed of your host's CPU. For example, in Windows XP, right click My Computer, then chooseProperties. This path may be different, depending on the version of Windows you use.

  2. Look for config.ini in one of the following locations:

    • C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\config.ini

    • C:\Documents and Settings\All Users\Application Data\VMware\VMware GSX Server\config.ini

    • C:\Documents and Settings\All Users\Application Data\VMware\VMware Server\config.ini

    • C:\ProgramData\VMware\VMware Workstation or
      C:\Program Files\VMware\VMware Workstation
      (on a Windows Vista host running Workstation 6.0)

     
  3. Edit config.ini, adding the lines described below.

    host.cpukHz = "X" where "X" equals the maximum speed in KHz of your host machine.  That is, its speed in MHz times 1000 or its speed in GHz times 1000000.  A 3GHz machine would be 3000000.
    host.noTSC = "TRUE"
    ptsc.noTSC = "TRUE"

    The second and third lines enable a mechanism that tries to keep the guest clock accurate even when the time stamp counter (TSC) is slow.

    Note: On Windows, you can use Notepad, but be careful when you save the file that Notepad does not add an extra .txt extension to the filename. You can do that by selecting All files instead of Text files in the Save dialog box.

  4. In addition, check the VMware Tools control panel in the guest operating system. On the Options tab, ensure that Time synchronization between the virtual machine and the host operating system is selected.

On a Linux host server:

To prevent guest clocks from running too quickly, specify the correct maximum host CPU speed in your global configuration file, /etc/vmware/config. If this file exists, edit it with a text editor, adding the lines described below. The file may not exist. If it does not exist, create it as a plain text file.

Add the following lines to your global configuration file:

  host.cpukHz = "X" where "X" equals the maximum speed in KHz of your host machine.  That is, its speed in MHz times 1000 or its speed in GHz times 1000000.  A 3GHz machine would be 3000000.
  host.noTSC = TRUE
  ptsc.noTSC = TRUE

To periodically correct the time (once per minute) when a guest clock runs slowly, VMware Tools must be installed in the guest. On the Options tab of VMware Tools in the guest, verify that Time synchronization between the virtual machine and the host operating system is selected.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多