Virtual Machine Time drift Solution

Source: Internet
Author: User

Since the company deployed Hyper-V 3.0, Fox has deployed domain control in the Virtual Machine server farm and eliminated the old physical machine DC. In the past few weeks, we found that the time for computers and Lync phones in the Company domain is 10 minutes different from the standard time. Therefore, the domain controller and the physical Host change the time back. I can't think of another half an hour difference between the two-day domain control time and the standard time.

The reason for this problem is that the only domain control server is deployed in the Virtual Machine Server field and the time of the physical machine is used as the time source. The time server is enabled in the domain control, so that the time source of the physical machine in the domain points to the domain control server of the virtual machine. This setting will cause the Virtual Machine Time to drift ).

On the domain controller, we open the command prompt with the administrator privilege. Enter the following command:W32tm/query/source
650) this. width = 650; "width =" 730 "height =" 443 "title =" image "style =" border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; background-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/00400C338-0.png "border =" 0 "/>

We can see that the time synchronization source of domain control is the time of the physical machine through the Virtual Machine management tool.

Domain control is enabled on the DHCP server as the time server.
650) this. width = 650; "width =" 730 "height =" 386 "title =" image "style =" border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; background-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/0040063618-1.png "border =" 0 "/>

Enter the preceding command on the Host of the physical machine to view the time synchronization source. The time source of the physical machine points to the domain control in the virtual machine.
650) this. width = 650; "width =" 730 "height =" 453 "title =" image "style =" border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; background-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/00400A5U-2.png "border =" 0 "/>

To solve the time drift of virtual machines, we must first disconnect the time synchronization between the virtual machine domain control and the physical host. We can simply disable time synchronization between Hyper-V and physical hosts through virtual machine management tools, but this is not a recommended practice. This will affect the startup and recovery of virtual machines. You can run the following command in the Virtual Machine domain control to disconnect the time synchronization between the virtual machine and the physical machine without disabling the service:
Reg add HKLM \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ TimeProviders \ VMICTimeProvider/v Enabled/t reg_dword/d 0
650) this. width = 650; "width =" 730 "height =" 447 "title =" image "style =" border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; background-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/0040061D9-3.png "border =" 0 "/>

Next, enter the following command to allow the domain controller to find the most appropriate time source in the domain, which may be another domain controller) for synchronization:W32tm/config/syncfromflags: DOMHIER/updateIf only one domain controller wants to synchronize with an external time source, see the following documents:Http://technet.microsoft.com/en-us/library/cc784553 (WS.10). aspx
650) this. width = 650; "width =" 730 "height =" 445 "title =" image "style =" border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; background-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/0040062501-4.png "border =" 0 "/>

Restart the Time Service and enter the following command:Net stop w32time & net start w32time
650) this. width = 650; "width =" 730 "height =" 452 "title =" image "style =" border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; background-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/0040063259-5.png "border =" 0 "/>

To force time synchronization with the new time source, enter the following command:W32tm/resync/force
650) this. width = 650; "width =" 730 "height =" 442 "title =" image "style =" border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; background-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/00400C160-6.png "border =" 0 "/>

Run the following command to check whether the synchronization time source of the domain controller is correct:W32tm/query/source
650) this. width = 650; "width =" 730 "height =" 448 "title =" image "style =" border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; background-image: none; padding-top: 0px; padding-right: 0px; padding-left: 0px; "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/00400BJ3-7.png "border =" 0 "/>

We can see that the time synchronization source of the domain control has changed from a physical host to another domain control. This solves the problem of time drift in the Virtual Machine domain control.

 

This article is from the "Everything is IT" blog, please be sure to keep this source http://ssfox.blog.51cto.com/1072207/1286951

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.