Thursday, November 16, 2017

Series 1 - Build a Windows Server 2012 Hyper-V Environment

On an virtualized platform we can build as many servers as we want in a virtual domain network via virtual switches. At home test lab all can be done on one relatively powerful physical server. Budget usually is a concern but thanks to second-hand market buying a used hardware with decent remaining lifespan will not burn a hole in your pocket. 

Hardware

I first purchased a used HP proliant DL360 G6 server from Newegg for less than 300 $. The server specs are in the following:

64-bit, 1 U, rack mount
2 x quad core Xeon E5530 2.4 Ghz CPUs
32 GB PC3 10600 DDR3 memory
4x146 GB 15, 000 rpm SAS Hard disk
2 x Gbps Broadcom BCM5709C NetXtreme II GigE NIC
2 x power supplies
P410i RAID


Software

Microsoft Windows Server 2012, 2016, SQL Server 2016 and 2017 evaluation editions valid for 180 days.

Configuration
Hyper-V host
Server name:    HPV-HOST
IP addresses:    NIC 1#    192.168.1.123 / NIC 2#    192.168.1.133
DNS:                     71.243.0.12/71.250.0.12 (publicly available for Verizon FIOS customers)
Disk drives:       C/E/F/G, 136 GB each, D/ - removable media

Client Virtual Machines
All public and iSCSI networks use the following:
    Subnet mask:           255.255.255.0
    Default gateway:  192.168.1.1
    DNS server:             192.168.1.123

Private heartbeat network uses this:
    Subnet mask:           255.255.255.0
    Default gateway:  N/A
    DNS server:             N/A

Public/HB/iSCSI IP addresses:
Node 1 - VM-Win2016-A   192.168.1.150/10.10.10.100/192.168.1.197
Node 2 - VM-Win2016-B   192.168.1.151/10.10.10.118/192.168.1.198
Node 3 - VM-Win2016-C   192.168.1.161/10.10.10.115/192.168.1.199

Detailed Steps

1.   Install Windows Server 2012 on host machine. Select AD, DNS server and Hyper-V roles


2.   Configure virtual switches in Hyper-V Manager. Use the same NIC with identical settings for public and iSCSI, but different NIC with "private network" radio button checked.


3.   Right click on host server and choose "New" -> "Virtual Machine". Type in machine name and the path to store virtual disk file. Since we plan to use E:, F:, and G: drives for three vms, we'll install on each drive's \Hyper-V\ directory. 


4.   Click Next. Allocate proper memory. Let's assign 4 GB for each vm for now. Check "Use dynamic memory".


5.     Click Next to choose public network as connection (Ext-Vswitch).


6.   Go to Next page. Use the designed path for VHD file. Assign a size of 30 GB. It's dynamic.


7.   Click on Next button. Point Image file to the root C: drive as we have copied there a Windows 2016 trial version .iso file. You can also point to a network share but you may run into some issues.


8.   Click Finish. Let the wizard create the virtual machine. Repeat this process for Node 2 and 3 with appropriate values respectively.


9.   Right click on node 1 in Hyper-V Manager, choose Start. Notice the status becomes "Running", and assigned memory, CPU and Uptime start to tick.Then right click on the server again to choose Connect. This will launch a remote session showing booting from installation media. Follow a normal Windows server installation process to complete the vm installation. Reboot the vm accordingly.

10.  Rename the server to our assigned name and join domain. Connect to the vm in Hyper-V Manager. Go to Server Manager -> Add roles and features for the local server -> Choose "Role based or feature based installations" -> Next -> Select the right server from server pool -> Next -> Skip roles, click Next -> Pick features of "Failover Clustering" , "Multipath I/O", "iSCSI Initiator" and "SMB 1.0/CIFS File Sharing Support". When done either let system reboot or manually reboot.

11.  Upon reboot, go to Server Manager -> Local Server -> Turn off "IE Enhanced Security Configuration". Also turn off Windows firewall. go to Control Panel -> Network and Internet -> Network Connections -> Rename all three networks to public, heartbeat and iSCSI. Configure them individually using parameters laid out above. Verify by ping and internet access.


No comments:

Post a Comment