Tutorials

Virtualization of your Windows Server 2012 R2 Essentials and set time service on your virtualized domain controller

Virtualization of your Windows Server 2012 R2 Essentials and set time service on your virtualized domain controller

Virtualizing your IT infrastructure is really a good idea even if you are a small organization. If you start with just your Windows Server 2012 R2 Essentials server that is running as a virtualized Domain Controller you can add more virtualized servers if you need them.

It is a huge benefit if you can add servers to the hardware you already own instead of having to purchase more boxes and complicating your IT infrastructure. You should see the Hyper-V server as the foundation of your IT infrastructure that enables you to grow easily.

Time skew can be one of the biggest problems when you have a virtualized domain controller. You do not want that to happen! There are a lot of stories about how to setup your virtualized domain controller and keep the PDC in sync with time. Many of them are confusing. I try to make things as easy as possible.

In our previous articles ‘How to install and configure RSAT on Windows 10 and make it a management workstation that connects to a Hyper-V 2012 R2 core server in a workgroup’ and ‘How to install and configure Microsoft Hyper-V Server 2012 R2’ we created a base line installation on which we will install a Windows Server 2012 R2 Essentials virtualized. In ‘A do-it-yourself guide for installing Windows Server 2012 R2 Essentials’ we describe how to do a basic installation and on our Hyper-V server that is about the same so you should follow that article. For now we focus on creating a new Virtual Machine in Hyper-V.

  1. On our Windows 10 workstation open Server Manager and if you not already have done so and add the Hyper-V server to the server list. Right click the Hyper-V Server and choose Add Roles and Features.
    Install File and Storage Services on the Hyper-V Server
  2. Click Next
    Install File and Storage Services on the Hyper-V Server
  3. Click Next
    Install File and Storage Services on the Hyper-V Server
  4. Click Next
    Install File and Storage Services on the Hyper-V Server
  5. Choose File and Storage Service and check all options. Click Next.
    Install File and Storage Services on the Hyper-V Server
  6. Click Next
    Install File and Storage Services on the Hyper-V Server
  7. Click Install
    Install File and Storage Services on the Hyper-V Server
  8. Click Close to finish the installation of File and Storage Services on the Hyper-V. Now we can create storage pools and browse to the Hyper-V like \\hyperv\c$ which is really handy.
    Install File and Storage Services on the Hyper-V Server

Now it is time to create the Virtual Machine that will hold the Windows Server 2012 R2 Essentials server.

  1. From the start menu start Hyper-V Manager and click ‘Connect to Server and type in the name of your Hyper-V server. In my case that is HYPERV
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  2. From the right side choose New –> Virtual Machine
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  3. Choose Next
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  4. Give the VM a name and click Next
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  5. Choose Generation 2 and click Next. If you update this server after finishing the installation it can happen that your server crashes. See this for more information
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  6. Choose the amount of Ram you want to assign and click Next.
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  7. Assign a Virtual Switch and click Next
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  8. Create a Virtual Disk for the OS installation. You can add more disks later if you need them. I always make more disks for users data and shares and keep them separated from the OS.
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  9. Choose the ISO image for this installation. The image must already be on the Hyper-V server’s drive.
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials
  10. Click Finish. After this you are ready to install WSE 2012 R2 Essentials as in ‘A do-it-yourself guide for installing Windows Server 2012 R2 Essentials’.
    Create a Virtual Machine on the Hyper-V Server that will run our Windows Server 2012 R2 Essentials

As a final step we need to join the Hyper-V Server to the domain of the virtualized Windows Server 2012 R2 Essentials. Normally you will be prompted to boot the server or workstation you join to a domain and this is also the case with the Hyper-V server. You may think that this is a problem for your domain controller but it is not because it will be saved as soon as the Hyper-V Server boots.

  1. Logon to the Hyper-V server and choose option 1.
    Join the Hyper-V server to the domain
  2. Type D for Domain.
    Join the Hyper-V server to the domain
  3. Type the name of the domain you want to join.
    Join the Hyper-V server to the domain
  4. Type the name of the Domain Administrator
    Join the Hyper-V server to the domain
  5. Enter the password for the Domain Admin
    Join the Hyper-V server to the domain
  6. If you want to change the name of the server click Yes, otherwise click No and  reboot the server.
    Join the Hyper-V server to the domain
  7. Logon to the Hyper-V Server with your Domain Administrator account. BTW, if you have not yet joined the ‘management workstation’ to the domain it is now time to do that and this procedure has been described here ‘How to join a Windows 10 Pro to a Windows Server 2012 R2 Essentials domain with the connector’.
    Join the Hyper-V server to the domain
  1. Open Hyper-V Manager on the ‘management workstation’ and check if ‘Time Synchronization’ is checked in the Integration Services. Click OK to close the Hyper-V Manager.
    Set time synchronization on your Hyper-V Server and the virtualized domain controller
  2. Logon to the Domain Controller and open an elevated command prompt. From that prompt type w32tm /query /source. The output must be ‘VM IC Time Synchronization Provider’.
    w32tm /query /source
    Set time synchronization on your Hyper-V Server and the virtualized domain controller
  3. From the same elevated command prompt type 'reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider /v Enabled /t reg_dword /d 0’. This effectively enables time synch with the Hyper-V server when the DC reboots but disables it after the DC is up and running.
    reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider /v Enabled /t reg_dword /d 0
    Set time synchronization on your Hyper-V Server and the virtualized domain controller
  4. Now run ‘w32tm /config /syncfromflags:DOMHIER /update ‘. This will tell the DC to sync time from within the domain.
    w32tm /config /syncfromflags:DOMHIER /update
    Set time synchronization on your Hyper-V Server and the virtualized domain controller
  5. Now run ‘net stop w32time & net start w32time’ to restart Windows Time Service and ‘w32tm /resync /force
    net stop w32time net start w32time w32tm /resync /force
    Set time synchronization on your Hyper-V Server and the virtualized domain controller
  6. We will now download a Fixit tool from Microsoft that will set our Hyper-V server and Virtualized DC’s to sync from an internet based time server. The tool is from this knowledge base article https://support.microsoft.com/en-us/kb/816042 at ‘Configuring the Windows Time service to use an external time source’. The direct download link is here http://go.microsoft.com/?linkid=9729248. If we run that tool we are prompted to enter a valid Internet Time Server and you need one here is a list https://support.microsoft.com/en-us/kb/262680. If you still get ‘Local CMOS Clock’ when checking the time source you need to follow the steps from that KB article and configure your server manually. Sometimes the ‘Fixit’ solutions don’t work…don’t know why.
    Set time synchronization on your Hyper-V Server and the virtualized domain controller

About www.server-essentials.com 

www.server-essentials.com is founded by Mariette Knap, a Dutch Microsoft MVP. www.server-essentials.com is a community for IT Consultants and Business Owners who, themselves, take care of the IT infrastructure and Employees who do that little extra in the company to keep things running. Our forum is for discussing all things ‘IT’ and more.  Our documentation is top notch and written by and for the community.

Change your cookie settings


 
Contact Us
(030) 2250455

International: +31302250455

 

Concentrix BV

C. de Rijcklaan 1

3723 PM Bilthoven

The Netherlands

KvK 30202318

VAT Id 814036739B01

The layout of this page is made to be viewed online.