My Musings about Technology and driving Success

VMware Lab Guide

Deploying ESXi and vCenter into Homelab using VMware Workstation

The overall plan for my Lab is to run a small vSphere 6.5 Environment with some Shared Storage for various reasons all contained within VMware Workstation. I have combined all of my single posts from my main blog page into a single post.

I have just ordered VMUG Advantage so I can have the vSphere suite for year (and ongoing) and I have a copy of Windows Server 2016 which I will be using for a dedicated Domain Controller (And maybe a few other Windows Services for the lab)

Virtual Machines:

  • Windows Server 2016 – Domain Controller
  • 2 x ESXi 6.5 Servers
  • VCSA Appliance
  • FreeNAS (To provide Shared Storage)

Network Overview:

I plan on having some basic Network separation to allow for features such as vMotion, Shared Storage etc..

I have added 5 Internal Networks within Virtual Network Editor, as follows:

Screen Shot 2017-03-08 at 17.32.16

192.168.100.x VM Network

192.168.101.x Management

192.168.102.x Storage

192.168.103.x FT

192.168.104.x vMotion

For all of these I ensured that DHCP Wasn’t enabled and they were configured as Host-only

Screen Shot 2017-03-08 at 17.38.12

Domain Controller Setup

The next step is to spin up a Windows Server 2016 Domain Controller – this will provide DNS and Active Directory.

I provisioned the VM with 2GB RAM, 1 Processor and a 50GB HDD (this may need tweaking but should be enough to get started) and I have mapped the ISO. When you deploy the Server make sure you set a complex password for the Administrator account before starting the AD configuration as it will “promote” your local administrator account to a Domain Admin.

Windows Update
The first thing Im going to do is run an Update (as this Server will not be connected to the Internet after this point). At the moment it is connected as Host-Only, so I need to change that to Bridged

Screen Shot 2017-03-09 at 10.43.46

Things have moved around a bit since the last version, so i did a search for Updates and kicked those off.

Screen Shot 2017-03-09 at 10.42.57

Now to change the Network to Host Only – I have created VMNET1 for all my VMs to operate on, so change this in the VM’s Settings

Screen Shot 2017-03-09 at 13.52.22

Then, I need to configure a Static IP on the Server (I also disabled IPv6) – NOTE you need to add a DNS Server address (of itself) otherwise this will fail the prerequisite check during final installation.

Screen Shot 2017-03-09 at 16.01.48
Now need to rename my Server to what i want it to be called

Right Click This PC, Select Properties

Under Computer name, domain and workgroup settings – Select Change Settings

Screen Shot 2017-03-09 at 14.44.19

Select Change and give the Server a name – once complete it will require a reboot

Screen Shot 2017-03-09 at 14.45.59

Active Directory

To install and configure AD, Click Start and select Server Manager

Screen Shot 2017-03-09 at 14.39.27

Select Add roles and features

Screen Shot 2017-03-09 at 14.40.12.png

On the Add Roles and Features Wizard page select Next (I always Tick the Skip this page by default box)

Select Role-based or feature-based installation

Screen Shot 2017-03-09 at 14.42.42

Ensure the Server is selected and Click Next

Tick Active Directory Domain Services and select Add Features on the Pop up window

Screen Shot 2017-03-09 at 14.55.11.png

Select Next and Ensure .NET 4.6 Is Enabled and Click Next again a few times

I ticked Restart the destination server automatically if required option and Selected Install

Once that is complete, select Promote this server to a domain controller

Screen Shot 2017-03-09 at 15.42.37

I will be setting up a New Forest called

Screen Shot 2017-03-09 at 15.47.04.png

Now Im going to setup the functional levels as Windows Server 2016 as i wont be running any server with an older OS.

I want to ensure DNS is Ticked and enter a Restore Mode Password (complex required)

Screen Shot 2017-03-09 at 15.49.05

Now i will select the following defaults:

  • I don’t require DNS Delegation
  • Im happy with the default NetBIOS Name
  • AD Database defaults are all fine
  • Im happy with the review of the config

I have a few Warnings in my Pre-requisites check but nothing to worry about – now click Install – after a reboot the Server will be back up and ready to go

Screen Shot 2017-03-09 at 17.32.46.png

ESXi Installation

I have pulled down the latest ISO for ESXi 6.5 – I want to have 2 x ESXi Servers, so I will document the process once and then repeat.

Select File, New Virtual Machine and select Custom

Screen Shot 2017-03-13 at 14.25.22

Hit Next and then Next again at the Choose the Virtual Machine Hardware Compatibility screen

Browse to your VMvisor ISO and select Next

Screen Shot 2017-03-13 at 14.26.15

Give your Virtual Machine a Name and pick where you want it to be provisioned – hit Next

Screen Shot 2017-03-13 at 14.27.13

Im giving my Host 2 x Processors with 2 Cores – hit Next

Screen Shot 2017-03-13 at 14.29.04

And 4GB or Memory – click Next

Screen Shot 2017-03-13 at 14.30.04.png

Im going to put my ESXi Host on Internal Networking – for any updates I will look to deploy VUM Later. I will also be adding various Interfaces later – click Next

Screen Shot 2017-03-13 at 14.31.12.png

I will Accept the defaults for I/O Controller, Disk Type and Select a Disk Type by click Next through these options

Screen Shot 2017-03-13 at 14.32.40 Screen Shot 2017-03-13 at 14.32.50 Screen Shot 2017-03-13 at 14.32.56

Select Create a new virtual disk and click Next

Screen Shot 2017-03-13 at 14.37.09

I will give my ESXi Host a 40GB Drive and as I don’t have too much capacity in my Lab – I will not Allocate the space now – select Next

Screen Shot 2017-03-13 at 14.38.11

I will leave the defaults for Specify Disk File and click Next

I had a quick look in Customize Hardware – to see if things like Floppy Drive were added – but it looked pretty minimal so will leave at Defaults and select Finish

Screen Shot 2017-03-13 at 14.41.07

So my Host will be provisioned and boot into the installer

Screen Shot 2017-03-13 at 14.41.47

Screen Shot 2017-03-13 at 14.42.26

Now we are ready for configuration – hit Enter

Screen Shot 2017-03-13 at 14.44.56

and press F11 Accept and Continue (EULA)
* TIP for MAC Users with External Keyboards – Go to System Preferences – Keyboard – Tick Use all F1, F2 etc. keys as standard function keys

Screen Shot 2017-03-13 at 14.50.29

I only have the 1 Disk to install ESXi on so press Enter

Screen Shot 2017-03-13 at 14.51.13

Select Keyboard Layout – for me United Kingdom – Press Enter

Screen Shot 2017-03-13 at 14.51.40

Enter a Root password and hit Enter

Screen Shot 2017-03-13 at 15.33.32

And confirm Installation by pressing F11

Screen Shot 2017-03-13 at 15.34.25

Installation complete ready for a reboot by pressing Enter

Screen Shot 2017-03-13 at 15.40.56

Now for some configuration:

I need to change my Network Adapter from Host-Only to sit on my VM Network – in my case vmnet1

Screen Shot 2017-03-13 at 16.53.11.png

Press F2 to Customise and then login with your credentials

Screen Shot 2017-03-13 at 16.54.18

Select Customise Management Network

Screen Shot 2017-03-13 at 16.55.13.png

I only have the 1 Interface at the moment so I just need to do the IPv4 Config and Disable IPv6

Screen Shot 2017-03-13 at 16.56.26.png

First select IPv4 Configuration and press Enter

Use the Arrow keys to move down to Set static IPv4 address and network configuration

Screen Shot 2017-03-14 at 13.48.03.png

Press the Space Bar to confirm the selection

Then Enter IP, Subnet Mask and Gateway – Press Enter to confirm

Now scroll down to IPv6 Configuration

Select Disable IPv6 and hit Enter

Screen Shot 2017-03-13 at 16.59.53

Now select DNS Configuration and Enter the IP of your DNS Server and give your ESXi server a Hostname – Press Enter

Screen Shot 2017-03-13 at 17.01.17

Press Esc and confirm change by pressing Y – The Host will restart

Screen Shot 2017-03-13 at 17.02.46

Now i’m going to add DNS entries for both ESXi Servers and the VCSA Im about to deploy. I added Forward and Reverse Entries for the VCSA

Screen Shot 2017-03-14 at 11.11.32

And check Name resolutions works with PING and NSLOOKUP

Screen Shot 2017-03-14 at 11.12.54.png

Screen Shot 2017-03-20 at 18.54.50

The VCSA comes all packaged as an ISO (which contains the OVF) – I mounted the ISO using Virtual Clone Drive and extracted the OVF.

In VMware Workstation – select File, Open and select the OVF

Give your vCenter Server a name and select Import

Screen Shot 2017-03-17 at 14.35.07

Accept the EULA and the VCSA will Import.

Once the OVF has imported I need to change the Network Adapter to match my Internal Network

Screen Shot 2017-03-17 at 14.43.12

Now – before you Power the VCSA Machine on – You need to edit the VMX File – I didnt do this initially and just powered the VCSA on and started to configure via the device.

This kept causing me issues where I would use the Browser to try to log into the VCSA and receive Waiting for RPM Installation to finish and it would sit at 0%, 54% or 86% – This appeared to be issues with the installation of the RPM’s – in my Case VUM – as found in the VCSA Logs

Screen Shot 2017-03-20 at 11.42.48

Navigate to the VMX File of your VCSA and Open with a Text Editor like Notepad

Screen Shot 2017-03-20 at 18.55.48

At the bottom of the File, you need to enter the following lines – Editing to add your own details (And using a password instead of ******* )

guestinfo.cis.deployment.node.type = “embedded” = “ipv4” = “static” = “” = “” = “24” = “” = “”
guestinfo.cis.appliance.root.passwd = “************”
guestinfo.cis.appliance.ssh.enabled = “True”
guestinfo.cis.deployment.autoconfig = “True”
guestinfo.cis.appliance.ntp.servers = “”
guestinfo.cis.vmdir.password = “**************” = “london”
guestinfo.cis.vmdir.domain-name = “”
guestinfo.cis.ceip_enabled = “False”

Once you have saved the File, go ahead and Power of the VCSA.

Once this Powers up – Leave it for a while (another thing i did wrong was log in straight away and wonder why my settings hadn’t taken)

Eventually you will see the “”Main screen” which will appear like it hasn’t taken your config. Leave this for 10 Mins + and it will eventually change to match your config:

Screen Shot 2017-03-20 at 17.52.45

Now access your VCSA from a browser using: https://:5480 or the DNS alias https://:5480

Pasted image at 2017_03_20 06_46 PM

Now log into the UI – everything looks up and the only thing I changed was the Timezone to GMT

Screen Shot 2017-03-20 at 18.49.07.png

Now my VCSA is now up and running, I just need to go into vCenter and do some config

  • Licenses
  • Create Datacenter, add Hosts etc..

First thing to do is log in using URL structure: https:////vsphere-client

NOTE: If you just go to the IP of your vCenter it will give you options to use either HTML5 or Flash

Screen Shot 2017-03-21 at 10.45.53.png

I selected the Flash client which uses the URL above

To login the Username structure is administrator@domainname

Screen Shot 2017-03-21 at 10.42.01.png

First thing I see is Expired or Expiring Licenses – now I have these from my VMUG Advantage so I will enter these by selecting Manage your licenses

Screen Shot 2017-03-21 at 10.47.20

Select Licenses and the Green Plus Icon to enter your licenses and click Next

Screen Shot 2017-03-21 at 10.48.13.png

The next screen will Validate these and give you the chance to rename – click Next and confirm with Finish

Screen Shot 2017-03-21 at 10.51.53.png

Im now licensed for my vCenter instance and also 6 CPUs worth of ESXi

Screen Shot 2017-03-21 at 10.55.27.png

Create Datacenter, add Hosts etc..

Select the Home button and select Hosts and Clusters

Screen Shot 2017-03-21 at 11.05.12.png

First thing to do is Create Datacenter – select the link

Screen Shot 2017-03-21 at 11.06.09.png

Give it a name and click OK

Screen Shot 2017-03-21 at 11.06.46

Once that is complete, select Add a host

Screen Shot 2017-03-21 at 11.07.27.png

Enter the Host name or IP and click Next

Screen Shot 2017-03-21 at 11.23.07

Enter Admin (ESXi root) credentials and click Next

Screen Shot 2017-03-21 at 11.11.26

Select Yes for the Security Alert

Screen Shot 2017-03-21 at 11.10.24

Click Next on the Summary

I assigned my vSphere License on the Next step and selected Next

Screen Shot 2017-03-21 at 11.24.05.png

I left Lockdown Mode Disabled and clicked Next

Screen Shot 2017-03-21 at 11.25.18

I left the defaults for VM location and clicked Next

And selected Finish

Screen Shot 2017-03-21 at 11.26.20.png

Repeat for all hosts.

Networking Configuration

I going to simulate (as much as possible) a real world deployment, so separating all traffic over different networks. This will mean adding a few additional Interfaces to each Host and deploying a few Virtual Switches to them also.

The first thing I need to do is add a few Network Interfaces to each of my Hosts, Im going to add 3 Interfaces; 1 for Shared Storage, 1 for FT and 1 for vMotion.

Open up Virtual Machine Settings and select Add

Screen Shot 2017-03-22 at 11.12.03.png

Select Yes if the User Account Control appears

Screen Shot 2017-03-22 at 11.12.16.png

Select Network Adapter and click Next

Screen Shot 2017-03-22 at 11.13.01.png

As I’m using Internal Networking here within Workstation I have previously created vmnet3 for Storage, vmnet4 for FT and vmnet 5 for vMotion – So in this case I will select Custom and select vmnet3 from the Dropdown – Select Finish

Screen Shot 2017-03-22 at 11.13.41

I need to repeat this for all Interfaces and then again for each of my Hosts, so it looks similar to this

Screen Shot 2017-03-22 at 11.15.45.png

Now we have the Network interfaces on the hosts, its time to create some virtual switches and map those interfaces to the Switches.

In vCenter, ensure you are on the Hosts and Clusters Page – If not select the Home Button and select it

Screen Shot 2017-03-22 at 13.18.46

There are a few ways to start the Networking config – but for this example, select the Host you want to configure on the left and select the Configure Tab

Screen Shot 2017-03-22 at 13.23.23.png

Select Virtual Switches and click on the add host networking Icon

As we are only adding Storage, vMotion and FT in this Lab – each of the Switches we deploy will contains VMKernel Network Adapters – click Next

Screen Shot 2017-03-22 at 13.26.21.png

Select New standard switch and click Next

Screen Shot 2017-03-22 at 13.26.59

We need to add one of the adapters in here, so select the Green Plus icon

Screen Shot 2017-03-22 at 13.27.48.png

Add the relevant Interface – for my lab vmnic1 is for Storage, vmnic2 is for FT and vmnic3 is for vMotion – click OK and then Next

Screen Shot 2017-03-22 at 13.29.06

I am going to change the Network label so i know what it is for, so in my case i will call is iSCSI. I wont be enabling any services here, however for the vMotion and FT Switches I will turn on those features as required. Click Next

Screen Shot 2017-03-22 at 13.31.01

Im going to assign a Static IP here according to how i configured my vmnet networks in Workstations Virtual Network Editor and click Next and Finish

Screen Shot 2017-03-22 at 13.33.19.png

If you select VMKernel Adapters, you can see the Interface, Network Labels, Switch, IP and what Service is assigned

Screen Shot 2017-03-22 at 13.35.01.png

Repeat this for FT and vMotion networks and then ensure they are created on your other hosts.

For FT ensure you enable the Fault Tolerance logging service

Screen Shot 2017-03-22 at 13.38.35

And for vMotion, ensure vMotion is selected. I dint set the TCP/IP stack to vMotion (left as Default) for my Lab environment

Screen Shot 2017-03-22 at 13.42.32.png

When these are all configured, we can see there config via VMKernel adapters

Screen Shot 2017-03-22 at 13.52.50.png

And from Virtual switches, you can click on each Switch and see the layout

Screen Shot 2017-03-22 at 13.53.48.png

Shared Storage Setup

I am using FreeNAS for my shared Storage

  • Download FreeNAS from: FreeNAS
  • Within VMWare workstation, select File, New Virtual Machine…


  • Select Custom > Next
  • Keep the defaults and click Next


  • Browse to FreeNAS ISO and Click Next


  • Enter Name of the new Server and change Directory as necessary


  • Leave Processor Information as default


  • Im setting my Memory to 512MB RAM


  • I have Host-Only Networks configured, so I will change the selection to match this


  • Leave I/O Controller as LSI Logic


  • Leave Virtual Disk Type as DEfault- SCSI


  • Select Create a new virtual disk


  • I configured my Disk to be 5GB


  • Accept the .VMDK Name as it pulls this from the Server name previously specified


  • Select Finish and Power o  the VM
  • Select 1 to install


  • Select where you want to install the Image to: Default


  • Select Yes to perform installation


  • Once the installation is complete, select Yes


  • Reboot the System
  • DHCP has given the NAS an IP o my Management Network – which we will be able to connect to later


Make sure the FreeNAS Server is shutdown so we can add a New Disk








Basic IP Settings

Log into the Management Webpage with the credentials you set up earlier and the IP assigned

The Initial Wizard may appear to select Language and Time zone. I exit this and complete the config in the following steps..

Select Network – Enter Hostname and DNS – Save


Change the Timezone


Create new Volume

Navigate to Storage, Volumes, View Volumes


Select Volume Manager and Enter a name for the Volume and add the Disk/s you have available


Select Add Volume


You now have an active Volume, ready to deploy NFS or iSCSI.

Navigate to Storage and highlight the Volume you just created and Select create zVol


Enter a Volume name and the size, if using GB be sure to enter the g after the number. Select Add zvol


Navigate to Services on the top bar and turn on iSCSI by clicking on the Toggle


Click on the Wrench next to iSCSI to enter the iSCSI Settings

Select Portals and Add Portal


Give the Portal a comment and leave the IP at which means it will communicate with all IPs


Select Initiators and select Add Initiator


We could lock this down but for the lab environment I will leave at ALL and ALL and click OK


Select Authorised Access and select Add Authorised Access


Enter a Username and Password details ( I kept them simple for the lab)


Select Targets and Add Target

Enter Relevant details i.e Target Name and Alias and use Drop down menu on the Portal Group ID and Initiator Group ID just created


Select Extents and Add Extent

Enter a name for the Extent and Select Device from the Extent Type options. Select the Volume you want from the Device window and click OK


Select Associated Targets and Add Target / Extent

Give the Extent a LUN ID and select the Target and Extent from the drop downs and click OK


So from here we can map this back to vSphere or Windows. As a quick test, I will map it to a Windows Box.

Bring up the iSCSI Initiator and enter the IP of the FreeNAS Box – click Quick Connect


Select Done


Now if we go into Computer Management / Disk Management we should see Windows wanting to Add the Drive


Select OK and add Volumes as necessary


Make sure you can Write files to the New Drive

For this lab I have added a second Interface to my FreeNAS Server – the usual way, via Virtual Machine Settings, Add… and then added (in my case) a new Network Adapter on the VMnet 3 network.

In FreeNAS I went to Network and Add Interface – then added a second Interface with the VMnet3 IP Range


Im going to use the Software iSCSI Adapter within vCenter to connect.

Navigate to the ESXi Host you want to connect to the iSCSI Target and select Configure

Select the Green Plus sign and select Software iSCSI adapter

iscsi adapter.png

Select ok in the Add Software iSCSI Adapter Window – this is advising to complete the config in the Adapter Details section

iscsi adapter2.png

Navigate to the iSCSI Software Adapter – in my case vmhba65 and select it

Select Network Port Bindings and the Green Plus – Here we are going to Bind our Network Adapter we created earlier to the iSCSI Initiator

network bindingSelect the iSCSI Port Group you created and click ok


Throughout this process you will see: Due to recent configuration changes, a rescan of this storage adapter is recommended


Select the below Icon to rescan the Hosts adapter


Now time to add our Targets IP – Select Targets > Dynamic Discovery and then Add…

Enter the IP you assigned to the iSCSI Target and click OK


Now do another Rescan

Select Datastores and Create a new Datastore


Select VMFS and click Next

Select your FreeNAS Disk, Give the Datastore a Name and select Next


Im going to choose VMFS 6 over 5 and click Next

Im also keeping default Partition config so click Next and Finish


Repeat on all Hosts and you should have the shared iSCSI datastore connected


Deploying Virtual Machine

Now we have shared Storage attached to all our Hosts, we can upload an ISO and deploy a new VM. As I only have the one Datastore, I will create an ISO Folder on this.

Select the Datastore, Click New Folder and give it a name


Now I need to upload the ISO file. Double click the Folder you just created and select Upload a File to the Datastore


Browse to the relevant ISO File and upload it – I am going to install a Lubuntu Virtual Machine as its pretty lightweight for testing in my Lab


Now we can deploy the New VM – Select your Cluster, Right Click and choose New Virtual Machine > New Virtual Machine


Now just work through the Wizard

Create New Virtual Machine – Give it a Name


Select a Compute Resource and click Next

I will select the only Shared Storage Datastore I have


I will leave the Compatibility at ESXi 6.5 and later

Select the Guest OS Family and Version


Under Customize the VM Hardware – I am giving my VM the bare minimum resources; 512MB Memory, 1 Processor and 3GB of Storage


Select the New CD/DVD Drive – Select Datastore ISO File – Then Browse to the ISO you just stored on the Datastore


Ensure Connect.. Is selected


Select Next and Finish

We now have our linux01 VM Ready to Power On


Now to Power on the VM – Select the VM and press Power On

Place the VM on any Host for now – We will Test vMotion shortly


Now the VM is up, I can see that it is running on esx02, so I will move it over to esx01 to test vMotions


Select the VM, Right Click on it and select Migrate.

We are only interested in Change compute resource only > Next

On Select a compute resource > Select the Host you want the VM to Move to

Note: Always keep an eye on the Compatibility section to ensure all checks are succeeded


We wont be changing the Networks as they are configured the same – Click Next


Select the High Priority and click Next and Finish on the following screen

Keep track of the progress in the Recent Tasks window


And once completed, you will see it is running on a different Host


Cosonok's IT Blog

My Musings about Technology and driving Success


My Musings about Technology and driving Success

The SLOG – SimonLong/Blog

My Musings about Technology and driving Success

ESX Virtualization

My Musings about Technology and driving Success

%d bloggers like this: