With all the prerequisites covered in Part 1 of this series, it’s time to get technical. In this article, I’ll show you how to set up your domain controller, how to set up your Hyper-V cluster nodes, and how to join those nodes to the domain.
Task 1: Create a domain controller ^
In this task, we’ll create a Windows Server 2012–based Active Directory domain controller for our Hyper-V cluster. Windows-based failover clusters need Active Directory, so it’s a good idea to start with this.
Install Windows Server 2012
- Download the Windows Server 2012 Evaluation software ISO, or use the Windows Server 2012 ISO media and product keys provided to you through your TechNet, MSDN, Select, or Open subscription. Burn the ISO file to a DVD or convert the installation media to a bootable USB drive.
- Start the computer designated as your domain controller from the Windows Server 2012 installation media.
- On the first Windows Setup screen, select the Language that you want to install, Time and currency format, and Keyboard or input method, and then click Next.
- Click Install now on the second Windows Setup screen. Setup is now starting.
- On the Enter the product key screen, type the product key. When done, click Next.
You may not see this screen when you’re using a volume license or customized media.
- On the Select the operating system you want to install screen, choose to install Windows Server 2012 Standard (Server with a GUI). We’ll need the GUI when we’re going to manage the failover cluster later.
- Read the License terms. If you accept them, select the I accept the license terms check box, and then click Next.
- On the Which type of installation do you want? screen, click Custom: Install Windows only (advanced).
- On the Where do you want to install Windows? screen, select the hard drive where you want to install the Windows operating system. Click Next when done.
Windows Setup will now begin copying files to the hard drive and configuring the operating system. The box will reboot several times.
Configure Windows Server 2012
When installation of Windows Server 2012 is finished, you will be presented with the screen to change the password for the local administrator:
Set Windows Server 2012 password
At this point, perform the following tasks:
- Click OK, change the password to a complex password by typing it twice, and press Enter.
This password will eventually be reused as the password for the built-in administrator
account for the Active Directory environment.
- Click OK on the screen that reports the password has been changed. Windows Setup will now finalize your settings. You will be able to log on to the server installation with your new credentials afterwards.
- After a while, you will be presented with the Server Manager. Click Local Server in the left pane.
- In the main pane, click the automatically generated name to the left of Computer name on the System Properties screen, and then click the Change… button. Change the computer name to something more obvious. I chose DC01. Click OK when done. Click OK on the Computer Name / Domain Changes screen to acknowledge the server has to restart to apply these changes. Click Close on the System Properties screen, and then Restart Now on the generic screen.
- After the server reboots, log on. Click Local Server again in the left pane of Server Manager; this time, click the text Ipv4 address assigned by DHCP, Ipv6 enabled next to Ethernet. Right-click the Network Interface Card (NIC) from the Network Connections screen and select Properties from the context menu. Double-click Ipv4 in the list of items, and then select Use the following IP address:. Insert meaningful values for the IP address, subnet mask, and (if need be) the default gateway. The Use the following DNS server addresses: option will also have changed. Click OK when done. Close the Network Connections screen.
- Back in Server Manager, click (UTC -8:00) Pacific Time (US & Canada) next to Time zone. On the Date and Time screen, click the Change time zone… button. Choose your time zone and click OK when done. Click Close on the Date and Time screen.
Install the Active Directory Domain Services role
Now, let’s install the Active Directory Domain Services Server Role. Perform these steps:
- In Server Manager, on the grey task bar at the top, click Manage.
- Select Add Roles and Features. This will fire up the Add Roles and Features Wizard, which will guide you through the process.
- Click Next> on the Before you begin screen.
- Select Role based or feature-based installation on the Select installation type screen and click Next>.
- Select your server from the server pool list on the Select destination server screen and click Next>.
- In the list of Server Roles, select the radio button to the right of Active Directory Domain Services.
A pop-up screen will notify you that a couple of features will also be installed:
Click Add Features. Now, back on the Select server roles screen, click Next>.
- Click Next> again underneath the Select Features list.
- Click Next> when you’re done reading the introduction to Active Directory Domain Services.
- On the Confirm installation selections screen, click Install. Do not bother to select the check box next to Restart the server automatically if required, since installing the Active Directory Domain Services role does not require a reboot.
- When the wizard is done installing, click Close.
Configure the domain controller
The Active Directory Domain Services role and a couple of neat accompanying features have been installed on your server, but at this stage the server is not a domain controller. It’s merely a server with the Active Directory Domain Services Role installed. Let’s promote the server to a domain controller with these steps:
- In the grey task pane at the top of Server Manager, right-click to open the Notification Area (the yellow exclamation sign) and click Promote this server to a domain controller. After clicking this link, the Active Directory Domain Services Configuration Wizard starts.
- Select the Add a new forest option. This automatically triggers the display of a next set of configuration-based fields. Click Next> when you’ve made your choices.
- On all the other screens, make the appropriate choices for your environment and skip through the screens using the Next> button.
- On the Review Options screen, review your choices. Use the <Previous button to make corrections, use the View Script button to view the corresponding PowerShell script, or simply click Next> to advance to the Prerequisites Check.
- When all prerequisite checks pass successfully, click the Install button to promote the server to a domain controller.
The server will automatically reboot after promotion, and then your server will be a fully functioning domain controller.
Task 2: Create the first Hyper-V cluster node ^
Now that we have an operational domain controller, it’s time to build the nodes for our Hyper-V failover cluster.
Download Hyper-V Server 2012
We’ll be using the free Hyper-V Server 2012 solution from Microsoft. Download it here. Click the Free Download link in the banner. Then, Sign in with your Microsoft Account (previously known as a Windows Live ID) and review your information. Click Continue at the end of the page. This will start the Download Manager. Then, choose a suitable location for the Hyper-V Server 2012 ISO file in the Save As screen and click Save.
After you finish downloading, burn the 9200.16384.WIN8_RTM.120725-1247_X64FRE_SERVERHYPERCORE_EN-US-HRM_SHV_X64FRE_EN-US_DV5.ISO file to a DVD or convert the installation media to a bootable USB drive.
Install Hyper-V Server 2012
Perform the following steps to install your Hyper-V Server:
- Just like you did with your domain controller, start the computer designated as your Hyper-V failover cluster node 1 from the installation media.
- On the first screen, select the Language that you want to install, Time and currency format, and Keyboard or input method, and then click Next.
- On the second screen, click Install now. Setup will now start.
- On the License terms screen, select the I accept the license terms option. Although Hyper-
V Server is free, you are still required to license any software you install on virtual machines. Afterwards, click Next.
- On the Which type of installation do you want? screen, click Custom: Install the newer version of Hyper-V Server only (advanced).
- On the Where do you want to install Windows? screen, select the hard drive where you want to install Hyper-V Server 2012. Click Next.
Hyper-V Server Setup will now begin copying files to the hard drive and configuring the operating system. The box will reboot several times.
Configure Hyper-V Server 2012
When installation of Windows Server 2012 is finished, you will be presented with the screen to change the password for the local administrator. At this point, perform the following steps:
- Click OK to change the local administrator password.
- Type the new password twice. Then, click Enter or click the arrow next to the second field.
- Click OK to acknowledge the password has been changed.
You will now be automatically signed in and presented with sconfig.cmd:
- Press 8 on your keyboard. Then, select the first network connection and change the IP address settings to values that allow the Hyper-V failover cluster node to be able to communicate with the domain controller and use it as its primary DNS server, by doing the following:
- Press 1 to set the network adapter address. Press S on your keyboard to select a static IP address. Enter the dotted IPv4 address and press Enter. Then, enter the Subnet Mask manually or accept the default by pressing Enter. As the last configuration item, enter the default gateway (the nearest router) or blank for none. Conclude with Enter.
- Configure the second network adapter with an IPv4 address. Choose an address in a different network.
- Press 2 to set the address(es) of the DNS server(s). Enter the dotted IPv4 address of your domain controller and press Enter. Press OK in the dialog box to acknowledge the preferred DNS server was set. Press Enter to skip configuring a second DNS server address.
- Press 4 to return to the main menu.
- Press 9 on your keyboard. In the Date and Time Configuration Panel applet (timedate.cpl), configure the correct time and time zone. Make sure the time is no more than 5 minutes apart from your domain controller.
- Press 1 on your keyboard. Press D to join an Active Directory domain environment. Enter the DNS name of the previously created Active Directory domain. Press Enter afterwards. Now, specify an authorized user. Since we’ve only got the built-in Administrator, enter that. In the separate command prompt window, enter the Administrator’s password at the secure prompt.
- Press OK to acknowledge your Hyper-V Server failover cluster node is joined to the domain.
- When asked if you also want to change the computer name, enter a meaningful name for the Hyper-V Server. I named mine HVNode1.
Install the failover clustering feature
Since Hyper-V Server 2012 is already configured with the Hyper-V Server Role, all that remains is to install the failover cluster feature. Use the following commands:
Task 3: Create the second Hyper-V cluster node ^
Now, perform the steps in this task on the other Hyper-V node too. Make sure to use a different IP address (in the same IP range) and a different hostname.
In my next post I will cover Shared Storage.