Académique Documents
Professionnel Documents
Culture Documents
You can see an XP virtual machine being protected by Fault Tolerance. This VM is running inside of a
virtualized (nested) ESXi 5.1 host. Youll be able to test vMotion and High Availability as well. Those are the
enterprise class features of VMware vSphere.
As a second youll need VMware Workstation 8 software. If youre not vExpert or VCP (those people get
this software usually Free of charge) you can download free trial or buy it from VMware Website here.
Believe me, you wont regret of this investment. The latest Workstation 8 has completely changed the way
of working, since the new features permits to use sharing of VMs across your LAN, direct connection to
ESX/ESXi hosts and many more. You can have a look at my article on the latest new features of VMware
Workstation here - VMware Workstation 9 has been released.
30 Days Trial Vmware Workstation 9 . You might be interested in Academic discounts.
VMware Workstation 9 Academic For Faculty Staff, Students and Teachers. Or you might want to check
out my website where regularly I post the Discount Codes on Workstation and Fusion (MAC). You can find it
at www.vladan.fr/coupons or a full category with latest blog posts www.vladan.fr/category/promo .
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 5. Features like vMotion, High Availability (which permits automatic restart
Youll need to download the latest vSphere 5.1 ISOs and also youll need Microsofts 2008R2SP1 ISO. Some
client OS as well, XP or Win 7..
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.
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.
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
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.
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 2008R2SP1. I downloaded the iso of Win 2008R2 with the
SP1 already slipstreamed in it.
Choose to install the OS later, since well need to personalize the virtual hardware of this VM first.
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 2008R2 x64.
On the next screen navigate to the Windows ISO image which you have downloaded from Microsofts
website.
Choose one CPU, you can change that later when working with linked clones.
Concerning the network, choose not to connect for now, since well be able to choose the network
Afterwards when well be working with linked clones.
The same for memory. I accepted the default value. If you get a warning, just click cancel.
Default accepted..
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.
iSCSI is the default value. Its also the more performant, since IDE was usually used for older systems, like
WinXP
The disk file name has the name of the VM by default. No reason to change that. The default location is in
1
0
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.
Before you power ON the VM, dont forget to go and verify that the ISO image of the Windows 2008R2SP1
is connected to the VM otherwise the installation process wont start. (youll see that the VM will try to
boot from network..
1
1
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 2008 default installation screen.
You can go ahead and choose a language, keyboard language and Time and currency format.
Click on the Install Now button and choose the Windows Server 2008 R2 Standard (full installation). If you
choose the Datacenter or Enterprise, it will work. You might have more features present in your VM, but
the image might be larger than the Standard version. And our goal is to design this solution to run it on
modest SSD drive which is often only with like 40 Gigs of space
1
2
Here you go have a coffee now, because it will take some time to decompress and install the system.
1
3
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
Note: You can launch the VMware tools installation process from the menu
1
4
Take the Typical option and reboot the VM after the VMware tools complete.
The installation of VMware Tools is necessary step since it will install all the necessary drivers for your VM
(Display, network, hard drive. Etc.)
1
5
You can disconnect the ISO of Windows Server 2008R2 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 only the sub component .NET Framework 3.5.1, since if you choose the whole feature youll get
prompted to install IIS. Well, we dont really need IIS and remember, we saving as much space as possible
And then we can proceed with adding .NET component which well be using later..
1
6
If we dont install the latest updates from Microsoft, we can keep the base image with about 7 Gigs of size.
1
7
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
8
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.
To make this template a real Template you need to check in the VM properties the Enable Template
Mode
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.
Name the template to fit your needs. You can put the date of creation and your own comments if you need
to
1
9
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.
2
0
2
1
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.
Add DHCP role and create and activate a scope, so your VMs can get an IP address on tha internal isolated
network. The DHCP will stay active only on the VMNET2 network.
2
2
The AD config is straightforward. Im not commenting much those steps since you certainly done that
thousand times. -
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.
2
3
2
4
Look at the size of the size of the linked-clone VM.. - 746Mb 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 -.
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.
So lets go ahead and lets get started with the installation. When choosing the new VM, select the
Hardware 8 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.
2
5
Then run the ESXi 5 installer. Youll be presented with screenshots like this one.
2
6
After the reboot, hit F2 and log into the console. Youll see screen like this.
The installation is fast. In few minuts youll have the confirmation screenHit Enter to reboot.
2
7
2
8
As I said, the installation and configuration of ESXi host is really fast -. Now, you can do the second one.
ESXi5-02. 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
Update: you can also use the vCenter Server 5.1 linux appliance for your vCenter (easy setup - faster deployment). Im
including the setup at the end of this book as a special chapter.
Note: You have another option for the Windows VMs. There is still the possibility to build the vCenter VM on
a Windows 2003 x64 VM which consumes less resources..
We will use this VM not only for vCenter services but this VM will also assure other services that we will
need, like:
-
vCenter SQL express database service (we could also deploy SQL server, but it means another VM
which needs storage and memory to run). Since well only run 2 ESXi hosts, and few VMs.
The vCenter VM will run several services. We must grant more memory to this VM. I think that 2 gigs will be
good to start with as the bare minimum, but well see if its enough or not.
2
9
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
3
0
You can now start the installation process of vCenter. The vCenter installation will install a SQL express
2008 as a database. As I outlined before, a small installations can use the SQL express Database server from
Microsoft. The database is limited to 4 gigs of data and so VMware recommends using this DB with
maximum of 5 physical hosts. This is sufficient for our small lab and for many SMB installations too.
VMware vSphere Essentials and Essentials Plus kits they provide special licensing for vCenter. Its the
vCenter Edition oriented for SMBs and its also called vCenter Server Essentials which can manage up to 3
physical hosts.
Start the autorun.exe if it does not start automatically and choose the vCenter from the menu
3
1
3
2
3
3
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.
Do the same for the second host You should ping both hosts by FQDN as well, not only by IP address.
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 with free edition of Starwind iSCSI SAN. You can download it
from Starwindsoftware.com: http://www.starwindsoftware.com/starwind-free
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.
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.
3
5
Right click the vCenter VM, you go to the settings > add new hard drive. Choose 10 gigs, but this time
choose allocate the disk space now. We might be able to get better performance with thick disk.
Start the VM. The newly added disk must be initialized and formatted in the storage snap-in.
3
6
Thats it concerning the volume. Now well need to add another NIC card to the vCenter VM. This vNIC will
be used for the storage network.
Configure this network card with this IP address: 10.10.3.1/24 (mask: 255.255.255.0)
Connect to your host via your IP address or via FQDN. And install the free license which you got when you
downloaded the product.
3
7
3
8
3
9
take the entire place that the VM will require multiplied by 2, since when VM is protected by FT, there are
actually 2 VMs running.
One principal and one secondary VM following the principal one with the vLockstep technology But I think
you can find plenty of information about FT all around the Internet. I have also done a blog post about it if
you want to look here:
http://www.vladan.fr/troubleshooting-fault-tolerance-in-vsphere/
http://www.vladan.fr/fault-tolerance-vmware-and-marathontechnologies/
4
0
Start both vESXi 5 servers now (if not already running), open your vSphere client and connect to vCenter.
Go to the storage adapters and Add software iSCSI adapter (in vSphere 5 its not present by default).
Now, right click the iSCSI software adapter and choose properties. Add an iSCSI server address.
4
1
Select the radio button and check both checkboxes to Add 2 NICs at the same time when creating new
vSwitch with the iSCSI vmkernel port group.
Configure the IP address as this (dont change the VMkernel default gateway):
4
2
Then, do the same (the other way around) for the iSCSI2. You should end up with the ISCSI2 being setup as
on the image below.
Now, click on the vSwitch properties and double click iSCSI1 port group and configure the NICs as on the
image below.
4
3
Go to the configuration > iSCSI > Add > and choose one NIC card present in the list.
Then, one after another add both NICs vmnic2 and vmnic3
4
4
Like this both vNICs are binded to the VMkernel port group. Validate, and rescan. Next youll have to check
if the firewall ports are opened for the iSCSI connection. Go to Configuration > Security profile > Properties
4
5
Then, rescan the iSCSI adapter. You should see the paths to the iSCSI target like this one
Now, go to storage > add storage to add and create VMFS volume.
4
6
4
7
4
8
Now, you should see this as a network configuration. Go ahead and click properties.
Do the same for vMotion VMkernel portgroup, but in the NIC teaming tab move the VMNiC0 as standby
this time.
Next, lets create a FT network. Create a new vSphere Standard switch and Add vmnic4 as physical NIC.
Then click on the properties > and Management Network > Edit > NIC Teaming TAB. Check the override
switch failover order and move VMNic1 as Standby.
4
9
Again, assign an IP address to the VMkernel iP stack here. Since Im configuring the ESXi-02.lab.local host, I
put 10.10.4.1 as an IP address.
replay.allowBTOnly = true
replay.allowFT = true
replay.supported = true
Now, to be able to use Fault Tolerance in this Nested and totally unsupported environment, well have
to set some advanced configuration parameters. You will have to do it at the VM level. It means that if
you have created an XP VM then youll have to go to the advanced settings and add row and add those
values.
5
0
One last step is to add VM network. A separate network VM where we can put our VMs.
5
1
This ends up our setup of nested ESXi 5 hypervisor inside of VMware Workstation.
A bonus chapter(s) ?
Installation of VMware vCenter Server Linux Appliance
Note that if you use this option (and not using the classic vCenter on Windows VM) youll need another VM
which will serve you a shared Storage. You can follow my guide then for Openfiler or Freenas setup with
ESXi hosts:
How-to configure Openfiler iSCSI Storage for use with VMware ESX (even if based on ESX, the
principle stays valid).
How-to configure Freenas 8 for iSCSI and connect to ESX(i)
VMware vCenter Server Linux appliance (vCSA) is a Suse Linux Enterprise Server pre-packaged
virtual appliance, which enables you to setup very easily vCenter server for up to 5 physical hosts.
Whats the principal limitations of vCSA 5.1 right now? Features that arent currently supported:
o
o
o
o
o
Linked mode
SQL Server as an external database
Max of 5 ESXi hosts / 50 VMs supported on the embedded DB.
Security Support Provider Interface (SSPI)
VMware Update Manager cant be installed in the vCSA, but you can install it in an additional
Windows-based VM or physical server.
The vCSA comes up automatically prepackaged and deploys very fast, with those components:
5
2
The deployment of this Linux based vCSA is pretty easy. No need to be Linux guru, but just following this
small how-to you should be able to achieve the installation. Youll need the login/password information:
root as a login and VMware as a default password. Otherwise the product can be downloaded as a single
file with OVA extension OR, multiple file with OVF plus VMDK virtual disk files. As usually, you would
probably want to use the provided download link via a download manager, which works through Java
based console, but optimizes the download speed and can resume broken transfers.
Before starting the installation, make sure that you put yourself to the VMNet2 network to receive the
DHCP address from the DC we have setup in previous chapters. Otherwise youll get another address from
your physical network (probably is the router who distributes DHCP leases on your home network,
right?).
Chapter:
Keeps the installation rolling and you should see this blue screen with instructions.
5
3
Open your web browser and point the Use the Set Custom configuration radio button.
Pass the next screen and you should see a page like this, where you can fill in you AD credentials.
Chapter:
If youre running into a problem with the AD configuration, dont worry. You can always do it later
5
4
I installed Win Server 2008 Standard and added the Hyper-V role.
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" .
Chapter: How to run Microsoft Hyper-V with nested VMs inside of VMware Workstation 9.
In the image below you can see that I'm running Hyper-V and inside I'm running W7 system. How it's
done...?
5
5
And also by modifying the VMX configuration file of the Hyper-V VM by adding this line:
Chapter: How to run Microsoft Hyper-V with nested VMs inside of VMware Workstation 9.
hypervisor.cpuid.v0 = "FALSE"
5
6