You are on page 1of 20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

JoinSimpleTalk

Signin
Search...

VMwareLabsetupAvirtualizedlabfor
testingHAandDRS
12April2011
bySeanDuffy

VMWareVSphereisavirtualisationtechnologythatisbestlearnedby
settingup,onasinglePC,aVSphereclusterasavirtualisationlab.Once
youhaveit,itwillthenbeausefultoolinmanyways.Thisdoesn'tneedto
beanexpensiveexercise,butcanbedauntingifyoudon'thaveasimple
guidetotalkyouthroughtheprocess.Here,Seanprovidesthatsimple
guide

Mware vSphere offers some extremely powerful virtualization technology for


businesses and enterprises to use. If you are still new to the technology or even
virtualizationingeneralandarelookingtogetalabortestingenvironmentsetupto
try it out, the task can be quite daunting. Sure, you could go ahead and install one of
VMwareshypervisorsonasingleserverandthrowafewVirtualMachines(VMs)onthis,
storingthemonlocalstoragetogetstarted,butthiswayyoudontgettoseethereally
coolfeaturesvSpherehastooffer.ThesefeaturesaresuchthingsasHighAvailabilityfor
yourVirtualMachines,DistributedResourceSchedulingtomanageresources,andthe
potentialenergyefficiencygainsthatbecomeapparentonceyoustartrunningmultiple
VMs on a handful of hosts are just a few great features a fully configured vSphere
vCenterenvironmentcanoffer
TosetupavSpherecluster,thebareessentialsyouwillneedare:
atleasttwohostservers(hypervisors),
sharedstorage,
aWindowsdomainand
avCenterservertolinkeverythingtogether.
Thiswouldnormallybequiteabitofphysicalhardwaretosourceforatestlabordemo
howeveritispossibletocreateallofthisinanested(RunningVirtualMachinesinside
ofotherVirtualmachines)virtualizedset,allrunningontopofanormalWindowshost
PC.
Inthisarticle,wellgothroughsettingupaVMwarelabenvironment,allhostedandrun
offonePC.Asthisisalabenvironment,youshouldnotethatthiswillinnowaybetuned
forperformance.Toevenbegintuningthisforperformance,youwouldneeddedicated
hypervisors,sharedstorage(FibreChanneloriSCSISAN)andnetworkingequipment
asyouwoulduseinaproductionenvironment.
Oncewehaveourlabenvironmentsetup,youllbeabletocreateVMs,usevMotionto
migratethemacrossyourHostserverswithzerodowntime,aswellastestVMwareHA
(HighAvailability)andDRS(DistributedResourceScheduler)twoofthegreatfeatures
Imentionedaboveasbeingsomeoftheproductsstrongestsellingpoints.

Prerequisites
Thisisalistofwhatweneed(andwhatwewillbecreatingintermsofVMs)tosatisfyour
requirementsforafullyfunctionallabenvironment.
ThePhysicalHostPC:
At least a dual core processor with either AMDV or Intel VT
virtualizationtechnologysupport.
8GBRAMminimumpreferably10to12GB.
VMwareWorkstation7.x.
https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

1/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

VMwareWorkstation7.x.

A64bitoperatingsystemthatsupportsVMwareWorkstation(suchas
Windows7forexample).
EnoughharddiskspacetohostallofourVMs(Iwouldestimatethisat
around100GB).
TheVMswewillcreateandruninVMwareWorkstationonthePhysicalHostPC:
ESXiVM#1(Hypervisor)
ESXiVM#2(Hypervisor)
WindowsServer2003or2008DomainController
WindowsServer2003x64,2008x64,or2008R2x64vCenterserver
SharedStorageVM(Iusetheexcellent,opensourceFreeNAS)
Asyoucansee,wedoneedafairlybeefyhostPCasthiswillberunningeverythingin
ourlab!ThemainrequirementhereisthattheCPUsupportsthenecessaryvirtualization
featuresandthemachinehasalotofRAM.ForVMwareWorkstation,youcouldusea30
daytrialversion,butalicenseisnotveryexpensiveandisveryusefultohaveforother
projects.AfreealternativemaybetouseVMwareServer2.0,althoughIhavenottested
thismyself.
OurfirsttwoVMsthatwewillcreatewillhaveVMwareESXi4.1installedonthem.You
canregisterforanddownloada60daytrialofESXifromVMwareswebsite.Thenext
machineweneedtocreatewillbeourWindowsServer2003or2008DomainController,
withActiveDirectoryandDNSServerrolesinstalledonit.Thirdly,weneedaVMtorun
VMwarevCenterServer.Thisistheserverthatprovidesunifiedmanagementforallthe
hostserversandVMsinourenvironment.Italsoallowsustoviewperformancemetrics
for all managed objects, and allows us to automate our environment with features like
DRSandHA.Lastly,wewillneedsharedstoragethatbothofourESXihostscansee.In
this lab environment we can use something simple like FreeNAS or OpenFiler two
opensource solutions that allow us to create and share NFS or iSCSI storage. In this
articlewewilloptforFreeNASandwillbeusingthistoprovideNFSstoragetoourtwo
ESXihosts.
For networking, I will be using VMware Workstations option to Bridge each VMs
networkadaptertothephysicalnetwork(i.e.thenetworkyourphysicalhostPCisusing).
Therefore all vSphere host, management and storage networking will be on the same
physical network. Note that this is definitely not recommended in a production
environmentforbothperformanceandreliabilityreasons,butasthisisjustalabsetup,
sothiswontbeaproblemforus.

Installation
StartoffbyinstallingVMwareWorkstationonyourhostPC.Oncethisisrunning,usethe
NewVirtualMachinewizardtocreatethefollowingVMs.
WindowsServerDomainController.IusedanexistingDomainControllerVMI
alreadyhad.Ifyoudontalreadyhaveonetouseforyourlabenvironment,create
anewWindowServer2003or2008VM,putitonthesamenetworkasyourhost
PC(allyourVMswillbeonthisnetwork)andinstalltheDomainControllerrole
usingdcpromo.YouwillalsoneedsomethingtomanageDNS,somakesureyou
alsoinstalltheDNSserverrole.SpecificationsfortheVMcanbeasfollows:
WindowsServer2003version
1vCPU
192MBRAM
8GBHarddrive
GuestoperatingsystemWindowsServer2003(choose32or64bit
dependingonyourOS)
WindowsServer2008version
1vCPU
1GBRAM
12GBHarddrive
GuestoperatingsystemWindowsServer2008(choose32or64bit
dependingonyourOS)
https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

2/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Tokeepthislabniceandsimple,yourdomaincontrollershouldexistonthe
samenetworkasallofyourotherVMs.Therefore,assignitastaticIPaddress
onyourlocalphysicalnetwork.Mylabnetworkissharingthelocalphysical
networkathomewithmyotherPCsandequipment.(IsimplybridgeallVMsto
thephysicalnetworkinVMwareWorkstation).ThereforeIsetmyDCupwith
anIPaddressof192.168.0.200,asubnetmaskof255.255.255.0andpointed
thedefaultgatewaytomyrouter.DNSishandledbythesameserverwithits
DNSroleinstalled,sothisissetatlocalhost(127.0.0.1)oncetheDNSroleis
installed

FigureIPsettingsfortheDomainController

Whenrunningdcpromo,youcanchoosemostofthedefaultoptionstosetup
asimplelabdomaincontroller.HereisaguideIdidawhilebackoncreating
asetofDomainControllersforuseaslabDCs.Notethatyouonlyreallyneed
one DC here as we are not going for high availability, so follow the steps
throughtocreateaprimaryDC.FormylabIusedthefollowingbasicsettings:
Server/hostnameofVMyourchoice
DomaininaNewForest
FullDNSnamefornewdomain:noobs.local
DomainNetBIOSname:NOOBS
Install and configure the DNS server on this computer, and set this
computertousetheDNSserverasitspreferredDNSserver.
AftersettingupyourDC,openupDNSManagementandgetyourtwoA(Host
name) records created for your future ESXi hosts. Use these FQDN
hostnameswhenyouconfigureyourESXihostDNSnameslateronusingthe
ESXiconsolenetworkingconfiguration.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

3/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Figure2:CreatingArecordsforourtwoESXihostsontheDNSServer.

2xESXi4.1Hosts.Thesehostswillbeourworkhorsestheywillbemanaged
by vCenter Server and will be the hypervisors that run our nested Virtual
Machines.HAandDRSwilllookafterthesetwohosts,managinghighavailability
ofVirtualMachinesifoneweretofailanddistributingresourcesbetweenthetwo
based on their individual workloads. Note that the minimum amount of RAM
requiredforESXiis2GB,buttheHAagentthatneedstoinstalloneachhostwill
be likely to fail to initialize if we dont have at least 2.5 GB RAM per host. In a
productionenvironment,thesehostswouldbephysicalrackmountedserversor
blade servers. Create two of these VMs using the new custom VM wizard and
giveeachESXiHostthefollowingspecifications:
1vCPU
2560 MB RAM (More if you can, as each VM that the host runs
requiresRAMfromtheESXispoolofRAM)
40GBHarddrive(Thinprovisioned)
Networkingusebridgednetworking
1xextravNIC(Networkadapter).
GuestoperatingsystemVMwareESX
DontforgettoaddtheadditionalNICusingBridgedmodethisissothatwe
can simulate management network redundancy (and therefore not get an
annoyingwarninginvCenteraboutnothavingthisinplace).Itwontbetrue
redundancy, but will at least keep vCenter happy. Before completing the
wizard,choosetheCustomizeHardwarebuttontoaddthisextraNIC.Here
is a screenshot of what your VM settings should look like, followed by a
screenshotshowingthesecondNICbeingadded.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

4/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Figure3:SettingssummaryforyourESXiVMs

Figure4:AddinganextraNICtoeachESXihostVM.

For the installation ISO, download the 60 day trial of ESXi from VMwares
websiteinISOformat..YoullneedtoregisteranewaccountwithVMwareif
youdontalreadyhaveone.YoumayalsoreceiveafreeproductkeyforESXi
whensettingupourESXihosts,dontusethis,aswewanttokeepthefull
functionality that the trial version gives us, leaving it in 60 day trial mode.
SpecifytheinstallationISOintheCD/DVDDrivepropertiesontheESXihost
VMorwhenthenewVMwizardasksforaninstallationdisc.
Power up the host VM, and follow the prompts of the ESXi installer. Whilst
therearesomebestpractisesyoucanfollowandspecificstepsyoucantake
when installing hosts in a production environment, for the purposes of
buildingourlabenvironmentwecanjustleavealloptionsattheirdefaults.So
step through the installation wizard choosing all the defaults. After this is
done,followingareboot,youshouldbegreetedbythefamiliaryellowESXi
consolescreen.Yourdefaultpasswordisblank(i.e.,empty)fortheuserroot.
PressF2andlogintotheconfigurationpagewiththesecredentials.
First things first, lets change the root password from the default blank, to
something else (Configure Password). After this, navigate to the Configure
ManagementNetworkoption,andthenchooseIPConfiguration.Yourhost
should be bridged on to your physical network and would have probably
picked up an IP from your local DHCP server. Change this to a static IP
addressonyourlocalnetwork,andspecifyyourdefaultgateway.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

5/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Figure5:SettingastaticIPaddressforESXionyournetwork.

Now,gotoDNSConfigurationandensureyourDNSserver(s)arespecified.
ChangeyourhostnametothesamenamethatyoucreatedArecordsforon
yourWindowsServerDNS(ensuretheIPyouchoseforyourhostisthesame
as specified for your A record too). Press Enter, then ESC and when
prompted,choosetorestartthemanagementnetworktoapplychanges.
Followthesameprocedureaboveforyoursecondhost,choosingadifferent
static IP and hostname on the same network this time, but keeping all the
other options the same. Remember the FQDN host name records for each
ESXihostwecreatedinDNSManagementonourDNSserverearlier?Well,
wellnowtestbothoftheseArecordsbypingingthehostnamesofourESXi
servers from your Windows Server Domain Controller to ensure they both
resolvetotheirrespectiveIPaddresses.Rememberthatwearekeepingallof
our VMs on the same local subnet. In my lab, I used IP addresses of
192.168.0.x with a subnet mask of 255.255.255.0 for all my VMs. Therefore
my ESXi FQDN host names in DNS resolved to 192.168.0.80 and
192.168.0.81.
FreeNASVM(sharedstorage).Nowwewillneedtosetupoursharedstorage
which both ESXi hosts need to have access to in order to use clustering
capabilitiessuchasHAandDRS.
You can follow this guide to download a preconfigured VM for VMware
WorkstationandgeteverythingyouneedforyourNFSsharessetup.Italsohasa
sectionneartheendthatdemonstratesaddingthesharedstoragetoeachESXi
host.WhenyoudownloadtheFreeNASVMasexplainedinthisguide,youlljust
need to use VMware Workstation to open the .vmx file that comes with the
downloadtogetgoing.
vCenterVM.ThisVMrequiresa64bitWindowsServer2003or2008/R2Guest
operating system. So get a VM setup with one of these, and add it to your
Windows domain. Once you are ready to begin, register for and download the
vSpherevCenterServersoftwarefromVMwareifinISOformat,justattachthis
to your VM, by going into your VMs settings in Workstation and connecting it.
Start the installer and again, we will be following through with all the default
optionsasthisisjustalabsetup.TobeginwithjustensureyouselecttheCreate
a standalone server instance for vCenter installation. You will get to the
DatabasesectioninthesetupsoonchoosethedefaultofaSQLServerExpress
instanceforthedatabase.ThisisfineforsmallerdeploymentsofESX/ESXihosts
andvCenter.LargerproductionenvironmentswouldusuallygoforaSQLServer
Standard or Enterprise or Oracle DB setup and specify a dedicated database
serveratthisstage.CompletethesetupandrestarttheVMafterwards.
1vCPU
2GBRAM
40GBHarddrive(Thinprovisioned)
GuestoperatingsystemchoosetheappropriateWindowsOShere.
IndividualESXihostconfigurations.NowweneedtoconfigureeachESXihost
usingthevSphereclientfromourhostPC.Weneedtogetthemtomatcheach
otheridenticallyintermsofsetupsothatHAandDRSworkwellbetweenthetwo
hostservers.Inaproductionenvironmentyoushouldbeusingafeaturecalled
Host profiles to establish a baseline host profile, and would then be able to
easily provision host servers off of that profile. (Feature available in vCenter
https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

6/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

easily provision host servers off of that profile. (Feature available in vCenter
Enterprise Plus only). However we only have two hosts to do here, so well
configurethemmanually.

OpenawebbrowseronyourlocalPC,andbrowsetotheIPaddressofoneof
your ESXi hosts using the prefix of https://. Youll get to a banner page, which
shouldofferyouadownloadofthevSphereclientforWindows.Downloadand
installthisonyourlocalhostPC.RunthevSphereclientandlogintoyourfirst
ESXihostusingtherootcredentialsyouconfiguredearlieracceptthesecurity
certificatewarningyougetwhenyouclickLogin.

Figure6:SpecifytheIPaddressoftheESXihostyouareconnectingtoand
login.

Once the management GUI appears, well be able to start configuring the
ESXi host, by adding our shared storage first. Navigate to the Storage
ConfigurationareaforyourhostandclicktheAddStorage...linknearthetop
rightoftheGUI.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

7/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Figure7:AddingstoragetoourfirstESXihost

AswehaveconfiguredanNFSshareforourstorage,wellchoosetheoption
forNetworkFileSystem.Onthenextpage,wellenterthedetailsaboutour
NFSsharewewanttoconnectto.

ClickNext,reviewthesummarypagetoensureyouarehappy,thenfinishthe
https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

8/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

ClickNext,reviewthesummarypagetoensureyouarehappy,thenfinishthe
wizard to complete adding your Shared Storage. Remember to keep the
DatastoreNamesthesameacrossallyourESXihostsforconsistency.Under
DatastoresinthevSphereclient,youshouldnowbeabletoseeyourshared
storage and the host server will now be able to use this to access and run
VMsfrom.

Figure8:datastore1referstotheESXi'slocalstorage.SharedDatastore1isour
sharedstoragewhichwe'llbeusing.

Next,welldothenetworkconfiguration.StartbyclickingNetworkingunder
the Configuration area in the vSphere client. Click on Properties for
vSwitch0andwellgetoursecondNICaddedandconfiguredforstandby
mode.AvSwitchinVMwareisavirtualswitchtrytothinkofitasalogical
switchasitisnotmuchdifferenttotherealthing!

Figure9:OpenthevSwitch0Propertiestostartconfiguringyourhost's
networking.

Click the Network Adapters tab then select the Add button. A page will
appear which should list your unclaimed virtual network adapter with the
name vmnic1. (vmnic0 is already being used as our active NIC). Tick this
adapter(vmnic1),andthenclickNext.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

9/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Figure10:Claimvmnic1tostartusingitforvSwitch0.

Onthenextpage,wellmovevmnic1downtoaStandbyadapter.Highlightit,
thenclicktheMovedownbuttonandfinishthewizard.

Figure11:Assignvmnic1asaStandbyadapter.

NowclickonthePortstabundervSwitch0PropertiesandclickAdd...We
arenowgoingtoaddaVMkernelportgroupwhichisgoingtoberesponsible
forourvMotionnetworktraffic(usedforVMwareHAandDRSinthisinstance).
VMkernel port groups are used to connect to NFS / iSCSI storage, or for
vMotion traffic between hosts when moving Virtual Machines around.
ConfigurethepageasperthescreenshotbelowgiveyourVMkernelporta
manualunusedIPaddressonyournetworkalongwithyoursubnetmask(i.e.
the same internal network being used for all your other VMs), keeping your
usualdefaultgatewayfortheVMkerneldefaultgateway.InmylabIamusing
myADSLrouterasthedefaultgatewayforallmynetworktraffic,soIusedthe
IP address of 192.168.0.1. Remember to tick the Use this port group for
vMotiontickboxaswellwanttobeabletousevMotioninourlab.Finishthe
wizard,whichtakesyoubacktothevSwitch0Propertieswindow.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

10/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Figure12:AddingaVMkernelportgroup.

AtthevSwitch0Propertieswindow,highlightyournewVMkernelportgroupin
thelistandthenclickEdit.Wellnowconfigureasecuritypolicyonthisport
group to Accept for Promiscuous mode. Click the Security tab and
configureasperthescreenshotbelow.ThiswillallowustousevMotioninour
nestedESXihostconfiguration.

Finally,clickOKandthenClosetocompleteournetworkingconfigurationfor
theESXihost.HereisasummaryofourvSwitch0VirtualSwitchconfiguration:

Another way of configuring your network adapters for vSwitch0, as Duncan Epping
recommendswouldbetosetbothadaptersasActiveonyourvSwitch0(providedyour
physicalswitchallowsyouto).Inourcaseitdoes,becausewearebridgingthenetwork
adapters to our physical network via our host physical PC network connection. (i.e.
VMware Workstation is essentially our physical switch). This configuration would then
enableustousebothNICsforthetypesoftrafficwehavedefinedonourvSwitchinstead
ofjustonehandlingactivetrafficandonesittinginstandbymode.Thisconfigurationstill
maintainsnetworkredundancyyoucantestthisbyrunningaVMononeofthehosts
withtwoadaptersinActivemode,settingtheguestoperatingsystemintheVMtopinga
locationinsideoroutsideyournetwork,thenremovingoneoftheactiveNICsfromyour
vSwitch0youshouldntseeanydroppedpackets.
TosetoneofyourStandbyNICsbacktoanActiveNIC,configureyourvSwitch0asper
thisscreenshot,usingtheNICTeamingtab:

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

11/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

SettingupvCenterandourCluster
OurfinalstageofconfigurationwillnowtakeplaceinvCenter,usingourvSphereClient
from our local host PC. Before we begin though, lets setup our PCs hosts file to add
someArecordsforourESXihostsandvCenterserver.TheseArecordsareforthe
vSphereclientyoullberunningonyourphysicalhosttocorrectlyidentifytheactualESXi
hostservers.Forexample,whenyouviewtheconsolesofyourVMsinvCenter,yourPC
needstoknowwhichhosttoopentheVMconsoleon,soitwillneedtomatchupeach
ESXihostservershostnamewithitscorrectIPaddress.Openthehostsfilelocatedin
C:\Windows\System32\drivers\etc\hosts with Notepad and edit it to point the FQDNs of
each ESXi host to their correct IP addresses. Below is an example of the hosts file
configurationonmyWindows7PCwhichisrunningtheentirelab.NotethatIaddeda
simpleentryformyvCenterservertoo(noobsvc01)sothatIcanconnecttothisname
usingthevSphereclientinsteadoftheIPofmyvCenterserver.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

12/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

EnsurethatallyourlabVMsarepoweredupi.e.DC,FreeNAS,twoESXihostsand
vCenter(inthatordertoo).UseyourvSphereClienttoconnecttoyourvCenterserverby
IPorhostname.Youcanuseyourdomainadministratoraccounttologinwith,although
best practise is of course to create normal domain users in Active Directory to use for
vCenter administration. Accept the message stating you have 60 days left of your trial,
and you should land on a welcome / summary area of the GUI when the log in is
complete.
Before we can add any objects to the vCenter Server inventory, we need to create a
datacenterobject.Thisisforallintentsandpurposes,acontainerobject,andcanoften
be thought of as the root of your vCenter environment. The items visible within the
datacenterobjectwilldependonwhichInventoryviewyouhaveselectedinthevSphere
client.Forexample,HostsandClusterswillshowyourClusterobjects,ESX/ESXihosts
andVMsunderthedatacenterobject.ClickonCreateadatacenterunderBasicTasks
todefineyourselfadatacenterobjectandcallitanythingyoulike.InamedmineLab
datacenter..
Nextup,wellwanttocreateaclusterobjectforourESXihoststobeapartof.Aclusteris
a group of hosts (ESX or ESXi host servers) that are used for collective resource
management.WellusethisclustertosetupDRSandHAforourhostsasthesefeatures
canonlybeenabledonclusters.Rightclickonyourdatacenterobjectandchoosethe
optionforNewCluster.

Figure13:DefineaNewClusterunderyourDatacenterobject.

Nowwecangiveourclusteraname.IchoseLabcluster1.ChecktheboxesforTurning
onVMwareHAandDRSforthiscluster,andthenclickNext.

Figure14:EnableHA&DRSforyourcluster.

YoucannowchooseyourDRSAutomationlevel.Theclustersettingsarequiteeasyto

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

13/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

YoucannowchooseyourDRSAutomationlevel.Theclustersettingsarequiteeasyto
returntoandchangeatalaterstageifyouwouldliketoexperimentwiththem(kindof
whatthelabisallaboutreally!).Sochooseanautomationlevelyouwouldlikeforyour
VMs.ThedefaultisFullyAutomated,whichmeansDRSwillmakeallthedecisionsfor
you when it comes to managing your host resources and deciding which VM runs on
whichhostserver.

Figure15:DRSAutomationlevelsettings.

The next option page in the New Cluster wizard is for DPM (Distributed Power
Management).Wewontbecoveringthisfeatureinourlab,sojustleaveitoff,asitisby
default.
WellnowsetupVMwareHAforourclusteronthenextpage.Hostmonitoringessentially
monitorsforhostfailures(physical,network,etc.)andwhenafailureoccurs,monitoring
allowsHAtorestartallofthedownedESXorESXihostsVMsonanotherhostserver.
Leavethisenabled.(Inaproductionenvironment,youshoulddisablethisoptionwhen
performing network maintenance as connectivity issues could trigger a host isolation
responsewhichcouldpotentiallyresultinVMsbeingrestartedfornoreasonatall!)Well
leavetheAdmissionControlsettingsattheirdefaults.Thenextpageallowsyoutoset
somedefaultclustersettings.Leavetheseattheirdefaultstoo.Onthenextpagewesee
some options for VM Monitoring leave this disabled. Next up is EVC (Enhanced
vMotion Compatibility). This is a very useful feature for when you have a variety of
physical hosts with slightly different CPU architectures it allows for vMotion to be
compatible with all hosts in your cluster by establishing a kind of baseline for CPU
featuresets.Inourcase,wearerunningvirtualizedESXihoststhereforetheirvirtual
CPUswillallbeofthesametypeastheyareallrunningfromonephysicalhostmachine,
therefore allowing us to keep this feature disabled. Keep the recommended option for
storingtheVMswapfilewiththeVirtualMachineonthenextoptionspage,andthenfinish
thewizard.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

14/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Figure16:VMwareHAoptionstoconfigureforthecluster.

RememberthosetwoESXihostserversweconfiguredearlier?Wellourclusterisnow
readytohavethoseserversaddedtoit.Rightclickthenewclusterandchoosetheoption
toAddHost.EnterthedetailsofyourfirstESXihost,includingtherootusernameand
passwordyouconfiguredforthehsotearlier.YoullgetaSecurityAlertmessageabout
thecertificatebeinguntrustedjustclickYestoacceptthis,itwontbugyouagain.Run
throughtheAddHostWizard,leavingallthedefaultoptionsselected,andoptingforthe
Evaluation mode license. Your summary page should look similar to the screenshot
below.Finishoffthewizard,andvCenterwilladdyourhosttotheclusterandconfigure
thevCenterandHAagentsonthehostforyou.Repeatthisprocessforyoursecondhost
serveraswell.

Figure17:AddyourESXihoststotheclusterbyhostname(theFQDN).Thisisalsoagood
testthatyourDNSissetupcorrectly.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

15/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Figure18:vCenterconfiguringvariousagentsonthehostonceaddedtothecluster.

ClosingoffandSummary
You should now have everything you need for your vSphere lab. You have two ESXi
hostsinacluster,withHighAvailabilityandDRS,linkedtosharedstorage.Everything
shouldbereadytorunafewVMsnowandtotestvMotion/HA/DRS.Hereishowmy
lablooksinthevSphereclientaftercompletingthesetup.

SohereisthefunpartgetafewVMsupandrunningonyourcluster.Rightclickonone
ofyourhostsandselectNewVirtualMachine,usethewizardtocreateafewVMswith
differentoperatingsystems.IcreatedanotherFreeNASVMusingmyISOIhadalready
downloadedjusttoplayaroundwith.IfyoustartituponyourfirstESXihost,thenwhileit
isrunning,openaconsole(rightclick>openconsoleontheVM),andthentrymigrating
it between ESXi hosts. You can accomplish this by rightclicking the VM, selecting
Migrate then completing the migration wizard, by choosing your second host as the
targettomigrateto.

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

16/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

Upon completing the wizard, your VM will live migrate (using vMotion) to your second
hostallthewhilecontinuingtostaypoweredupandrunningwhateverserviceshasand
applicationsareactiveuponit.Asafuntest,whynotsetyourguestOperatingSystemin
yourtestVMtopingadeviceonyouroutsidenetworkforexamplearouterorswitch,or
another PC on your network. While it is pinging this device, get it to migrate between
hostsandseeifyougetanydroppedpackets.TheworstIhaveseenisaslightlyhigher
latencyononeoftheICMPresponses(andbearinmindthisisonalowperformancelab
setup!)
YounowhaveeverythingyouneedtotestoutsomeofthegreatfeaturesofvSphereand
vCenterServer,allhostedfromonephysicalPC/server!CreatesomemoreVMs,run
someservices/torturetestsintheguestoperatingsystemsandwatchhowDRShandles
your hosts and available resources. Do some reading and try out some of the other
featuresthatvSphereoffers.Youhave60daystorunyourvCentertrialsomakegood
use of it! If you ever need to try it out again after your trial expires, youll need a new
vCenter server and trial license just follow this guide again keeping everything in
VirtualMachinesmakessetupandprovisioningabreezeandyoucankeepyourentire
vSpherelabonjustonePC,laptoporserver.
Thankthisauthorbysharing:

Thisarticlehasbeenviewed148423times.

Authorprofile:SeanDuffy
AllroundITgeeklivinginthegreaterLondonarea.WorkingasanIT
Infrastructureengineerspecialisinginvirtualisation,hostingandsupport.
SeanenjoysallformsofIT,andwritesaboutthebitsthatintrigueand
entertainhimonhisShogan.Techblog.Whenhesnotlearningaboutthe
latestServerhardware,platformorsoftware,you'llprobablyfindhim
developingiPhoneappsinobjectiveC,gamingonline,oronadirtbikeridingenduroX.
YoushouldfollowSeanonTwitterhere(@Shogan85)
SearchforotherarticlesbySeanDuffy

Ratethisarticle:Avgrating:
Poor

OK

fromatotalof107votes.
Good

Great

Mustread

HaveYourSay
Doyouhaveanopiniononthisarticle?Thenaddyourcommentbelow:

Youmustbeloggedintoposttothisforum
Clickheretologin.
Subject:

GreatArticle..possiblemissingpiece

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

17/20

5/27/2016

Subject:
Postedby:
Postedon:
Message:

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

GreatArticle..possiblemissingpiece
kronos(viewprofile)
Wednesday,April13,2011at12:12PM
GreatArticle.NestedGuestVM'sonthevirtualESXi'smayruninto
problemsthough.ThereisatweakontheVirtualESXi'sthatyoucan
dotogetthemtoworkthough.
ShutdownthevirtualESXVM
ClickEditSettings
ClicktheOptionstab
ClickAdvanced/General/ConfigurationParameters
ClickAddRow
FortheName/Valueenter:monitor_control.restrict_backdoor/TRUE
Ref:
http://www.vcritical.com/2009/05/vmwareesx4canevenvirtualize
itself/

AcolleagueofmineandIhavesetupasimilarenvironmentforaVCP
Classroomenvironment.Wecreated30virtualpodsconsistingof:1
virtualvcenter,1virtualESX,1virtualESXi,1virtualShared
Storage(OpenFiler),2Windows2003nestedvirtualguests.
GreatArticle..:)
Subject:
Postedby:
Postedon:
Message:

NestedVMs
Shogan(viewprofile)
Wednesday,April13,2011at2:34PM
Hikronos,
ThanksforthecommentIwasawareofthesettingandhaveusedit
inthepastwhendoingnestedVMs,howeverwiththelatestversionof
ESXiIdon'tseemtogettheissuewithpoweringupVMsonthe
virtualizedESXiserversanymore.Myonlyguessisthattheyhave
changedsomethingonthelatestreleasesunlessIammissing
somethingelse!:)Thanksforpostingthisthough,ifanyonedoes
happentorunintothisproblem,orendsupusingolderreleasesof
ESXorESXiitisanessentialsettingtogetthingsgoing!
Cheers,
Sean

Subject:
Postedby:
Postedon:
Message:

IssuewhenusingHA
felixx4(viewprofile)
Friday,September30,2011at12:51PM
First,thanksforthegreatwriteup.Unfortunately,ihaveanissue
whenenablingHA.Forsomereason,ireceiveerrorsaboutthe
VSphereHAStatebeing"NetworkPartitioned".ImusingWorkstation
8tonestmyESXi5hostsandsetupmyenvironmentthesameas
whatwasdescribedinthisarticle.Anyideasastowhatmecausing
thisproblem?Thanksinadvance.

Subject:
Postedby:
Postedon:
Message:

IssuewhenusingHA
felixx4(viewprofile)
Friday,September30,2011at1:35PM
First,thanksforthegreatwriteup.Unfortunately,ihaveanissue
whenenablingHA.Forsomereason,ireceiveerrorsaboutthe
VSphereHAStatebeing"NetworkPartitioned".ImusingWorkstation
8tonestmyESXi5hostsandsetupmyenvironmentthesameas
whatwasdescribedinthisarticle.Anyideasastowhatmecausing
thisproblem?Thanksinadvance.

Subject:
Postedby:
Postedon:
Message:

HA
Shogan(viewprofile)
Thursday,October13,2011at2:03PM
Hifelix,
InterestingyouaregettingthatitwouldappeartomethatHAis
thinkingyourhostshavebeenisolatedornetworkseparated.Areboth
yourhostsreachableviatheirmanagementnetworks.Trygoingtothe

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

18/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

yourhostsreachableviatheirmanagementnetworks.Trygoingtothe
consoleofoneESXihost,pressF2,thengotoTestManagement
networkinthefirstIPaddresstotest/ping,enterthemanagement
IPoftheotherESXihost,thentestthatthispingsOKornot.Dothe
sametotheotherhostsfromtheotherESXihostsandgenerallyjust
checkthateverythingisreachableontheirmanagementIPs.Iwould
alsodoatestpingoftheESXihostsfromyourvCentermachine
usingtheirFQDNstoensureyoudon'thaveaDNSissueeither.Iam
onlyjuststartingtotestoutvSphere5.0now,soIambusyupdating
mylabtothis,butifIthinkofanythingelse,I'lladdithere.Letme
knowifyougetitsorted.
Sean

Subject:
Postedby:
Postedon:
Message:

VDIsolutiontothisVirtualLAB
gazzy(viewprofile)
Thursday,February16,2012at1:34AM
HiSean,
Thankyouforthisarticle,itwasveryuseful!
NowiwuoldliketoimplementaVDIsolutionwithVMwareView,
usingthisLABlikemydatacenter.Haveyousomeadvisorsforme?
Thankyou!
Saverio

Subject:
Postedby:
Postedon:
Message:

Amazingshare
rfuentesd(viewprofile)
Sunday,February26,2012at9:40PM
Thanksfortheinstructionsandreallyusefulscreenshots,thisisthe
besthowtomakeanestedlabguideifound.Imupandrunningnow.

Subject:
Postedby:
Postedon:
Message:

Wonderfularticle
RockyXQ(viewprofile)
Thursday,March1,2012at10:19AM
Ifolloweditwithoutanyissues.HereIsharedsomeofmy
experienceswhichmightbehelpfulforotherpeople.IknowtheRAM
generallyisabottleneckformostofthetester.Imanagedtosetitup
withleastramaspossibleHereismysetup(ionlylistthemost
importanthere):
OnephysicalPC:AsusK53SLaptopQuarterCore8GBRAM(one
cangetone4GBRAMchipsforlessthan30bucks)
VMWorkstation:8.0.2591240
Win2008ADServer:1vcpu,512MRAM
FreeNASVM:1vcpu,256MRAM
ESX5i01:2vcpu,2304MRAM
ESX5i02:2vcpu,2304MRAM
ESX5ivCenter:1vcpu,2048MRAM
AllthediskspaceuseasSean'sarticle.Afterallarerunning,Icreated
aWindowsXPVM,andtestVmotiontomovefromoneESXito
anotheroneItonlytookseveralseconds.Amazing!AndIalsouse
mylaptopfordailycomputing(e.g.outlook,wordprocess),ididnot
seemuchperformancelagwithalltheVMsrunning.Fromtask
manager,ialwaysseethememoryusageat6.75GB7.25GB,which
leftenoughformyotherapplications.
Inasummary,aslongasyouhaveareasonablelaptop,youshould
beabletoachievetheESXi+HAlabinnearlynocost(maybejust20
~30bucksforoneextramemroychip).

Subject:
Postedby:
Postedon:
Message:

Replies
Shogan(viewprofile)
Wednesday,May9,2012at3:47PM
Thanksforallthefeedback/questionsguys.
@Saverio,goodtohearandthanks!ForVMwareView,takealookat
vTexanhehassomegreatViewcontent

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

19/20

5/27/2016

VMwareLabsetupAvirtualizedlabfortestingHAandDRS

vTexanhehassomegreatViewcontent
http://www.vtexan.com/2011/11/03/howtoinstallconfigureand
deployvmwareview5onvsphere5/
@rfuentesdgladyouareupandrunning:)

@RoxkyXQ,wowthanksforallthefeedback.Iamgladyougotitall
runningwithonly8GBRAM.Welldone.Thesedaystherearesome
beefylaptopswhicharegreatforportableminilabenvironments.
VMwareWorkstationworkswondershere!
Sean
Subject:
Postedby:
Postedon:
Message:

'ConfigureHA'failingwhenattemptingtoaddsecondESXi
using4.1
caiphn(viewprofile)
Saturday,May26,2012at3:50PM
Hi
Noissuesrightuntiltheend.Doublecheckedtheclustersetuppart,
seemsprettystraightforward.WhenaddingmysecondESXiserver,it
getsto83%andsitsthereforabout5minutes,andthenIeventually
get'CannotcompletetheconfigurationoftheHAagentonthehost.
OtherHAconfigurationerror.'
Removedandreaddedtonoavail.Doesn'tappeartobeaDNS
issue,pingingthehostnameresolvestheproperIPaddress.I'mgoing
toremoveeverything(includingthecluster)andtrytoaddthesecond
ESXihostfirstandseeifthatmakesadifference.Iwelcomeand
commentsthatmightassistingettingthisworking!

Subject:
Postedby:
Postedon:
Message:

Update
caiphn(viewprofile)
Saturday,May26,2012at4:11PM
Yeah,sothe2ndESXiworked,butwhenaddingthe1stIgetthe
sameerror,I'mguessingtheydon'tmatchsomewhere.Igavethem
twodifferentVMKernelIPaddresses,shouldtheybethesame?That
makesabsolutelynosensetomebutI'mgraspingatstrawshere.

Subject:
Postedby:
Postedon:
Message:

iSCSIError
prateeksaurabh(viewprofile)
Monday,July29,2013at12:29AM
NowassoonasIconnectedmySSDdriveintomymotherboardand
bootedwithESXiitdetectedtheSSDdrive.ButwhenIaddedthis
drivetoFreenasandcarvedoutsharedstoragetoitnowthesame
DiskisnotbeenasSSD!!!?.SomeproblemwithFreeNAS?
NowoneinterestingthingInoticedwhenIamcreatinganewVMand
ifIstoreallconfigfileinFreeNASsharedstoragedriveandVMDK
fileinparentSSDdrivemywindows2008R2servergetsinstalledis
around4Minutes!!!!.HoweverifIsaveeverythinginFreeNASdrive
whichIhavetoifIhavetotestvmotionasthatisthedrivevisibleto
otherNestedESXithaninstallationstallsandIgeterroras
istgt_iscsi_write_pdu_internal:***ERROR***iscsi_write()failed
(errno=32)
istgt_iscsi_task_response:***ERROR***iscsi_write_pdu()failed

About
Sitemap
Becomeanauthor
Newsletters
Contactus
Help
Privacypolicy

Termsandconditions

20052016RedGateSoftwareLtd

https://www.simpletalk.com/sysadmin/virtualization/vmwarelabsetupavirtualizedlabfortestinghaanddrs/

20/20

You might also like