0

我正在尝试纠正我们在本文中提到的天蓝色服务器中看到的一些时间漂移。有没有人能够设置一个 azure 服务器以与 azure 云之外的 NTP 服务器同步?从我读过的内容来看,NTP 使用 UDP,它可以在 azure 中被阻止。谢谢

4

2 回答 2

0

这是我使用的步骤

reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider /v 启用 /t reg_dword /d 0

w32tm /config /syncfromflags:manual /manualpeerlist:0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org

净停止 w32time 和净开始 w32time

w32tm /重新同步 /force

w32tm /查询 /源

于 2013-07-11T18:27:08.187 回答
0

我稍微调整了 NullReference 的脚本,使其能够用作 Azure web/worker 角色中的启动任务,并且每 6 小时同步一次:

REM   *** Change to use NTP for clock sync ***
%windir%\system32\reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider /v Enabled /t reg_dword /d 0 /f

%windir%\system32\reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient /v SpecialPollInterval /t reg_dword /d 21600 /f

%windir%\system32\w32tm /config /syncfromflags:manual /manualpeerlist:0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org

%windir%\system32\net stop w32time & net start w32time

%windir%\system32\w32tm /resync /force
于 2014-04-04T16:31:19.447 回答