Backgroound Image

vSphere Lab Build Out – The ESXi Server Deployment

Finally, after getting the domain controller and client built now it’s on to actually deploying ESXi!

You can download eval copies of VMware software directly from VMware (after creating an account) here: https://my.vmware.com/web/vmware/downloads/info/slug/datacenter_cloud_infrastructure/vmware_vsphere/7_0

You can also register for the VMware User Group’s VMUG Advatage program and get access to 365-day trial licenses.  More info on the VMUG Advantage program can be found here: https://www.vmug.com/membership/vmug-advantage-membership

After getting the ESXi ISO downloaded we can start the VM builds

VM Creation

  1. In VMware Workstation press CTRL+N to open the New Virtual Machine Wizard, and make sure Typical is selected, then click Next
  2. Select the ISO that was downloaded and click Next
    1. I’m still using Workstation 15.5, and installing ESXi 7.0, so it doesn’t autodetect the OS
  3. Select VMware ESX, and in the drop down select VMware ESXi 6.x, then click Next
  4. Name the VM, and change the location (if needed) then click Next
  5. The default storage of 40GB is more than enough.  The hosts will be configured to connect to an iSCSI target, so leave the default and click Next.
  6. Click Customize Hardware
  7. Configure the hardware.  
    1. Since these will be the virtualization hosts allocate as much CPU and RAM as you can. 
    2. When setting the CPU count verify the box is checked for Virtualize Intel VT-x/EPT or AMD-V/RVI
    3. Set the NIC to Bridged
    4. Click Close
  8. Click Finish

ESX installation

  1. Power on the VM
  2. The VM should automatically boot from the ISO, and it will take a moment to load everything
  3. When prompted to start the install press Enter to continue.
  4. Make sure to read the EULA in its entirety, and if you accept it press F11 to move on.
  5. By default the hard drive created with the VM will be present and selected.  Press Enter again to continue.
  6. Select the correct keyboard layout, and again press Enter to continue.
  7. Type in a password, and then press Tab to re-enter the password to confirm it.  Then press Enter to continue.
  8. Finally, press F11 to confirm the configuration and begin the installation.
  9. The install is fairly quick.  When it is done press Enter to reboot.
  10. It will take a little while for the VM to reboot and come back up.
Initial ESX configuration
  1. At the main screen press F2 to Customize System.
  2. Enter the credentials and press Enter 
    1. Remember, the username is: root
    2. The password is what was entered during the initial set up
  3. In the System Customization window use the Down Arrow to highlight (or is it blacklight? lowlight?) Configure Management Network and press Enter.
  4. Select IPv4 Configuration and press Enter
  5. Select DNS Configuration and press Enter to open the DNS options.
  6. Use the Down Arrow to highlight “Use the following DNS Server…” and press Space to select that, then use the Down Arrow to enter the DNS server address information.  Use the IP of the DNS server that was created for the lab.  Also, type in the the FQDN that matches the DNS record created.  Press Enter to submit these changes.
  7. Again, use the down arrow to select Custom DNS Suffixes (I’m not adding a screenshot since there’s already two for the same page)
  8. Enter the lab domain name and press Enter.
  9. Press Escape to exit the configuration menu, then press Y to accept the changes and restart the management network.
  10. (Optional) Test the management network to verify things work.  It should return OK if everything works as expected.
This completes the configuration of the first ESXi host.  This process can be repeated to create a second host, which will allow the creation of an HA cluster.

vSphere Lab Build Out – The Domain Controller Configuration

For the Domain Controller build the entire process is much easier and quicker when working from PowerShell instead of the GUI.  It also makes it more repeatable, which is awesome for labs.

The first steps are the basic config of the server.  Below is each command needed, with the variables in red.  Change what you need, then paste the commands into PowerShell.

Set the computer name: 

Rename-Computer LabDC

Enable Remote Desktop access (optional)

Enable-NetFirewallRule -DisplayGroup “Remote Desktop”

Set-ItemProperty -Path ‘HKLM:SystemCurrentControlSetControlTerminal Server’ -name “fDenyTSConnections” -value 0 

Disable DHCP, set the IP address, DNS, and default route:

Set-NetIPInterface -InterfaceAlias Ethernet0 -AddressFamily IPv4 -Dhcp Disabled 

New-NetIPAddress -InterfaceAlias Ethernet0 -AddressFamily IPv4 -IPAddress 192.168.1.210 -PrefixLength 24 

Set-DnsClientServerAddress -InterfaceAlias Ethernet0 -AddressFamily IPv4 -ServerAddresses 8.8.8.8 

New-NetRoute -AddressFamily IPv4 -InterfaceAlias Ethernet0 -DestinationPrefix 0.0.0.0/0 -NextHop 192.168.1.1

Install the AD, DNS, iSCSI, and Remote Server Admin Tools.
Install-WindowsFeature -name AD-Domain-Services,DNS,FS-iSCSITarget-Server,RSAT-ADDS

Reboot to apply the name change:

shutdown -r -t 0

Log into the server again, and create the domain:

Install-ADDSForest -DomainName Lab.local -InstallDNS

When prompted for the AD Restore Mode password enter the password, and then confirm it.  After that, accept the prompt by pressing the “A” key and hitting Enter.  Wait, while the new domain is configured.  When the process completes the server will automatically reboot.

The final task will be getting DNS configured with a reverse DNS zone, and records created for the various devices that will be deployed.

Add-DnsServerPrimaryZone -NetworkID “192.168.1.0/24” -ReplicationScope “Forest” 

Add-DnsServerResourceRecordA -Name “ESX1” -ZoneName “Lab.local” -IPv4Address “192.168.1.211” -CreatePtr 

Add-DnsServerResourceRecordA -Name “ESX2” -ZoneName “Lab.local” -IPv4Address “192.168.1.212” -CreatePtr 

Add-DnsServerResourceRecordA -Name “vCenter” -ZoneName “Lab.local” -IPv4Address “192.168.1.213” -CreatePtr 

Add-DnsServerResourceRecordA -Name “vRO” -ZoneName “Lab.local” -IPv4Address “192.168.1.214” -CreatePtr 

Add-DnsServerResourceRecordA -Name “vLCM” -ZoneName “Lab.local” -IPv4Address “192.168.1.215” -CreatePtr

That concludes the initial DC config for the environment.

vSphere Lab Build Out – The Client PC Peployment and Config

In the VMware lab it’s nice to have a client OS to work from.  This client can be joined to the domain, and pointed to the lab DNS, which streamlines some of the config tasks. 

Get the Win10 ISO

This process is a little more involved, and it requires the use of the Media Creation Tool.  You can get that here: https://www.microsoft.com/en-us/software-download/windows10

  1. After the download completes run the tool
  2. Click Accept (after you read the full terms and conditions of course)
  3. Select “Create installation media…” and click Next
  4. Verify the options say English, Windows 10, and 64-bit
    1. If not, uncheck the box and select those options and click Next
    2. If so, click Next
  5. Select ISO file and click Next
  6. Select your download location and click Save.
The downloads might take some time to complete.

Create the Client VM

  1. In VMware Workstation press CTRL+N to open the New Virtual Machine Wizard, and make sure Typical is selected, then click Next
  2. Select the option for Installer Disc Image File, and browse to the location you downloaded the Windows 10 ISO to then click Next
  3. Enter the name for the client and select the location
  4. Use the default hard drive size of 60GB (another drive will be added later for the iSCSI target storage), and click Next
  5. Click Customize Hardware
  6. Adjust the CPU and RAM as needed for your environment (2 vCPUs 4-8GB RAM would be recommended), and change the Network Adapter from NAT to Bridged
  7. Click close, verify the box is checked for “Power on this virtual machine after creation” and click finish.

Deploy the Client OS

NOTE: While in the VM you will need to press Ctrl+Alt to release the cursor to get to your desktop
  1. While the VM is booting you might see a prompt to press a key to boot from CD.  If that happens click into the window and press a key.
  2. Select the language, and keyboard settings
  3. Click Install Now
  4. At the Activate Windows screen click “I don’t have a product key”
  5. Select Windows 10 Pro and click Next
  6. Read through all of the licenses terms, and if you accept the terms check the box to accept them and click Next
  7. Select the Custom install option
  8. By default it should already select Drive 0, which is the 60GB drive initially created.  Click next.  The OS install will start, so just let that process run.

OS Initial Config

Windows 10 has a number of steps to go through to get the OS configured before actually loading to a desktop.
  1. Select your regions and Click Yes
  2. Select your keyboard layout
  3. Skip adding the additional keyboard
  4. Wait a moment for it to progress to the account creation screen, then select “Set up for personal use” and click Next
  5. Microsoft is going to try to link to an online account, but since this is for a temporary lab PC click on “Offline account” in the bottom left.
  6. Microsoft really tries to push the online account, so again look in the bottom left corner and select “Limited experience”
  7. Enter a username and click Next
  8. Create a password and click Next
    1. The next screen will ask to confirm the password.  Reenter the password and click Next
  9. When prompted for the three security questions I just select the first three options and enter random characters.  This is lab, and if I happen to forget the password I can easily recreate the VM.  Click Next
    1. Repeat the process for the other two questions.
  10. For the privacy settings this really doesn’t matter, as it’s a lab machine that won’t exist for long.  Everything can be left enabled by default, or it can be disabled.  After applying the settings click Accept.
  11. The install will prompt to enable activity history.  Again, as a lab machine this isn’t needed, so select No.
  12. Cortana… Microsoft really wants people to enable all their stuff.  Click “Not now” to move on.
  13. Success! The post-install prompts are done.  Now wait for the configuration to complete.

Client OS config

To configure the OS there’s only three tasks that are going to be performed.  
  • Install VMware Tools
  • Configure DNS
  • Join the domain

Install VMware Tools

    1. Log into the VM using the password set previously
    2. Right click on the VM in the Library an select Install VMware Tools
    3. Navigate to the D: drive and double click it.  That should kick off the Autorun for the installer.
    4. Follow the defaults for the install.  Next > Next > Install > Finish and then click Yes when prompted for a reboot.
Configure DNS
  1. Open Powershell as admin
    1. Press the Windows key and type powershell
    2. Press Crtl+Shift+Enter to run as admin
  2. Run this command (replace the IP in red if needed):
Set-DnsClientServerAddress -InterfaceAlias Ethernet0 -ServerAddresses 192.168.1.210

Join the domain
  1. Open Powershell as admin
    1. Press the Windows key and type powershell
    2. Press Crtl+Shift+Enter to run as admin
  2. Run this command (replace the IP in red if needed), and enter the password when prompted
Add-Computer -Credential labadministrator -DomainName lab.local -Force -Restart

This completed the Client PC configuration for the lab.