Professional Documents
Culture Documents
There are several possibilities for the design, especially for shared storage where the nested VMs live (the
second level nested VMs). I will try to save as much on the storage space here. There are many different
ways on how to design that part also.
To make it easier to build, not many guides are available which walks you step-by-step, especially when it
comes to the network design and also to get the best available tweaks to save every single gigabit of
storage, since this solution must obviously run on SSD storage.
Sure, physical lab gets better performance, but portable lab is portable. You can take it with you while
traveling, while on the boat, or train.. -.
You might be interested in Academic discounts. VMware Workstation Academic For Faculty Staff,
Students and Teachers. Youll need to download the latest vSphere 6 ISOs and also youll need Microsofts
2012R2 server ISO. Some client OS as well, Win 7..
I suppose that you would use the VMware 60 days trial, since there is no VMware Tech Subscription
Available. Not yet at this moment.
I suppose that you know your way, but for this guide is for
everyone the newbies included so here are the URLs:
VMware: VMware Trials 60 days trial on VMwares website.
Microsoft: Microsoft Trials there are 180 days trials there
available for download. Sometimes you can find some coupon
codes for MSDN subscription on http://blogs.msdn.com/
I will walks you through all the necessary steps in order to
prepare your virtual network environment, your VMs in
VMware Workstation, The shared storage..so youll be able to test the enterprise features provided by
VMware vSphere. Features like vMotion, High Availability (which permits automatic restart of VMs in case
of physical host failure), Fault tolerance or DRS all this is possible to configure run on this system.
In order to be able to simulate this with nested hypervisors, a network design must be done in VMware
workstation to permit this. The second challenge will be the storage space, since the SSDs are expensive
and dont provide enough storage. I will leverage the linked clones feature of VMware Workstation. This
feature will allows us to create one base image and each new VM will be created as a linked clone from this
base image. Like this only the delta of the base image will be used for the creation of those VMs.
One of the biggest challenges for newcomers is the network design. In fact its not that difficult but when
dealing with nested ESXi host, you must deal with nested networks as well.
In this guide you will be able to learn step by steps to setup
all the networks necessary to activate and run the different
VMware vSphere enterprise class features (vMotion, FT, HA)
To start the network design well be using the Virtual Network
editor which is bundled with the VMware Workstation
software. You can also use the trial of VMware Workstation,
and then when the trial expires you can stick with VMware
Player, which is free. Like this you can keep access to the
Virtual Network Editor after the expiration.
If you install just the VMware player, the Virtual network
editor is not bundled. The shortcut to the small exe file is the through the following path: "C:\Program
Files (x86)\VMware\VMware Workstation\vmnetcfg.exe" or there is also an icon in the start menu.
After starting the Virtual Network Editor, the default networks are present there. I know from my own
experience, that it can be confusing when you just starting with virtualization and you start to find your way
through the different layers. If you want to write down on a piece of paper the default networks, you can.
So lets add some networks. Click the ADD Network button and Add VMnet2 as a network. Setup the
options as on the screenshot below.
The solution is designed to use isolated networks. So all the VMs (the nested ESXi hypervizors, the vCenter
VM and the DC VM will run in a Sandbox. This is because I dont want to interfere with other VMs or
services if my laptop is plugged-in to the LAN. You can easily override that by using the Bridged option. In
that case all the VMs will be visible outside of your PC or Laptop
There are several possibilities to design a network for ESXi hosts. The limitation of VMware Workstation is
10 vNICs, but dont worry, we will not use all this as a NICs..
Well use 6 NICs, but that does not mean that this is the only possible design. There are designs for each
different situations, so its really depends. I choose this setup to show you the major features of vSphere
with least possible hardware..
Now, before we go further with the network setup, you might want to have a look at the chapter called
Installation of Nested ESXi hosts. And then come back here.
Go and select the ESXi host where you want to add more NICs > Edit Virtual Machine settings.
Do that for both ESXi hosts. Then you can boot them up. In the next chapter we will create and install
vCenter VM, create cluster and add both hosts into that cluster. Only then we can finalize the network
configuration for those nested ESXi hosts.
Here is the recap:
Those are the virtual networks adapters added in VMware Workstation associated to VMnic virtual
network cards in Nested ESXi hosts. But obviously you dont have to organize the network like this and do
you r own plan
Configure 6 NICs for that VM. Add one by one those virtual NIC cards to the nested ESXi host. Those virtual
NIC cards configured here will appear in the t
This helps us save some time, since every time youll start an assistant and would like to create new VM,
the default location for your VMs will be defined as is and not in My Document\MyVms as e default
location.
Now well start to create a template for Windows 2012R2.
First when I usually install VMware Workstation on a new computer, I define the working directory. You can
have several drives in your desktop/laptop PS and one of them is usually used to store the VMDK files
which are the Virtual Disks files. In my laptop I do have only one SSD drive and I will specify the c:\VMs
directory as my working directory.
Choose to install the OS later, since well need to personalize the virtual hardware of this VM first.
On the next screen navigate to the Windows ISO image which you have downloaded from Microsofts
website.
Note: When choosing between those different OSes, it permits afterwards to install the correct version of
VMware Tools. The correct ISO will get mounted when the installation of VMware tools will be invoked.
We choose Microsoft Windows and as a family the Windows Server 2012R2 x64.
Choose one CPU, you can change that later when working with linked clones.
The same for memory. I accepted the default value. If you get a warning, just click cancel.
Concerning the network, choose not to connect for now, since well be able to choose the network
Default accepted..
iSCSI is the default value. Its also the more performant, since IDE was usually used for older systems, like
WinXP
Concerning the disk capacity, we can stick with the default value. The thin provisioning will be used, with
single file creation. The Allocate all disk space now option will not be selected. This option will use thin
provisioned disk and so even when the Operating system will see 40 Gigs, the real size of the VMDK file will
be just a little over 7 Gigs but wait to see it by your own.
Single file, otherwise we will have multiple files with 2 gigs in size.
The disk file name has the name of the VM by default. No reason to change that. The default location is in
the same folder as the other files which are used by this VM. Now, click on the customize hardware button
to have the possibility to personalize this Template.
Here we can take off all this hardware, its not necessary for our purpose. Make this VM as light as
possible.
Add a network adapter and connect it to VMnet5, which is our network which is isolated network.
1
0
Next, you can power-On this VM by clicking the green triangle in the Top left corner. You should see the VM
booting and showing you the Windows server 2012 default installation screen.
Before you power ON the VM, dont forget to go and verify that the ISO image of the Windows 2012R2 is
connected to the VM otherwise the installation process wont start. (youll see that the VM will try to boot
from network..
1
1
You can go ahead and choose a language, keyboard language and Time and currency format.
Click on the Next button and choose the Windows Server 2012 R2 Standard (full installation).
Here you go have a coffee now, because it will take some time to decompress and install the system.
1
2
When installation is finished, at first prompt youll be asked to change your default password. Pick a strong
password with at least one capital letter and some numbers.
Then, if you mouse get stuck inside of the VMs window use CRTL + Alt as a shortcut to get out of the
window and free your mouse
Install VMware Tools and reboot the VM.
Note: You can launch the VMware tools installation process from the menu
The installation of VMware Tools is necessary step since it will install all the necessary drivers for your VM
(Display, network, hard drive. Etc.)
You can disconnect the ISO of Windows Server 2012 now. We will not need it any more.
After the VM restarts, well install some additional role components
But first, well deactivate some annoying Internet Explorer Features
Take the Typical option and reboot the VM after the VMware tools complete.
1
3
If we dont install the latest updates from Microsoft, we can keep the base image with about 8.4 Gigs of
size.
Stop the VM and look at the size of the VMDK files.. Pretty good, if you want you can go to the VMs
settings to try to get back few hundred Megs, but thats all you can get back at this stage
1
4
This is pretty good, since from now on well use only delta files which will use as a base this VMDK file
image. Now we only need to sysprep the VM and Turn it into Template.
1
5
By doing a sysprep, the next time we will do a linked clone and start the clone, the VM get its new
identifier, new NetBIOS name, etc etc.. And well not have a trouble with dealing with double SIDs. Unique
SIDs are required for domain controllers anyway.
Now when the sysprep operation has finished, the VM has been automatically stopped. We need to
create a template.
Name the template to fit your needs. You can put the date of creation and your own comments if you need
to
The template is now secured with a special protection. You cant for example delete the VM by going to the
menu VM > Manage > Delete from disk.
To make this template a real Template you need to check in the VM properties the Enable Template
Mode
1
6
This VM will be not only our domain controller, but will also do a DNS resolution for our small virtual
labDNS resolution is a necessary.
1
7
1
8
We need to rename this machine and start the dcpromo. First lets rename this machine to DC1. Right click
on Computer > Properties > Advanced system settings > Advanced TAB
After reboot well go and give to our VM Fixed IP first We put our VM onto isolated network Vmnet5.
Give that VM the IP adress 10.10.2.4/24 (mask: 255.255.255.0). If not already the case, just go to the
menu, choose VM > properties > select the network adapter and from the drop down menu choose
VMnet2.
Like this the VM wont go outside of the isolated network and wont interfere with any real servers on the
LAN. The next step would be to promote this VM to do our domain controller, DNS and DHCP server.
Add DHCP role and create and activate a scope, so your VMs can get an IP address on the internal isolated
network. The DHCP will stay active only on the VMNET2 network.
1
9
Then follow the assistant until you click the Install button You can start the installation of AD straight
away
2
0
I guess you know your way to install the rest of an Active Directory? I hope so.
Look at the size of the size of the linked-clone VM.. - 1550 Mb only thats the power of linked clones.
It uses the base image and creates only the deltas which are different.
The deltas represent all the configuration changes and AD, DNS, DHCP roles that we added.
I think that I dont have to mention that this configuration is completely unsupported to run in production
environments. If something goes wrong to the base template image, all your linked-clones will
dies.because there .. linked -.
So lets go ahead and lets get started with the installation. When choosing the new VM, select the
Hardware 11 version, one single hard drive (default 40 gigs is fine it will be thin provisioned). Accept the
default SCSI controller, and before powering On the VM configure the virtual hardware as on the
screenshot below. Add 2 virtual NIC cards with the VMnet5 network as a connection.
As for the number of CPUs, it depends on your CPU type. If your CPU has 2 or 4 cores, youll configure this
setting accordingly.
A virtual lab is also very flexible and can be easily be suspended while running in VMware Workstation. The
only condition is to have speedy hard drive. And while were here, if youre planning to run some lab on a
desktop, no need to setup the SSD drive as a bootable drive, since the OS files consumes quite a lot of
space. I would recommend placing the SSD drive as a secondary drive.
2
1
Then run the ESXi installer. Youll be presented with screenshots like this one.
2
2
Hit the Enter to kick the installation process The installation is fast. In few minuts youll have the
confirmation screenHit Enter to reboot.
After the reboot, hit F2 and log into the console. Youll see screen like this.
2
3
2
4
As I said, the installation and configuration of ESXi host is really fast -. Now, you can do the second one.
ESXi02. When finished, power down both VMs and go to the hardware configuration and Add some more
NICs. Well need it in the chapter called Network Design of Nested ESXi servers
The vCenter VM
The vCenter VM will run several services. We must grant more memory to this VM. A 8Gb is necessary to be
able to install vCenter. Well try to lower this amount later We will use this VM not only for vCenter
services but this VM will also assure other services that we will need, like:
-
The shared storage service. We will use this vCenter server VM as an iSCSI target where we will
run our VMs. Like this we dont need another VM which will consume memory and storage space
on our SSD drive which is very limited in space.
Ok, lets move on with the setup of this VM. First, well do another linked clone, this time for vCenter.
Go to menu VM > Manage > Clone > Existing Snapshot > and choose linked clone
2
5
vCenter Installation ISO which you downloaded from VMware Website as a 60 days trial together with the
ESXi Installation ISOs.
You can now start the installation process of vCenter. Hit the install button to start the installation process.
If you want to install VMware vSphere in production, then if youre small shop you can probably start
with VMware vSphere Essentials and Essentials Plus kits. Those are oriented for SMBs can manage up to 3
physical hosts via vCenter server essentials (also included in the licensing).
2
6
If youre using Vanilla 2012 R2 youll get a warning Youll need to install a patch from Microsoft.
https://www.microsoft.com/en-us/download/details.aspx?id=41573
Youll install 2 patches from this link.
The installer however lets you continue even if you dont install those two patches
2
7
2
8
2
9
3
0
Login with the administrator@vsphere.local and password that you have entered during the installation
process.
3
1
Then go to the Administration > Single Sign On Configuration > Identity sources TAB > Add (click the green
+ button. There youll add the your active directory
Then you must grant permissions for some of your AD users. I usually grant permissions only to domain
Administrators group Youll do it in the Global permissions > Add (Plus sign again) > Add > drop down the
list to show up the AD users and groups > add users
3
2
You can now log out and log back in as an administrator@lab1.local with the proper password
We can continue the rest of the setup through vSphere C# client Its more convenient. Do a right click and
create New Datacenter.
Jump back to your DC and via the DNS console create two forward and two reverse DNS records for your 2
ESXi hosts.
3
3
Do the same for the second host You should ping both hosts by FQDN as well, not only by IP address.
If you experiencing problems here make sure that you have both forward and reverse zones properly
created on your DNS server and in both zones you got the records populated as well. If not, create those
records.
3
4
Shared Storage
In order to implement most of the cool features from VMware vSphere, like vMotion, HA, the VMs must
live on shared storage. If youre new to virtualization I should explain a bit. Shared storage is basically
datastore visible from every host of your cluster. When you install a new VM, the destination space of that
VM is that shared storage. The VMs hard disk VMDK files are stored there, together with VMX (conf files)
and Swap files as well.
Every single host must see that shared storage in order to implement vMotion or HA.
To implement shared storage in a small lab like the one Im describing, there is several choices. You can
download and configure Openfiler or FreeNAS, which both provides Virtual Appliances and are quite
lightweight, but this, would Add another VM which consume memory and disk space in my small virtual
infrastructure. So the option Im taking is that I will implement the shared storage by my vCenter VM (yes
thats another role).
We will use the vCenter VM as an iSCSI target
Its very easy to install and setup to implement the shared storage. Ill first add a second virtual hard drive
and another vNIC for storage network, to my vCenter VM. Like this, I keep the number of VMs relatively low
because my 8Gigs of RAM in my laptop will get consumed very fast.
I think that its a good idea to rename those two NICs inside the VM so you can know which one is which
right away..
Ok, Lets move on. First, power down the vCenter VM and Add second vNIC which will be configured with
VMnet2 (our iSCSI network). The vCenter VM should have 2 vNICs.
3
5
Start both vESXi servers now (if not already running), open your vSphere client and connect to vCenter.
Make sure that you connect the right NIC. (I do one at a time)
Lets say I want the iSCSI traffic on the VMNET3 so I have to connect the the adapter inside VMware
Workstation (the VMNet editor)
3
6
And then have a look at my ESXi which card got connected I my case its vmnic2 So now I check the
VMnic 2
Now we must configure the vCenter VM, the second NIC we have just added, for the right network. On this
network we will be having our iSCSI storage traffic.
Give this card 10.10.3.10 with 255.255.255.0 without gateway.
Then open server manager and create a new iSCSI volume where we will store our VMs files.
Go to the storage adapters and Add software iSCSI adapter (in vSphere 5 its not present by default).
3
7
3
8
Create a new iSCSI initiator via vSphere Client. Go to Configuration > storage adapters > right click in the
empty space and select Add Software iSCSI adatpter.
Go select a host > configuration > networking > vSwitch properties > Add > VMkernel > Add > Follow the
assistant and add VMkernel adapter with an IP as this: 10.10.3.1. Then finish.
Then double click the iSCSI1 and go to the Nic teaming tab to make the vmnic2 as first and vmnic0 as
unused! This is super important.
While we are here, make sure that the properties of vSwitch we use both nics!
Double click the Management Network and do exactly the opposite. Make the vmnic0 as active and vmnic2
as unused!
3
9
Then select host > configuration > the storage adapters > right click the iSCSI adapter > properties
Add an iSCSI server address. Enter the IP of the iSCSI dynamic target 10.10.3.10
Go and hit finis. If youre not prompted to rescan, just right click and rescan. You should see the Microsoft
iSCSI disk appear below.
4
0
Now, go to storage > add storage to add and create VMFS volume.
4
1
Chapter:
And again go to the ESXi console press F2 and check the box of the newly connected network card
4
2
But you get the point. The vSwitch properties has to have all nics as Active. The individual services like iSCSI
traffic or management network shall have their NICs crossed if I can say that. Whats active for
management network is unused for iSCSI (thats hard requirement).
For the other services FT, vMotion, management network this can be set as this:
You can have for example FT network on one NIC as active and the other NICs as standby. Or vice versa.
The only difference is how are handled the iSCSI traffic to the shared storeate. Its one at a time. NO
standby adapters here. You can create a second iSCSi vmkernel adapter and use it for the second path to
the shared datastore, but no other NICs can be as standby for it.
Then click on the properties > and Management Network > Edit > NIC Teaming TAB. Check the override
4
3
Bonus Chapter - How to run Microsoft Hyper-V with nested VMs inside of
VMware Workstation
As you probably know, it's possible to virtualize ESXi 4/5 within VMware Workstation and run 3 levels deep
"inception" infrastructure. And now you can also test other hypervisors... Like Hyper-V.. -:). And run VM in
VM....
You have to modify the settings in the Hyper-V VM, in order to create and install a VM inside of Hyper-V.
VM > Settings > Processors - check the "Virtualize Intel VT-x/EPT or AMD-V/RVI" .
The Author:
Vladan is Independent Consultant and blogger. He runs his website at www.vladan.fr , which at first started
as a simple bookmarking site, but very fast found itself many readers and supporters. The website is
updated daily so you can always be sure to read the latest news and how-tos articles and tips.
Vladan is a VCAP-DCA, VCAP-DCD, VCP ,vExpert. Read more about Vladan here: www.vladan.fr/about
www.vladan.fr/twitter - @vladan
www.vladan.fr/feed - stay tuned via RSS
www.vladan.fr/subscribe- weekly E-mail with latest news.
www.vladan.fr/linkedin - connect via Linked IN
Chapter: Bonus Chapter - How to run Microsoft Hyper-V with nested VMs inside of VMware Workstation
Choose your OS as Hyper-V when creating a new VM. It gets detected by itself when you attach the Hyper-V
iso..
4
4