Building the Ultimate vSphere Lab – Part 1: The Story

In my search of the ‘ultimate affordable’ Lab setup for VMware VCAP/VCP/… exams, i went through a lot of possible set ups.

In the end, i started to build a powerful desktop pc in which i intend to virtualize my vSphere environment.  The reasons that made me chose a desktop PC running Windows 7 with VMware Workstation 8 to do this:

– Everybody has a pc.  So why not buy a lightning fast pc which makes your daily application work at light speed (email/surfing/office tasks) and gives you a perfect lab!

– While i enjoy playing around with servers, i don’t like them at home…  they are loud, they generate heat similar to a woodstove, they consume electricity like hell and they are always in the way of things…  Plus you have to interconnect them using 5000 miles of cable.  Bottom line: me not like!

– Every VMware Admin knows the benefits of virtualization… So why not virtualize your lab?  It makes it very flexible (play with # NICs, snapshots, clones, …).

– Since quite some people are already VCP, you can finally put some good use to that VMware Workstation license you got clip_image001

– It’s very easy to suspend all your work (suspend all the VMs aka your whole vSphere environment), shutdown your pc, go to sleep/work/kids/fun and continue the day after.  No electricity wasted, no annoying noises, …

– Since a lot of vSphere features originally were introduced in VMware Workstation, it’s always nice to play around with it.

– With the coming of VMware Workstation 8, you can finally expose VT-x to the VMs, making it possible to run x86 & x64 VMs on your virtual vSphere environment.  This includes VDR, vShield, …

– Finally, it’s cheaper that a hardware setup (maybe not as powerful in terms of performance but it will only host a Lab environment so no big deal for me).

So that are my reasons to go for a virtual Lab setup.  On the next post, I’ll discuss the hardware you need for this desktop pc…

Building the Ultimate vSphere Lab – Part 1: The Story

Building the Ultimate vSphere Lab – Part 2: The Hardware

Building the Ultimate vSphere Lab – Part 3: VMware Workstation 8

Building the Ultimate vSphere Lab – Part 4: Base Template

Building the Ultimate vSphere Lab – Part 5: Prepare the Template

Building the Ultimate vSphere Lab – Part 6: Domain Controller

Building the Ultimate vSphere Lab – Part 7: SQL Server

Building the Ultimate vSphere Lab – Part 8: vCenter

Building the Ultimate vSphere Lab – Part 9: ESXi

Building the Ultimate vSphere Lab – Part 10: Storage

Building the Ultimate vSphere Lab – Part 11: vMotion & Fault Tolerance

Building the Ultimate vSphere Lab – Part 12: Finalizing the Lab

Building the Ultimate vSphere Lab – Part 2: The Hardware

Several factors are important to make a powerful desktop pc able to host all the VMs we will need:


You need a CPU with at least 4 cores.  It’s nice to have Hyperthreading as it will give you more logical CPUs and more vCPUs to hand out to the VMs.

Secondly, you need Virtualization Technology features enabled on the CPU.

Let’s start by looking at Intel.


Intel Core i3 systems are no use since they only have 2 cores and no VT-x support.  Update: as someone pointed out in the comments section: recent Core i3 do have VT-x support!  So if you can live with the 2 cores limit, Core i3 is a valid option!

Intel Core i5 is good if you are on a budget.  Pick a CPU with 4 cores (some i5 CPUs only have 2 cores).  You won’t have HyperThreading as that’s only available on the i7.

The Core i7 CPU systems are best suitable for our setup.  Make sure you have 4 cores(some editions only have 2).  Hyperthreading is enabled by default on Core i7 so that’s a good thing.  You need to have Intel VT-x features as well but to my knowledge, all Core i7 CPUs come with those features.


I’m not following ADM brands but basically the same things apply.  At least 4 cores, and AMD-V/RVI support.  To my knowledge, all Athlon 2, Phenom 2 and FX CPUs have those.  The newest FX series are nice looking and affordable.


A stable and decent motherboard is what counts here.  If you want all kinds of fancy features and bling bling, you can easily spend 500 $ on a motherboard.  As there are tons of brands and models, let me list the most important things:

– Pick a CPU Socket that matches your CPU (i know, it sound silly but it would be a shame if your expensive cpu doesn’t fit in that small socket clip_image001[1])

– Make sure you have at least 4 memory banks.

– Onboard Video is nice if you don’t play games.

That’s it besides the usual stuff (SATA, USB, ATX format, …)


You will need 16 GB at minimum!  Using 4 GB DIMMs (affordable, 8 GB DIMMs are too expensive) you will need 4 memory banks in your Motherboard.  If you have 6 banks, you can go for 24 GB easily.

Memory speed matters, but look at the price.  Amount of memory is more important than speed.  Better go for 24 GB ‘slower’ memory than 16 GB of faster memory.

Hard Disk

You need at minimum one decent SSD of 40 GB minimum.  I have an Intel X-25 SSD, but any fast SSD will do.  Buy one of the latest generations since the evolve pretty fast when it boils down to performance.  Personally, i prefer Intel.  The bigger the SSD, the more VMs you can store on SSD and the faster they will respond.  120 GB is affordable these days.

We will use VMware Workstation technologies (Linked Clones) to put multiple VMs on only 10 to 20 GB of SSD storage, so you don’t really need that much storage… but then again, the more the better isn’t it? clip_image001[2]

You will also need a big ‘traditional’ Hard Disk for other storage (ISO files, less used VMs, …).  Any SATA 3.5” HDD will do.  Look for 500 GB or more.


The other components (Case, DVD, …) are not that important.  Pick whatever suits you best.

Install the system with Windows 7 64-bit (because of the high amount of memory, you will need 64-bit OS).  Linux should do as well, but i use Windows at home so I’ll focus on that one.

On the next post, we will look at the Installation of VMware Workstation and it’s configuration.

Building the Ultimate vSphere Lab – Part 3: VMware Workstation 8

Once we have our desktop installed with Windows 7 x64, it’s time to install VMware Workstation 8.

Download the latest binaries from VMware website and start the setup:


Pick a Typical installation.


The default installation location is fine as it is.

I recommend to check for product updates on each startup.


If you’re in a generous mood and willing to help VMware, tick the check box clip_image001[3]


Continue the installation finish it.

When the installation is finished, start VMware Workstation with Administrative Privileges (Right-click and select Run as administrator).


Click HelpEnter License Key… to unlock VMware Workstation.

Let’s start by Configuring VMware Workstation by opening EditPreferences…


The first option we will change is the Default location for Virtual Machines.

Create a Folder “VM” on your SSD drive and on the HDD drive.  The default location will point to the HDD drive.  This way, all VMs are placed on HDD (where we have plenty of space) and only our ‘precious’ VMs will be placed on SSD manually.

My HDD is E: and my SSD is C: (I only have 1 80GB SSD which has my OS installed as well.  This leaves me about 25 GB free for VMs on the SSD).


Next click the Updates item in the inventory window and click the Download All Components Now button.  This will download all VMware Tools versions.  This can be skipped but VMware Workstation will prompt you to download this on the first OS installation of each type.  As i find that quite annoying, I prefer to download them all at once in advance.


Next, click the Memory item.  Change the memory slider until you have a little bit more that 2 GB left for the OS. (my Windows 7 with the default things running like AV consumes 2.04 GB).  If your OS has not enough RAM available, it will start swapping and performance degrades. (putting you SWAP file on the SSD will partially boost performance but still, not an ideal solution).


Click OK to save the preferences.

Now it’s time to set up our Virtual Networking environment.  Open the Virtual Network Editor.


Basically, you have three options for a network:

– Bridged: The VM will get an IP analog to your desktop PC.  Required if the VM need internet access or access to other devices in your home network (NAS, …)

– NAT: VMware Workstation will act as a router.  Not really needed for our setup.

– Host-only: Compare this to an Internal switch on vSphere.  VMs can communicate with each other, but not to the outside world.

Some networks are created by default.


The default VMnet0 network will be used temporary to set up the first VMs so we’ll need that.

Next, we’ll create a new Internal network for our LAN communication (vSphere hosts, vCenter, SQL, …).  Hit the Add Network… button to create one:


Pick VMnet2


The network must be Host-OnlyDeselect the options Connect a host virtual adapter to this network and Use local DHCP service to distribute IP address to VMs.

Change the Subnet IP to with a subnet mask of  This will give us quite some IPs to play with.


We will create additional iSCSI/NFS network later on, but this will do for now.

So this will give us two Virtual Networks to use: VMnet0 (with Internet connectivity) and VMnet2 (Internal network only).


Click OK to save these settings.

That’s it for this post!  Next, we will start creating our Infrastructure VMs (DC, SQL, vCenter, …)

Building the Ultimate vSphere Lab: Part 4 – Base Template

Now it’s time to start building our Virtual Infrastructure services.  This will consist of a bunch of VMs hosting Active Directory, SQL Server, vCenter, …  So we’re talking about 3 to 5 VMs here.

We will use Windows 2008 R2 as the base OS for these VMs.  We will be using Linked Clones technology of VMware Workstation to put those VMs in the smallest space possible.

To make it a short story, we’ll install one ‘Base VM’ with Windows 2008 R2 including all the patches/service packs.  Then, we will create a linked clone for each of our VMs.  This linked clone contains only the differences between the Base VM and the linked clone.  In most cases, this is less than 5 GB per VM.

So let’s start for the Base VM.  Click Create a New Virtual Machine to create your first VM.


Pick Custom (advanced).


The Hardware Compatibility must be Workstation 8.0 (default).


Select I will install the operation system later.


Pick Windows Server 2008 R2 x64 as the OS Type.


Name it Windows2008R2_Base and store it under the VM folder on your SSD drive.  DO NOT STORE IT ON YOUR HDD!!!  This Base VM will get A LOT of Read IO.  If you put it on your HDD, smoke will probably arise from it clip_image001[4]

Since my SSD is the C: drive, I store it under C:\VM


One CPU/Core will be sufficient.


Memory size of 1024 MB.


Set the Network Type to Do not use a network connection.


LSI Logic SAS Controller.


Create a new virtual disk.


Type is SCSI.


Select Store virtual disk as a single file.  These days everybody uses NTFS on Windows 7 so there are no issues with big files.

40 GB disk size is fine.  They are thin provisioned (since we do not select the Allocate all disk space now) so only used space will be allocated.


Accept the default Disk File.


Click Finish to create the VM.

It will appear in your VMware Workstation console now.


Edit the virtual machine settings.

First, remove the Floppy, USB Controller, Sound Card & Printer devices.  We won’t need them and they only consume unnecessary resources.


Next, click the Add button and add a Network Adapter.


Select Custom – VMnet0 as the network connection.  This will give the VM internet access.


Click the CD-DVD (IDE) drive and attach the Windows 2008 R2 ISO file to it.  This ISO file is best stored on the HDD as you need it only once.

Click Power on this virtual machine.

If you get a warning about your Memory Configuration, just tick Do not show this message again and continue.

The VM will boot from DVD and the installation of Windows begins.  Pick the correct regional settings and install it.


Every Full Installation edition of Windows besides Web Server will do.  Since i will run a trial edition, i use the Datacenter edition…  Not that we will be using any of those features, but it just shows up nice clip_image001[5]


Pick a Custom Installation and install it on the 40 GB drive.  Now is a good time to look at the files in the VM directory on your desktop.  The VMDK file which actually contains all the data will grow now as data is been copied from the ISO to the VM.


After installation, about 7 GB will be consumed.  Nice.

Back to the VM, change the password to something strong (capital letters + small letters + number).  We will reuse this password for all accounts.  After all it’s only a lab so no sensitive information will be found, but we need to have a password since blanks are not accepted.


Your mousepointer will be choppy, so let’s solve that first.

First, we start by installing VMware Tools on it (VM – Install VMware Tools…).


An AutoPlay popup will appear in the VM.  Click Run setup64.exe and perform a Typical Installation.  Reboot the VM.

Performance of the VM is okay now, as well as the graphics performance.

Before updating the VM, we will install .NET Framework first.  Open Server Manager and click the Features item.  Click the Add Features link.


Select the .NET Framework 3.5.1 Features item.


Some additional roles need to be installed.  Do so by clicking Add Required Role Services.


Click Next, Next, … Install to install it.

Next, we will turn on Windows Update to bring the VM up-to-date.  You can go ahead and install all the updates, but it’s easier to apply the latest service pack first.  Download it from the Microsoft website and then apply all Windows Updates patches afterwards.

TIP: Disable IE ESC in Server Manager.  Makes surfing a bit easier on the VM.


Now that our system is up-to-date, it’s time to clean it up.  When looking at the VMDK file size, we have grown to 17 GB already!  Yikes!


We’ll start by removing the SP1 installation files.  In a command prompt, run dism /online /cleanup-image /spsuperseded.


After that, we are going to remove all Windows Update backup files.  Stop the Windows Update service and delete the C:\Windows\SoftwareDistribution folder.


After deletion, Start the Windows Update service.

Next up the hibernation file: open a command prompt as Administrator.  Type powercfg.exe /hibernate off


After all these step, the VM is consuming less than 10 GB.


Open up VMware Tools, go to the Shrink tab.  Click the Prepare to shrink button.


It’ll take some time…



After it has completed, look at the VMDK file size:


9 GB!  That’s more like it!

Now the VM is ready to be used as a Template.  Run c:\windows\system32\sysprep in the VM.


Select the OOBE option and check Generalize.  Select Shutdown and click OK.


The VM will shutdown automatically and is ready to be templatized (i just invented a new word clip_image001[6]).


That’s it for now!  On the next episode we will start deploying our first VM which will be the Domain Controller.

Building the Ultimate vSphere Lab: Part 5 – Prepare the Template

First, we will need to ‘protect’ our parent VM and make it a template.  This ensure we don’t delete it or power it on.  Select the Windows2008R2_Base VM and click Edit virtual machine settings.


Select the Options tab, go to the Advanced item and check the Enable Template mode checkbox.


Next up, we need to snapshot the Base VM.  All our linked clones will be based on this snapshot.

Right-click the VM and Snapshot it!


Give it a name like Version 1.0 and provide a good description of it.


That’s it!  Now we are ready to start deploying the first VMs!

Building the Ultimate vSphere Lab – Part 6: Domain Controller

The first VM we will deploy is our Domain Controller.

Right-click the Windows2008R2_Base VM and select Manage – Clone.


Base the clone on an Existing Snapshot named Version 1.0 (or whatever you called it before).


Create a Linked Clone.


Store it on the SSD drive and name it DC.


Power On the DC!

It will boot and will run through the Mini Setup.


Windows will ask you for Regional Settings and a Password.  It will boot afterwards.

You may notice that display performance is a bit sluggish.  Just Reinstall VMware Tools and Repair it and you’re set.


Okay, the first thing we will do is to put the network of this DC to the Internal we created earlier.

Edit the settings of the VM and change Network Adapter to VMnet2.  The DC is now isolated from your home network.  It can only communicate with other VMs on VMnet2 (but there aren’t any for now).

Fill in the IP4 Settings like in the screen below (mind the subnet!  It’s a /24!).


Next, Rename the VM to DC and reboot.


After the reboot, get back into the Computer Rename dialog box and press the More… button.

Fill in a valid DNS Suffix for your new domain we will create.  Mine will be named labo.local.  This means my DC will be DC.labo.local.  Reboot afterwards.


Next up, open Server Manager and click the Add Roles link.  Select DHCP Server & DNS Server.


Click Next a couple of times until you reach the IPv4 DNS Settings.  Fill in labo.local in the Parent domain field.


Continue clicking Next until the DHCP Scopes screen.  Click Add and add a scope ranging from until

Click Next until the DHCPv6 Stateless Mode and disable it.

Install the goodies!


Open the DNS Console and create a Forward Lookup Zone with the following settings:


Primary zone

Zone name


Create a new file …


Dynamic Updates

Allow both unsecure and secure dynamic updates

Then, create a Reverse Lookup Zone with the following settings:


Primary zone


IPv4 Reverse Lookup Zone

Network ID


Create a new file…

Dynamic Updates

Allow both unsecure and secure dynamic updates

Now perform an ipconfig /registerdns (or reboot your server) and ensure it is listed in the Forward and Reverse lookup zone.


Now it’s time to perform a DC Promotion.  Enter the dcpromo command.  The AD binaries will be installed.  Create a new domain in a new forest.

Fill in labo.local (or your own domain name) as the forest name.


Set the Forest functional level to Windows Server 2008 R2.


On the DNS Delegation, selection the option to no create the DNS delegation.

Accept the default file locations for AD binaries.  You could change them (as a best practice) to seperate disks, but since this is only a small LAB AD, i won’t bother with that.


Fill in a valid Directory Services Restore Mode password and click Next a couple of times to install AD.


You will get a warning about the DNS Zone.  Just skip it.


After the reboot, open Server Manager and go to Roles – DHCP Server.  Right-click your DHCP server and select Authorize.  This will make both IPv4 and IPv6 “green".


If you want, you can change the Forward and Reverse Lookup zone in DNS to AD Integrated, but it’s not really necessary for our lab.

That’s it for our Domain Controller!

Next up will be the SQL Server!

Building the Ultimate vSphere Lab – Part 7: SQL Server

Create a new linked clone based on the Windows2008R2_Base template just like you did with the Domain Controller.  Name the machine SQL.

Again, store it on SSD storage.  Run through the OS Setup like you did with the Domain Controller.

Change the Network Adapter to VMnet2 to it can reach the DC.

If all goes well, you should get a DHCP address.


Give it a valid IP address and point the DNS Server to the DC.


Rename the Guest OS and make it a member of the labo.local domain.


Create a useraccount SQLAdmin in Active Directory (set the password to never expire).  Add this account to the Local Administrators group on the SQL VM.


Log on with this account to the SQL VM.

Before starting the installation of SQL Server, we’ll add an additional HD to the VM first.  We’ll throw all SQL binaries on that disk.

Right-click the SQL VM and select Settings.  Click the Add… button and pick Hard Disk.


Create a new virtual hard disk of 40 GBStore the virtual disk as a single file.


Rename the VMDK to something like SQL_Data.vmdk.  This makes it easier to locate the correct vmdk if ever needed.


Get back into the VM and format the disk.


In order to reach the SQL binaries (which are stored on the Windows 7 desktop VM), i use the Shared Folders feature of VMware Workstation.  This allows you to share a single folder between the hosts and the guest VMs.



Start the Setup of SQL Server 2008 R2.  Select Installation and pick New installation or add features to an existing installation.


I will run SQL in Evaluation mode, but if you have valid licenses, feel free to add them here clip_image001[7]


Some Setup Support Files will be installed.


You will get two warnings: one because you cannot access the Internet and a second because the Windows Firewall is enabled.

Select a SQL Server Feature Installation.


Install the Database Engine Services and the Management Tools – Basic.  Change the directories to you SQL Data drive (in my case E:)


Install a Default Instance but again, change the drive to the SQL Data drive.


Set the useraccounts for the services to LABO\SQLAdmin and change all services to Automatic.


Set the authentication to Windows and add the Current User to the SQL Administrators.


Finish setup.

That’s the basic setup for SQL Server.

Building the Ultimate vSphere Lab – Part 8: vCenter

And now finally we come to the point where we are going to install a VMware product clip_image001[8]

Create yet another linked clone based upon the Windows2008R2_Base VM and name it VC.  This must be stored on SSD as well.

The Virtual Network must be VMnet2.  Add it to the domain labo.local.

Create a user VCAdmin in AD and make this a member of the Local Administrators group on the VC.  Log on with that user.

First we need to install SQL Native Client.  This is located on the SQL ISO (the one you installed SQL Server on @ SQL VM).  It can be found in folder 1033_enu_lp\x64\setup\x64 and is called sqlncli.msi.

The installation is just a matter of Next, Next, Next, Finish clip_image001[9]


Now, hop on to the SQL VM and open SQL Management Studio.

Click SecurityLoginsNew Login.


The login name must be LABO\VCAdmin.


Right click Databases and select New Database.

Name it vCenter, set the owner to LABO\VCAdmin and size the MDF file to 100 MB.


On the Options tab, change the Recovery Model to Simple.


Get back into SecurityLogins and open the properties of your LABO\VCAdmin account.  Go to the User Mapping tab.  Give the account do_owner permissions on both the msdb and the vCenter database! (the vCenter database should already be okay normally).


Okay, now head back to the VC VM.

Open up Administrative Tools and select Data Sources (ODBC).  Create a new System DSN.  Select SQL Server Native Client.


Name it vCenter and point to the SQL server.


Click Next on the following screen and…  uh oh


Go back to the SQL Server and open SQL Server Configuration Manager and Enable TCP/IP.  Restart the SQL Server Service.

After that, open Windows Firewall and select Allow a program or feature through Windows Firewall.  Click Allow another program.  Browse for it and go to E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe.


Go back to the VC and try again… it should proceed now.

Change the default database to vCenter.


Finish the wizard.

Now that we have the SQL stuff covered, it’s time to install vCenter!  Start autorun from the vCenter binaries.

Select vCenter Server (duh!)


Setup will complain that IIS is installed (got installed with the .NET installation routine).  Therefore, disable the World Wide Web Publishing service on the VC server.



The following screens are quite easy to understand.  Select use an existing supported database and select the vCenter ODBC source you created above.


It will detect that Windows Authentication will be used.  Fill in the password for the vCenter service (VCAdmin, the account we gave dbo permissions on the databases).  This will also mean that the vCenter service will be started with this VCAdmin account!


Accept the default installation paths.  Create a standalone VMware vCenter Server instance.

Set the JVM Inventory Size to Small.


Finally, click Install to start the installation.


To finalize, install vSphere Client.


Start vSphere Client, install the certificate and you should connect flawlessly to our brand new vCenter environment!


And in case you were wondering, all our 3 VMs together consume about 20 GB.  Not bad clip_image001[10]

That’s it for now!  Next up, we’ll start installing our ESXi hosts.

Building the Ultimate vSphere Lab – Part 9: ESXi

Now that we have our vCenter running, it’s time to deploy our ESXi hosts.

Depending on the amount of memory you have, you can deploy as many ESXi hosts as you want.  Personally (I have 16 GB), i will install 2 of them.

Start by creating a new Virtual Machine.  Take Custom for the type of configuration.


Hardware Compatibility is Workstation 8.0.

Attach the ISO of VMware ESXi 5.0.  The wizard will detect ESXi automatically for you!


Call it ESXi1 and place it on HDD storage.  There is no use on putting it on SSD storage since ESXi has no real important data to store which is important from a performance point of view.


You can play around with the CPUs/Cores, but i give it a Dual Dual-Core (so cores in total).  Gives you some more cores to play with if you want to dive into the CPU scheduler details.


Give the ESXi host 4GB of memory.


Select Do not use a network connection as we will add it later on.


Accept the standard LSI Logic SCSI controller.

Create a new virtual disk and pick SCSI as the type.

Use a 40GB disk and store it in a Single File.


Complete the wizard and click Finish.

Edit the settings of you newly created VM.  Remove the Floppy and USB Controller.

Click Add and add a Network Adapter.  Attach it to the VMnet2 network.

Repeat the procedure and add a second Network Adapter to the VMnet2 network.  This will give you a screen like this:


Select the Processor item, and select Virtualizae Intel VT-x/EPT or AMD-V/RVI.  This allows you to run x64 guests on these ESXi hosts.


Now before starting and installing ESXi, take a Full Clone of this VM and name it ESXi2.  You can create a fresh VM as well, but cloning it will go faster.


Now, Power On you ESXi1 host.

The ESXi Installer will boot.

Follow the wizard and install ESXi on your 40GB local disk.


Use the same root password as you always do.

The installer will wipe your hard disk…  Let him do so by clicking F11.


After the installation, the host will reboot.  Press F2 to customize it.  You will need to login with root.


Select Configure Management Network.  First, go into Network Adapters and add vmnic1 to the list.


Give it IP and set the default gateway to (DC).


Get into DNS Configuration and set the DNS server (should already be set through DHCP but verify) and change the hostname to esxi1.labo.local.  Do not use capital letters here!


Exit the screens and enter Y to restart the Management Network.


That’s it for the basic ESXi installation… Quite easy eh?

Now repeat this part for ESXi2 (IP =

After the two ESXi hosts have been installed, log on to the DC and open Server Manager – Roles – DNS Server – DNS – DC – Forward Lookup Zones – labo.local.  Create a A Record for both ESXi hosts.

Create a PTR Record as well!


You DNS should like like this:


Move over to the vCenter server.  You must be able to ping both machines using their FQDN now!


Open up vSphere Client.

First, create a new Datacenter and below it, create a new Cluster.

Turn on HA & DRS.


Leave all other settings to default and complete the wizard.

Now, add the two ESXi hosts to the cluster:


That will give this cluster layout in vSphere:


Both hosts will have errors (HA related, but it’s no big deal as we’ll solve them later on).

If you ESXi hosts disconnect continually, check Administration – vCenter Server Settings – Runtime Settings and fill in the IP of vCenter.


Building the Ultimate vSphere Lab – Part 10: Storage

We now have a cluster, but still not a usable because we don’t have Shared Storage yet.  So let us add some clip_image001[11]

We will go for an iSCSI solution.  This makes perfect sense since this can be virtualized perfectly.  Many iSCSI appliances exist on the market today.  Lefthand, UberVSA, OpenFiler, …  I will however go with the easiest solution: installing a Software iSCSI Target on Windows Server.

Again, various flavors exist, but what most people don’t realize is that Microsoft has it’s own free iSCSI Target.  I has all the basic functionality you need (CHAP, Snapshots, …).  No replication or other advanced stuff is supported, but we don’t really need that for now.

Let’s start by downloading the goodies:

Extract it and put it on the Shared Folder to the VMs can access it.

Now, before we install the iSCSI Software, we need to change our VM to support it.  We will use our vCenter Server for Storage.  If you have the resources on your PC, a dedicated VM would be better (but then, i would go for a dedicated iSCSI appliance like Lefthand, OpenFiler, …).

Give your vCenter VM a second Hard Disk of 500GB and put it on HDD storage.


Initialize it in Windows.  That will become our E: drive on the vCenter:


Now, we want our iSCSI to be a seperate network.  So open the Virtual Network Editor in VMware Workstation.

Create VMnet3 for IP range


Give the vCenter VM a Second Network Adapter connected to this newly created network.


On the vCenter, rename the connection to iSCSI.


Give it IP


Go to the Microsoft iSCSI Software Target folder and start x64\iscsitarget_public.msi.

The installation is a matter of Next, Next, Finish.


Now, open the Microsoft iSCSI Software Target console.


On the root item, click Properties.  Enable only IP to listen for iSCSI sessions.  This ensures we only use the dedicated iSCSI network (VMnet3).


Right-click Devices and select Create Virtual Disk.

Point it to E:\iSCSI\Datastore1.vhd.


Set it to 200GB (200000 MB) or something in that neighborhood.  Pay attention as the input fields are in MB (Megabytes).  We won’t assign any targets yet.

Create a second Virtual Disk called Datastore2 in the same folder.  Make the size different, so it’s easier to differentiate the two datastores.


Now that we have our storage ready, let’s prep the ESXi hosts for it.

Remeber that we put the iSCSI traffic on a seperate VMnet3 network.  Our ESXi hosts currently have 2 NICs in the VMnet2 network, so no iSCSI traffic will be possible.

Shutdown the ESXi hosts, go into Settings and Add 2 Network Adapters both connected to VMnet3.

Power On the ESXi hosts.  Select a host and go into Configuration – Networking.  Your current config will look like this:


Click Add Networking… to add a new vSwitch.

Select VMkernel as the type.  Use the newly added vmnic2 & vmnic3.


Name the Portgroup iSCSI_1 and don’t select any other options.


Use IP for ESXi1 and for ESXi2.


Open the Properties of vSwitch1 and select Add… to add another VMkernel interface.  This will become iSCSI2 with IP for ESXi1 and IP for ESXi2.

Change the NIC Teaming Failover order of both iSCSI_1 & iSCSI_2.  Set vmnic2 active for iSCSI_1 where vmnic3 becomes unused.  Change it the other way around for iSCSI_2.


The Network Layout looks like this now:


Now get into Configuration – Storage Adapters and click Add….


Select the newly added iSCSI HBA (vmhba33) and click Properties….


Copy the iSCSI Name (you can change this name to something more readable if you want)


Get back into the Microsoft iSCSI Software Target console and select iSCSI TargetsCreate iSCSI Target.


Fill in the hostname as the iSCSI target name:


Paste the iSCSI Name from vCenter into the IQN Identifier field.


Now that the Target is created, let’s assign our two LUNs to it.  Right-Click it and select Add Existing Virtual Disk to iSCSI Target.


Select both disks.


Back in vCenter, open Network Configuration on the iSCSI Initiator Properties.


Add both iSCSI_1 and iSCSI_2 to it.


Move on to the Dynamic Discovery and add as a new iSCSI Target.


Close the Window and Rescan the vmhba33 adapter.

Your 2 LUNs will become visible.  Note that we have 4 paths meaning 2 per LUN (= load balancing & failover possibilities).


Repeat the same procedure for ESXi2.

After that go to ConfigurationStorage and create 2 new datastores on these LUNs.


Open the Properties of your Cluster and enable vSphere HA.


It should be enabled without errors (you will receive warnings if you don’t have Shared Storage, that’s why we enable it now and not during Cluster creation).

That’s it for now!  Next, we will create our vMotion interface!

Building the Ultimate vSphere Lab – Part 11: vMotion & Fault Tolerance

Next up is the creation of our vMotion interface.

Let’s take a look at vSwitch0 first:


Open Properties… and remove the VM Network portgroup.  Then, open the properties of the vSwitch and put both vmnic adapters as active.


Now open the properties of the Management Network and set vmnic0 as active and vmnic1 as standby.


Now, add a new VMkernel interface on vSwitch0.  Name it vMotion and enable it for vMotion.


Use IP for ESXi1 and for ESXi2.


Finish the wizard, open the Properties of the vMotion Portgroup and set the NIC order so vmnic1 is active and vmnic0 is standby.


Repeat this procedure for ESXi2.

That’s it for vMotion.  Not really rocket science clip_image001[12]

Now it’s time to activate Fault Tolerance.  That’s right, Fault Tolerance running on vSphere in VMware Workstation!

Power Down your two ESXi hosts.

Open the Virtual Network Editor and create a VMnet4 network in the range.


Give each ESXi host 2 new Network Adapters in this VMnet4 network.


Power On the hosts and get into ConfigurationNetworking.

Click Add Networking… to add a new vSwitch.  Select VMkernel and use vmnic4 and vmnic5.


Name it Fault Tolerance and enable it!


IP will be for ESXi1 and for ESXi2.


This gives you the following Networking Layout.


Now, before you enable FT on a VM, you need to set the following Advanced Configuration Parameters on EACH VM you want to protect with FT.

replay.allowBTOnly = true

replay.allowFT = true

replay.supported = true


Now you can run Fault Tolerance enabled VMs on your virtual vSphere 5 ESXi hosts!  How cool is that?  One exception though, the VM you enable for FT can be 32-bit only!

I personally like to play around with some DOS appliance which has some games installed.  It is small enough to run smoothly on these virtual environments.

Building the Ultimate vSphere Lab – Part 12: Finalizing the Lab

Our basic setup is almost ready.  We just need to give our VMs some networks to connect to.

Let’s create a new VMnet5 network in the Virtual Network Editor.  Use range and enable the Use local DHCP service to distribute IP address to VM.


Change the DHCP Settings and fill in a valid start and end address.


Power Off the ESXi hosts and give them two extra vNICs attached to VMnet5.


Create a new Virtual Machine portgroup/vSwitch on vmnic6 & vmnic7 and you’re set:


Now you can start creating your VMs, vMotion them around, play with Fault Tolerance, create dvSwitches, install VDR, experiment with vShield Zones, …  you get the picture clip_image001[13]

With this we can finalize this series.  You now have a fully functional environment which is very flexible and you can start playing with all the features in vSphere 5!

Happy playing in your Virtual Lab Environment!

Source & Credits: