Windows の時刻管理のベスト プラクティス(NTP 含む)
search cancel

Windows の時刻管理のベスト プラクティス(NTP 含む)

book

Article ID: 340375

calendar_today

Updated On:

Products

VMware VMware Desktop Hypervisor VMware vSphere ESXi

Issue/Introduction

Disclaimer : This is a Japanese translation of the article " Timekeeping best practices for Windows, including NTP (1318) " in English. Because articles are being translated with best effort, localized content may not be the latest information. Please refer to the English version article for the latest information.

 
This article describes best practices for realizing accurate time management of Windows guest OS. These recommendations also include recommended configurations for time synchronization on guests and hosts.


Resolution

There are two important considerations for achieving accurate time management in Windows guest operating systems. It is to correctly configure the time synchronization and to avoid excessive CPU and memory overcommitment. The time synchronization utility is necessary to correct time lag due to hardware time deviation and inaccuracy of time management of guest OS. Excessive over-commitment may cause time lag in the time synchronization utility at an irreparable pace. This best practice article discusses time synchronization recommendations.

Time synchronization

Use w32time or NTP as the primary time synchronization utility. w32time is a time synchronization utility included with Windows. The Network Time Protocol daemon (NTP) is available on Windows by using various kinds of third party ports provided for Windows.
 
Windows version Recommended time synchronization utility
Windows 2008w32time or NTP
Windows Vistaw32time or NTP
Windows 2003w32time or NTP
Windows XPNTP
Windows 2000NTP


w32time configuration

When using w32time, there are multiple configuration parameters that can be changed. The following table shows relevant parameters and recommended values. All parameters are saved in the registry. Some parameters can also be changed from the w32tm utility instead of directly editing the registry. This best practice guide describes how to run w32time in NTP mode. w32time can also be used as a time server in the Windows domain hierarchy, but it will not be discussed in this best practice guide.
 
After changing the setting of w32time, you need to restart w32time. Restart the virtual machine, execute net stop w32time && net start w32time from the command line, or stop and start the w32time service. After restarting the w32time service, execute the command w32tm / resync to resynchronize the time to w32time.
 
KeyDetails
HKEY_LOCAL_MACHINE \
SYSTEM\CurrentControlSet\
Services\W32Time\
TimeProviders\NtpClient\
SpecialPollInterval
推奨値: 900
種類: REG_DWORD
説明: このパラメータは、クライアントの時刻を修正する必要があるかどうかを確認するため、 w32time が時刻サーバをポーリングする頻度を制御します。パラメータにはポーリング間の時間を指定します。推奨値の 900 では、 15 分ごとに時刻サーバをポーリングするように指定されます。
HKEY_LOCAL_MACHINE\
SYSTEM\CurrentControlSet\
Services\W32Time\Parameters\
NtpServer
推奨値
1.pool.ntp.org,0x1
2.pool.ntp.org,0x1
3.pool.ntp.org,0x1
種類: REG_SZ

説明:このパラメータには使用する時刻サーバを指定します。サーバを空白区切りの文字列で指定します。サーバ名の後に 「,0x1」 と指定すると、サーバは SpecialPollInterval 設定で指定された頻度でアクセスされます。

:使用環境で利用可能な NTP サーバを参照するように推奨値を変更します。
 
w32tm Command:
w32tm /config"/manualpeerlist:
1.pool.ntp.org,0x1
2.pool.ntp.org,0x1
3.pool.ntp.org,0x1"
 
:使用環境で利用可能な NTP サーバを使用するようにコマンドを変更します。
HKEY_LOCAL_MACHINE\
SYSTEM\CurrentControlSet\
Services\W32Time\Parameters\
Type
推奨値:NTP
種類:REG_SZ
説明:このパラメータは w32time が使用するモードを指定します。値 NT5DS は、 w32time が NtpServer キーで指定した NTP サーバではなく Windows ドメイン階層を時刻サーバとして使用することを示します。
w32tm Command:
w32tm /config /syncfromflags:
MANUAL
 

VMware Tools の時刻同期と構成

ゲストで w32time または NTP を使用する場合は、 VMware Tools の定期的な時刻同期を無効にします。
 
VMware Tools の定期的な時刻同期を無効にするには、次のいずれかのオプションを使用します。
  • 仮想マシンの構成ファイル (.vmx ファイル) で、tools.syncTime = "0" に設定する。

    または
     
  • ゲスト OS の VMware Tools ツールボックスの GUI にある [仮想マシンとホスト OS 間の時刻の同期を有効にする] を選択解除する。

    または
     
  • ゲスト OS で VMwareService.exe -cmd "vmx.set_option synctime 1 0" コマンドを実行する。VMwareService.exe は通常、C:\Program Files\VMware\VMware Tools にインストールされています。
これらのオプションでは、 VMware Tools の起動、スナップショットの作成、スナップショットによるレジューム、サスペンド状態からのレジューム、または VMotion などのイベントで、 VMware Tools が実行する一時的な同期は無効になりません。VMware Tools の定期的な時刻同期が無効な場合も、これらのイベントでは、ゲスト OS の時刻とホスト OS の時刻とで同期をとります。そのため、ホスト OS の時刻が正しいことを確認することは重要です。詳細については、「VMware 仮想マシンの時刻管理」(英語)を参照してください。
 
VMware ACE、VMware Fusion、VMware GSX Server、VMware Player、VMware Server、および VMware Workstation のホスト OS の時刻を正しくするためには、ホストで NTP や w32time などの時刻同期ソフトウェアを実行します。VMware ESX の場合は、サービス コンソールで NTP を実行します。VMware ESXi の場合は、VMkernel で NTP を実行します。
 

必要なパッチ

マルチメディア タイマー インターフェイスを使用すると Windows 仮想マシンの時刻が早くなる (1005953)(英語)」 に、仮想マシンで Windows を実行するときに発生する可能性のある既知の問題について記載されています。この問題は最近の VMware 製品では解決しています。次の表に、修正が含まれるバージョンの製品を使用しているかを確認するために必要な操作を示します。
 
製品名
操作
ESXi 3.5 以降
必要な操作はありません。
ESX 3.0.3
パッチ ESX303-200910401-BG が適用されていることを確認します。
ESX 3.0.2
パッチ ESX-1002087 が適用されていることを確認します。
ESX 3.0.1
パッチ ESX-1002082 が適用されていることを確認します。
ESX 3.0.0
パッチ ESX-1002081 が適用されていることを確認します。
ESX 2.5.x 以前
ESX 3.0.0 以降にアップグレードします。
Fusion 2.0 以降
必要な操作はありません。
Fusion 1.x
Upgrade to Fusion 2.0 or later.
Player 2.0 or later
There is no necessary operation.
Player 1.x
Upgrade to Player 2.0 or later.
Workstation 6.0 and later
There is no necessary operation.
Workstation 5.x
Upgrade to Workstation 6.0 or later.
 


Additional Information

For details on setting up an NTP server on an ESX host, refer to " Configuration Guide for NTP on ESX Server (1033366 )".

Please refer to the article of Microsoft for details on the configuration of Windows's official time server.
Note : The above link is a valid link as of February 11, 2011. If the link is broken please give us feedback on the article. A VMware representative will update the article as necessary.
For details on the Linux system, refer to " Linux Guest Time Management Best Practices (1033498) ".
Timekeeping best practices for Windows, including NTP