Vcap5 DCA Official Cert Guide
Vcap5 DCA Official Cert Guide
Vcap5 DCA Official Cert Guide
Steve Baca
John A. Davis
Special Sales
For information about buying this title in bulk quantities, or for special sales
opportunities (which may include electronic versions; custom cover designs; and
content particular to your business, training goals, marketing focus, or branding
interests), please contact our corporate sales department at corpsales@pearsoned.
com or (800) 382-3419.
For government sales inquiries, please contact governmentsales@pearsoned.com.
For questions about sales outside the U.S., please contact
international@pearsoned.com.
Contents at a Glance
Glossary 417
Index 424
About the Authors
Steven Baca, VCAP, VCI, VCP, and NCDA, has been in the computer industry for
more than 20 years. Originally a computer programmer and a system administrator
working on Unix and Windows systems, he migrated over to technical training and
wrote a course for Sun Microsystems. He eventually transitioned to VMware about
8 years ago, doing technical training and consulting as well as teaching for Netapp.
Currently he lives in Omaha, Nebraska, and does a number of engagements world-
wide. He thoroughly enjoys teaching and writing and believes that the constant
evolution of the computer industry requires continuously learning to stay ahead.
Steve can be found on Twitter @scbaca1.
John A. Davis is a VMware Certified Instructor (VCI) and VMware Certified
Professional (VCP). He has been teaching since 2004, when only a dozen or so VCIs
existed in the United States. Throughout his tenure, he has taught VMware courses
in many U.S. cities and abroad, including in Canada, Singapore, Japan, Australia,
and New Zealand. John is a Senior Consulting Engineer at New Age Technologies
and splits his time between teaching and consulting. He has most recently been
engaged in VMware vCloud, VMware View, and Site Recovery Manager
professional services. John has authored several white papers and also holds
certifications for VMware Certified Advanced Professional (VCAP) on VMware
vSphere (VCAP5-DCA, VCAP5-DCD), VMware View (VCAP5-DTD), and
VMware vCloud (VCAP5-CID). John is author of the vLoreBlog.com and can be
found on Twitter @johnnyadavis.
Dedications
Steves dedication
First and foremost, I would like to dedicate this book to my loving wife Sharyl. Your
patience and support has been instrumental during the writing of this book. Thank you
for believing in me and allowing me to have the time for my many endeavors. I would
also like to dedicate this book to my kids: Zachary, Brianna, Eileen, Susan, Keenan, and
Maura. I hope to now spend less time glued to a laptop and more time with all of you.
Johns dedication
She came to us in such a whirl,
This precious little angel girl.
A fragile life, doctors would say,
Yet perfect to us in every way.
She changed us all from the very start.
Touching each and every heart.
God loves us all, Ill always believe.
He sent his angel of proof to you and me.
Everything I see, Everything I do,
Madison Hope I think of you.
You now see us clearly, that I know,
For God has brought his angel home.
Steves Acknowledgments
There are so many people to acknowledge and thank for making this book possible.
I would like to start with my co-author John Davis, who kept us on track. I
cannot have had a better partner. Without your hard work and organization, this
book would not have been possible.
Thank you to the technical editors, Brett Guarino and Jon Hall, whose comments
and suggestions kept the details straight. I know you guys invested a lot of time on
your editing, and it really showed.
Thanks to Ellie Bru, Mandie Frank, and the rest of the team at Pearson Publishing,
who do a tremendous amount of work from the initial planning of the book to the
final printing.
Finally a special thanks to Joan Murray, who took a chance on a first-time writer. I
appreciate your patience and support.
Johns Acknowledgments
I would like to thank my wife Delores, who puts up with all my travels, my late-
night writing, and all my quirks. I would like to thank my dad Norm, who set an
example for me to tackle each challenge with the question Now, lets see, how can
I make this work?
Thank you to Tom Alves, who hired me and mentored me when I first began my
career at the Naval Ordnance Station Louisville in 1988.
Thank you to Charlie Hagerty (president) and Tony Fink (VP) at New Age
Technologies for giving me the opportunity to become a consulting engineer at
a great company and for encouraging and motivating me in my career develop-
ment. A big thanks also to Brian Perry, who mentored me on becoming a VMware
Certified Instructor. He sets the bar for VCI excellence.
I would like to thank my co-author Steve Baca for bringing me on to write this
book with him and our two technical editors, Brett Guarino and Jon Hall, who
helped us refine it. Thanks to Joan Murray for coordinating everything.
Finally, I would like to thank my granddaughter, Emma Rosebush, little sister and
best friend to Madison Hope. At three years old, she was instrumental in keeping
the family sane as we said goodbye to her sister and just weeks later welcomed her
baby brother, Jax. She keeps us all entertained and helps me rejuvenate after long
stretches on the road.
About the Reviewers
As the reader of this book, you are our most important critic and commentator. We
value your opinion and want to know what were doing right, what we could do bet-
ter, what areas youd like to see us publish in, and any other words of wisdom youre
willing to pass our way.
We welcome your comments. You can email or write us directly to let us know
what you did or didnt like about this bookas well as what we can do to make our
books better.
Please note that we cannot help you with technical problems related to the topic of this book.
When you write, please be sure to include this books title and author as well as
your name, email address, and phone number. We will carefully review your com-
ments and share them with the author and editors who worked on the book.
Email: VMwarePress@vmware.com
Mail: VMware Press
ATTN: Reader Feedback
800 East 96th Street
Indianapolis, IN 46240 USA
Reader Services
John and I both do technical training for VMware, and we have been working
with VMware for a number of years. We have spent countless hours learning how
vSphere works, and we believe that there is so much to still learn. Together we want
to share our knowledge with you.
Before you can take the VCAP5-DCA exam, you must first pass one of the follow-
ing exams: VCP5-DCV, VCP5-DT, VCP-Cloud, or VCAP4-DCA. So this book
does not cover basic vSphere concepts in detail. We recommend that you research
any topics mentioned in the exam blueprints guide that you do not fully under-
stand. You can find it on VMwares website, http://vmware.com/certification.
Unlike a lot of certification exams, the VCAP exam is a lab-based exam. I often say
that the best way to pass the VCAP exam is what I like to call stick time. Much
like an airplane pilot needs stick time in the air, you need stick time in a lab.
We recommend you create your own lab environment to practice the procedures
we discuss.
This guide is not a brain dump. It might cover specific tasks that are not on your
actual exam. It might not cover all the specific tasks that are on the actual exam
you take. We expect that once you fully understand all the material covered in this
guide to the point where you can quickly perform the associated administration
tasks without having to look at the book for guidance, then you should pass the
VCAP5-DCA exam.
xxiv VCAP-5 DCA Official Cert Guide
This book was written for candidates preparing for the VCAP5-DCA exam. The
chapters and the material are focused on accomplishing certification, although the
book can be read by VMware system administrators who want to learn more about
how vSphere works. Even if they do not plan on taking the exam, they can still
sharpen their skills.
The goal of this book is to assist you in passing the VCAP5-DCA certification
exam, which will allow you to obtain the status of VMware Certified Advanced
Professional 5Data Center Administration (VCAP5-DCA). To help you in this
endeavor, each chapter contains examples and scenarios that are based on real-
world experiences, where administration tasks that are covered by the exam might
need to be applied. Each chapter is organized with the following methods:
Do I Know This Already? quizAt the beginning of each chapter after the
exam objectives is a quiz that is meant to help you gauge your own knowledge
on the subject matter of the module. The answers to each chapters quiz can
be found at the back of the book in Appendix A. Although the actual certifica-
tion exam is not in a multiple-choice format, the questions are based on each
modules objectives and will serve as an indicator on how strongly you cur-
rently know the topics of the module.
Key TopicsThroughout the module you will find several key topics icons,
which will indicate important figures, tables, and lists of information you
should know for the exam.
Review TasksAt the end of each chapter is a list of tasks you should be able
to perform after reading the module. The steps for each of the tasks are lo-
cated within the chapter.
Introduction xxv
Throughout the book, we provide many terms, acronyms, and abbreviations that
are commonly used by VMware and the virtualization community. Each term is
identified on its first use. In some cases, the choice for the best term to use in the
book is challenging because VMware and the community use multiple terms to
refer to a specific item. For example, a standard virtual switch can be referenced as
a standard vSwitch or a vSS. Dont be alarmed if we use multiple terms to refer to a
specific item, but do expect that we clearly identify each term on its first use.
Table I-1 identifies the chapter in which each exam objective is covered. Chapter
10 is a unique chapter that contains a sample scenario for each exam objective, al-
though it is not included in the following table.
Introduction xxvii
Because VMware occasionally updates exam topics without notice, VMware Press
might post additional preparatory content on the web page associated with this
book at http://www.pearsonitcertification.com/title/9780789753236. It is a good
idea to check the website a couple of weeks before taking your exam to review any
updated content that might be posted online. We also recommend that you periodi-
cally check back to this page on the Pearson IT Certification website to view any
errata or supporting book files that may be available.
Introduction xxix
This book comes with access to one complete set of practice scenarios that emulate
the kind of questions you can expect to encounter on the real exam. You can access
these questions by registering the book at PearsonITCertification.com and access-
ing the files through the books page at www.informit.com/title/9780789753236.
During the time we were writing this certification guide, VMware announced a
new release of the exam, the VDCA550. To help you master the content found on
the VDCA511 or the VDCA550 we have provided the foundational topics in the
book and have created digital content for you to reference that is specific to the new
exam. Content on the practice scenarios maps to the VCAP-DCA blueprint and is
relevant to both the VDCA511 and VDCA550 exams. All the scenarios are based
on real-world experiences that involve administration tasks, which may be covered
in the actual exam
Premium Edition
In addition to the free practice exam provided with the book, you can purchase
two additional sets of practice scenarios with expanded functionality directly from
Pearson IT Certification. The Premium Edition eBook and Practice Test for this
title contains an additional two full practice exams and an eBook (in both PDF and
ePub format).
If you have purchased the print version of this title, you can purchase the Premium
Edition at a deep discount. A coupon code in the back of the book contains a one-
time-use code and instructions for where you can purchase the Premium Edition.
To view the Premium Edition product page, go to
http://www.pearsonitcertification.com/title/9780133579734
This chapter covers the following subjects:
The material in this chapter pertains to the VCAP-DCA Exam objectives 8.1
and 8.2.
CHAPTER 1
Administrator Tools
This chapter describes how to implement and use various administrator tools
that are useful in managing large vSphere environments. These tools include
the vSphere Client, ESXCLI, vmkfstools, ESXTOP, vCLI, vMA, and
PowerCLI. The goal is to ensure you are comfortable with the general use of
each tool. In the remaining chapters, procedures will be provided on using these
tools for specific purposes.
2. Which command(s) can be used to list all the virtual switches that are con-
trolled exclusively by a specific ESXi host?
a. From the ESXi Shell, enter esxcli network vswitch list.
b. From PowerCLI, use the Get-VMHost and Get-NetworkAdapter
functions.
c. From the ESXi Shell, use the esxcli network vswitch show namespace.
d. From PowerCLI, use the Get-VMHost and Get-VMHostNetwork
functions.
3. Which method can be used to create a new virtual disk file on an ESXi host?
a. Enter the vmkfstools c command.
b. Enter the vmkfstools C command.
c. Use the Add Storage link on the Configuration tab of the ESXi host.
d. Use the PowerCLI New-VMGuestFile cmdlet.
Foundation Topics
Installation
The vSphere Client can be installed on a Windows-based desktop or server that
meets the minimum requirements. The main requirements are one CPU, 1GB
RAM, and dot-Net Framework 3.5 or higher. The vSphere Client installer can be
downloaded independently from VMware. One way to quickly find a link to down-
load the installer is to use a web browser to browse the default webpage of an ESXi
host or vCenter, as shown in Figure 1-1. The Download vSphere Client link on a
vCenter Servers home page will download the installer from the vCenter Server,
but the same link on an ESXi hosts webpage will download the installer from
VMware via the Internet. Additionally, the installer named VMware-VIMSetup-all-
5.1.xxx (where xxx matches the current build level) contains an option to install the
vSphere Client, as well as options to install vCenter Server, Update Manager, the
vSphere Web Client, and other modules.
To install the vSphere Client, simply download and run one of the installers to a
desktop or other appropriate Windows instance. In most cases, accept all the de-
faults provided by the installation wizard.
Chapter 1: Administrator Tools 7
Figure 1-1 Link to download the vSphere Client from an ESXi host.
Usage
To use the vSphere Client, select Start > Programs > VMware vSphere Client.
At the logon prompt, specify the IP address or hostname of an ESXi host or a
vCenter Server and provide user credentials. By default, the root account can be
used to log on to an ESXi host. The local Windows administrator account or a
domain administrator account can used to log on to a Windows-based implementa-
tion of vCenter Server. The root account can be used to log on to a vCenter Server
Appliance.
If the vSphere Client is used to log on directly to an ESXi host, then the Inventory
pane shows only that host and any objects configured on that host. It does not show
other ESXi hosts or vCenter Server, as shown in Figure 1-2.
One commonly utilized step for troubleshooting ESXi host hardware issues is to
examine the Configuration tab > Hardware Health Status. A healthy system has
a normal green check mark indicator for each hardware device, as shown in Figure
1-3. If any items do not have a green check mark, the administrator should address
and resolve the issue.
8 VCAP5-DCA Official Cert Guide
Most configuration settings can be configured by using the Configuration tab and
selecting an appropriate option. The Configuration tab allows the configuration
of items such as Time Settings, DNS and Routing, and Licensing, as shown in
Figure 1-4.
Chapter 1: Administrator Tools 9
The vSphere Client can be used to create a virtual machine (VM) even if vCenter
Server is not yet deployed. Frequently, the first VM created by an administrator is
a Windows-based VM in which the administrator installs vCenter Server. To cre-
ate a VM, right-click the ESXi host in the inventory pane, and select New Virtual
Machine.
The vSphere Client is typically used to connect to a vCenter Server, rather than
directly to a specific ESXi host. This provides a single pane of glass to manage the
entire vSphere environment, including all ESXi hosts and VMs. When connected to
a vCenter Server, the vSphere Client will automatically provide additional options
only available when managing the entire environment. For example, the Home page
might provide as many as 20 options, as shown in Figure 1-5.
In addition to vCenter Server, additional optional server-based modules can be in-
stalled. These optional modules include VMware Update Manager and Site Recov-
ery Manager. Each optional module provides a client-based plug-in for the vSphere
Client, which enables the use of the vSphere Client to perform all administration
tasks without requiring independent clients.
10 VCAP5-DCA Official Cert Guide
Figure 1-5 vCenter Home page accessed from the vSphere Client.
Use the Plug-ins > Plug-ins Manager menu option to manage the plug-ins. Three
Key
Topic plug-ins may automatically appear, including vCenter Hardware Status, vCenter
Service Status, and VMware vCenter Storage Monitoring, as shown in Figure 1-6.
The vSphere Client can be used to perform nearly all the initial configuration tasks
for a new vSphere environment. The exception being the majority of new features
in vSphere 5.1 and 5.5, such as SSO, Inventory Tagging, Enhanced vMotion, and
so on. It can also be used to perform nearly all the daily administrative tasks. When
connected to vCenter Server, it provides four options for viewing and managing the
vSphere inventory. These options are Hosts and Clusters, VMs and Templates,
Datastores and Datastore Clusters, and Networking. In an enterprise, adminis-
trative tasks are often delegated to various personnel, each having unique responsi-
bilities. Each of the four inventory options provided by vCenter Server is aimed at
Chapter 1: Administrator Tools 11
NOTE If you want to use a command set for performing administrative tasks that
include vCenter Server operations, use PowerCLI.
Getting Started
The vCLI is an interface that provides the ESXCLI command set and other com-
mands, such as the vicfg-* command set. In many cases, vCLI provides more than
12 VCAP5-DCA Official Cert Guide
one command that can accomplish a specific task. Generally speaking, when feasible,
you should plan to use esxcli commands because the vicfg-* command set will likely
be discontinued in the future. For the exam, plan to use esxcli commands unless an
exam task clearly requires you to use another command.
This section focuses on running ESXCLI commands from the ESXi Shell. It de-
scribes a method for using the ESXCLI command set and provides examples. It does
not provide details for running ESXCLI commands from the vCLI or the vMA.
These details, such as providing connection and credential information, are covered
in the section on the vCLI and the vMA.
To get started running esxcli commands from the ESXi Shell, you first need to start
the ESXi Shell service. For convenience, you could also enable the SSH service. You
can enable both of these features by using the vSphere Client and selecting Security
Profile > Services > Properties, as shown in Figure 1-8. You can also start these
services by using the Troubleshooting option in the Direct Console User Interface
(DCUI), which is a menu of management options provided on the direct console of
an ESXi host, as shown in Figure 1-9.
For a more thorough example, if you are seeking a command to list all standard
vSwitches, you could use these steps:
Step 1. Enter esxcli, and examine the results shown in Figure 1-10.
Step 2. Enter esxcli network, and examine the results shown in Figure 1-11.
Step 3. Enter esxcli network vswitch, and examine the results shown in
Figure 1-12.
Step 4. Enter esxcli network vswitch standard, and examine the results shown
in Figure 1-13. Notice that at this level, some Available Commands are
now displayed. These commands are add, list, remove, and set. For this
example, the list command seems to be the most appropriate.
Figure 1-13 Available namespaces and commands at esxcli network vswitch standard.
Step 5. Enter the esxcli network vswitch standard list command, which ex-
ecutes the command and produces results, as shown in Figure 1-14.
Figure 1-14 Example of the esxcli network vswitch standard list command.
16 VCAP5-DCA Official Cert Guide
NOTE When using the previously discussed approach to discover the appropriate
command for a given task, pay attention to commands versus namespaces. Entering
a namespace at the command prompt is always safe because it will simply display the
next level of available namespaces and commands. However, entering a command at
the command prompt will execute that command. You should be careful not to enter
a command without fully understanding the consequences.
output as CSV, XML, or keyvalue. CSV-formatted output can be useful for import-
ing the data into a spreadsheet, whereas XML can be useful for importing the data
into web-based reporting tools. Finally, keyvalue can be useful for importing the
data into software development tools.
For example, consider the command esxcli network firewall get command, which
can be used to determine high-level configuration information on the hypervisor-
based firewall on an ESXi host. When executed without the formatter option, the
default results show the conceptual name and value of some firewall properties, as
shown in Figure 1-16.
When executed with the formatter option set to CSV, the same results are format-
ted in CSV form, as shown in Figure 1-17.
When executed with the formatter option set to XML, the same results are for-
matted in XML form, as shown in Figure 1-18.
When executed with the formatter option set to keyvalue, the same results are
formatted in keyvalue form, as shown in Figure 1-19.
vmkfstools Command
This section describes how to use the vmkfstools command. The scope of the
vmkfstools command is the manipulation of datastores and virtual disks. Although
some of its features are also provided by esxcli commands, vmkfstools is still impor-
tant. VCAP-DCA candidates are expected to be able to use vmkfsools. The vmkf-
stools command set can be used to perform many datastore and virtual diskrelated
tasks that can be performed in the vSphere Client, as well as some tasks that cannot
be performed in the vSphere Client. It is also a good tool for diagnosing and trou-
bleshooting issues that cannot be corrected using the vSphere Client.
Help Information
To get started, you can view the syntax and usage information for vmkfstools by
using the vmkfstools H command, as illustrated in Figure 1-20. Notice that the
results of this command indicate that it can be used for file systems and virtual disks.
Chapter 1: Administrator Tools 19
To use vmkfstools to create a new VMFS datastore, you must first identify an un-
used LUN presented by a SCSI-based storage adapter (Fibre channel HBA, local
storage controller, or iSCSI initiator), which can be done using the Storage Views
tab in the vSphere Client connected to vCenter. Follow these steps:
Step 1. Select Inventory > Hosts and Clusters.
Step 2. Select the ESXi host in the inventory pane.
Step 3. Select the Storage Views tab.
Step 4. If desired, change the displayed columns by right-clicking any column
heading and selecting just the columns you need.
Step 5. Ensure the Canonical Name, Lun, and Datastore names are displayed.
Step 6. Identify any SCSI devices (by Lun, Canonical Name, and Runtime
Name) that do not have a file system by locating any row whose
Datastore column is empty, as shown in Figure 1-23. In this example,
existing VMFS-formatted datastores reside on SCSI devices whose
Runtime Names are vmbha1:C0:T0:L0, vmbha33:C0:T0:L8, and
Chapter 1: Administrator Tools 21
Figure 1-23 Example of identifying unused SCSI devices with the Storage Views tab.
Now that an unused SCSI device has been identified, an available partition on the
device needs to be identified or created. This can be accomplished using the
partedUtil getptbl command. For example, this command can be used to display
any existing partitions on the SCSI device identified by canonical name naa.6000d7
71000020f30f1ac91fb1053941, as shown in Figure 1-24. In this example, the device
has no partitions.
The partedUtil setptbl command can be used to create a new partition. For exam-
ple, this command can be used to create a new partition on the SCSI device whose
Canonical Name is naa.6000d771000020f30f1ac91fb1053941 per these specifica-
tions:
1. Partition number = 1
3. Ending sector = 20971486 (which happens to be the last available sector on the
device used in this example)
4. Type = AA31E02A400F11DB9590000C2911D1B8 (which is a GUID that re-
fers to VMFS-5 file system)
5. Attribute = 0 (which is the same as not specifying any special attributes)
Figure 1-25 illustrates this example. It also illustrates using the partedUtil getptbl
command again to verify success.
When an empty partition is available, the vmkfstools command can be used to cre-
ate a VMFS datastore in the partition. For example, you can use the following com-
mand to create a new VMFS datastore named VMFStest01 in the first partition of a
device named naa.6000d771000020f30f1ac91fb1053941:
vmkfstools -C vmfs5 S VMFStest01 /vmfs/devices/disks/ naa.6000d77
1000020f30f1ac91fb1053941:1
You can use the vmkfstools command with the X option to grow (extend) the vir-
tual disk size. For example, the following command can be used to extend the virtual
disk that was created in the last example to a new size of 6 GB:
vmkfstools -X 6G /vmfs/volumes/Shared-8/test1.vmdk
Chapter 1: Administrator Tools 23
Overview
The esxtop utility displays the real-time resource utilization of an ESXi host. It
displays CPU, RAM, disk, and network usage. It can present the resource usage for
the entire host as well as a detailed breakout of each of the worlds running on the
host. Each world (which is similar to a process on other operating systems) performs
a specific function on the host. Some worlds, such as drivers and vmotion, are used
directly by the hypervisor to perform necessary tasks. Other worlds belong to VMs.
Some worlds represent the workload inside a VM, whereas other worlds represent
VM overhead, such as overhead associated with providing a console for the VM.
The concept of esxtop is much the same as the concept of the top command in Linux,
which displays all the processes running on a Linux server in order of resource utiliza-
tion, with the most resource-intensive process at the top of the list. By default, esxtop
displays the CPU usage of all the VMs and other worlds running on the ESXi host in
order of their current CPU usage, with the world utilizing the most CPU resources
listed at the top and the remaining in descending order, as illustrated in Figure 1-26.
Usage
The esxtop utility is interactive. By default, it refreshes its display every few sec-
onds, sorting the rows so that the list appears in descending order with the most
active world at the top. Although CPU usage information is displayed by default,
the results can be changed to show memory usage, disk usage, and network usage.
For each resource type, certain fields are displayed by default. The information
displayed can be selected from a list of available fields, by adding or removing in-
dividual fields as needed. To make these changes, simply press a specific key while
viewing esxtop. To learn about the options and appropriate keys, press the H key to
get help information, as shown in Figure 1-27.
The bottom of the help section indicates which resources can be monitored and the
appropriate key to press to do so. The main options are memory (press m), CPU
(press c), network (press n), disk adapter (press d), disk drive (press u), and virtual
disk (press v). For reference, here are two examples. The first example is memory,
which is displayed when the m key is pressed, as shown in Figure 1-28. The other
example is virtual disk, which is displayed when the v key is pressed, as shown in
Figure 1-29.
Chapter 1: Administrator Tools 25
To change the fields (columns) of a specific resource display in esxtop, press the F
key while viewing that resource. For example, when displaying CPU resource usage,
press the F key to view the CPU-related fields that may be selected. An asterisk at
the beginning of the row indicates that the field is included in the current results, as
shown in Figure 1-30. To add or remove a column from the currect esxtop view, use
the letter keys associated with each field while in the field editor (F while esxtop is
running). For example, pressing the B key toggles on or off the display of the Group
ID for each world. In Figure 1-30, pressing C would enable the currently disabled
field LWID.
26 VCAP5-DCA Official Cert Guide
In esxtop, each row represents a set of associated worlds by default. For example,
the drivers world contains all the worlds running device drivers. When viewing
virtual machine data, a row appears for each VM that represents all the worlds that
support the execution of that VM. To expand the parent row and view all the un-
derlying rows, press the E key. For example, to expand the parent row assigned to a
VM named VM-1, these steps can be used:
Step 1. Enter the command esxtop.
Step 2. Press c to ensure that CPU usage appears.
Step 3. In the list of worlds, identify the row that corresponds to your VM.
Step 4. Make note of the first two columns, ID and Group ID (GID).
Step 5. For example, a VM named VM-1, whose GID = 2538966, can be ex-
panded by pressing the E key and entering 2538966 for the group to be
expanded.
This is shown in Figure 1-31. Notice all the rows whose GIDs are 2538966, indicat-
ing they are servicing the same VM. Of these expanded worlds, the world named
vm-vcpu-0:VM-1 is the world that best indicates the CPU within the guest OS of
this VM. Of these expanded worlds, the world named vm-vcpu-0:VM-1 is the world
that best indicates the current CPU usage of the guest OS within this VM.
Often, when diagnosing an issue, the main concern is the resource usage of VMs,
not the resources used by system-related processes. To change the esxtop view
to display only data on VMs and not on worlds belonging to the hypervisor, press
Shift+V, as shown in Figure 1-32. On a host running many VMs, this permits you to
see more VMs in the display because esxtop provides no method by which to scroll
up or down through all the available worlds.
Chapter 1: Administrator Tools 27
Batch Mode
The esxtop utility offers other options such as batch mode, sampling period
Key
changes, and the ability to export data to a CSV file for later analysis and playback. Topic
Here is an example of running esxtop in batch mode, where it collects all data at
5-minute (300 seconds) intervals and outputs the data to a file named results01.csv:
esxtop -b -a d 300 >> results.csv
For administrators who have a functional knowledge of the Windows Perfmon util-
ity, the CSV file output from esxtop can be imported into this utility. To import a
CSV file into Windows Performance Monitor, right-click the chart, select Proper-
ties, and select the Source tab, as shown in Figure 1-33. Use the Add button to
select the CSV file.
After the CSV file is set as the source to Windows Perfmon, the administrator can
select options, such as which counters to display and for what time duration. Perf-
mon will display a graph containing the selected counters, shown in Figure 1-34.
28 VCAP5-DCA Official Cert Guide
Overview
The VMware vCLI is a command-line utility that can be installed on Windows- or
Linux-based systems. It provides the administrator with the means to use commands
to configure, monitor, and manage multiple ESXi hosts from a remote, centralized
location. The VMware vMA, on the other hand, is a Linux-based virtual appliance
(prebuilt VM) that can be deployed in a vSphere environment. It provides the ad-
ministrator with a variety of management tools, including the vCLI, and supporting
tools, like fastpass. The VMware vMA provides a secure, centralized means for using
vCLI commands to manage ESXi hosts. It also provides additional command tools,
such as resxtop, svmotion, vifs, vihostupdate, vmkfstools, and vmware-cmd.
VMware provides a vCLI installation package for Windows and Linux, which ad-
Key
ministrators can download from the VMware website and install in their desktops or Topic
servers. The VMware vCLI provides a command utility where legacy esxcfg- com-
mands, vicfg- commands, and esxcli commands can be executed. In other words, it
allows the same command sets that are available on the ESXi Shell. VMware recom-
mends not starting the ESXi Shell on the hosts, but instead executing commands
from the vCLI. This places less load and less security risk on each ESXi host.
For each esxcfg- command that is provided by the ESXi shell, the vCLI provides
a corresponding vicfg- command that functions identically. So, if you are already
familiar with an esxcli command, simply change the first three letters from esx to
vi. For convenience, the vCLI also provides a symbolic link (shortcut file) to each
vicfg- command using the original esxcfg- naming convention. This allows any
scripts that were developed to run directly in the ESXi Shell to be easily adapted to
run in vCLI.
The vicfg and esxcfg commands are considered legacy because they are being dep-
recated in favor of the ESXCLI command set. Although this book focuses mostly
on esxcli, you should practice executing both esxcli and vicfg commands from the
vMA command prompt as you prepare for the exam. As you practice using each
esxcli command, take a few moments to determine the corresponding vicfg com-
mand and practice using it.
30 VCAP5-DCA Official Cert Guide
esxcfg Commands
To get familiar with esxcfg- commands, type esxcfg- at the prompt in the ESXi
Key
Topic Shell and press the Tab key twice. This will display all the commands that begin
with those characters, as shown in Figure 1-35.
To learn about the usage of a specific command, enter the command name followed
by --help. For example, to obtain usage information for the esxcfg-rescan com-
mand, enter this command:
esxcfg-rescan --help
Using esxcli commands from the vCLI is similar to using the commands from the
ESXi Shell, except that connection information must be added, which is explained
later in this section. Using vicfg commands from the vCLI is identical to using es-
xcfg commands from the vCLI because the latter is simply a symbolic link to the
former.
In the wizard, you then need to deploy the vMA to select the OVF file, provide a
name for the VM, select the ESXi host, select a datastore, and select a network port
group. After the vMA has been deployed, power on the appliance and respond to
the prompts to provide the network configuration, hostname, and password for the
vi-admin user. Next, use the console to log in to the vMA using the vi-admin ac-
count and the password you createdor for convenience, you can also use Putty or
another utility to connect and log in to the vMA using a Secure Shell (SSH) session.
This enables an AD user to log in and use the vMA, but the real goal is to enable
AD users to connect to and manage ESXi hosts from the vMA. To authenticate and
authorize an AD account to manage an ESXi host, first use the vSphere Client to
join the ESXi host to the domain and ensure the AD account is granted the Admin-
istrator role to the host. This can be accomplished using the following steps. An
example is shown in Figure 1-37.
Step 1. Use the vSphere Client to connect to an ESXi host using the root
Key
account. Topic
Step 2. Select Configuration tab > Authentication Services.
Step 3. Select Properties.
Step 4. In the Directory Service Type drop-down menu, select Active
Directory.
32 VCAP5-DCA Official Cert Guide
Step 5. In the domain box, enter the full name of the AD domain.
Step 6. Click the Join Domain button.
Step 7. Provide the credentials of a domain user account with full permissions to
the Computers container in Active Directory.
Now that the ESXi host has joined the AD domain, AD user accounts can authen-
ticate with the host, but they might not necessarily be authorized to manage the
host. By default, if an AD domain contains a user group named esx admins, then this
group is automatically assigned the Administrator role. Regardless, the Permissions
tab can be used to assign the Administrator role to any other AD group, enabling
any AD user in that group to have full control of the host. Figure 1-38 illustrates an
example of the Permissions tab reflecting the default permissions of an ESXi host
that has been joined to a domain named Lab.
Now that the host has joined the domain, AD users who have been granted the
Administrator can now use the vSphere client to connect to and manage the ESXi
Chapter 1: Administrator Tools 33
host. These users can also use the vMA to manage this host and any other ESXi host
that has been similarly configured. To experience this firsthand, you could experi-
ment running a simple command from various user accounts. For example, from the
vMA, use the root account to run the esxcfg-nics -l command to list the physical
network adapters in the host. Verify that the command runs successfully. Now run
the same command using an AD account that does not have the Administrator role
on the Permissions tab (in the example the user student01a is used). Verify that the
command fails. These steps are shown in Figure 1-39.
Fastpass
Finally, instead of adding user credentials to each command, utilize the fastpass
Key
commands. Fastpass is a utility that prompts the user for credentials once and then Topic
stores them for future use. A good practice is to use the vifp addserver command
to connect to each ESXi host, executing the command once for each host. For ex-
ample, Figure 1-40 shows the commands you use to create a fastpass connection to
ESXi hosts named host-01 and host-02, using the Administrator account in the Lab
domain.
Fastpass allows the user to set one of the ESXi hosts to be the current target. This
enables the user to now run vCLI commands without having to specify the host or
credentials with each command. The commands are automatically performed on the
current target host, and the credentials are already known to fastpass. For example,
the fastpass target can be set to host-02; then a set of commands can be run to list
the physical adapters and virtual switches on host-02, as shown in Figure 1-41.
For convenience, the vifp addserver command can also be used to make a fastpass
connection to the vCenter Server. Although the vCLI commands can be used only
to configure ESXi hosts, it is simpler to connect the vMA to the vCenter Server
and then select a specific host with each command. To understand this better, think
about how you tend to use the vSphere Client. You probably connect and authenti-
cate once to a vCenter Server and then select the ESXi host you want to configure
or monitor. You could do the same with the vMA and fastpass by connecting and
authenticating to a vCenter Server and then including the --vihost parameter with
each command to select a specific ESXi host. Another benefit of this approach is
that vMA users do no require the ability to log on directly to an ESXi host. In other
words, most users use the vSphere Client to log on to vCenter Server to perform
their daily tasks. They cannot log on directly to an ESXi host. These users could
also use the vMA to connect to vCenter Server to perform the same tasks at the
command line just by adding the --vihost parameter to each command and specify-
ing the host. Figure 1-42 demonstrates making a fastpass connection to a vCenter
Server named vc-app-01, setting it as the target, and using the --vihost parameter to
list the network adapters on host-02.
Chapter 1: Administrator Tools 35
After applying the information in this section, you should now be equipped with the
means to execute vicfg, excfg, and esxcli commands without having to specify user
credentials with each command. You might find that returning to the esxcli section
of this guide and practicing using esxcli commands and their corresponding vicfg
commands from the vMA is useful.
Figure 1-43 illustrates this example, as well as listing the file using the ls command
and displaying the first page of the file using the more command.
36 VCAP5-DCA Official Cert Guide
PowerCLI
This section describes how to implement and use the VMware vSphere PowerCLI.
PowerCLI is a command-line interface that allows administrators to use commands
to manage everything in a vSphere environment. The VMware vSphere PowerCLI
is a set of commands (typically called cmdlets) that run on top of Microsoft
Windows PowerShell. These cmdlets can be used to connect to vCenter Server to
monitor and configure all the clusters, ESXi hosts, VMs, and other objects managed
by vCenter Server. PowerCLI can be used to perform administrative and opera-
tional tasks, such as vMotion. Its primary use is to enable the development of scripts
to automate administration processes that require repetitive tasks when using the
vSphere Client. Another use is to provide complex reports that are not natively pro-
vided by the vSphere Client.
The goal of this section is to introduce you to the steps for implementing Power-
CLI and to demonstrate how to perform basic commands. In later chapters, details
are provided for performing administration tasks using specific PowerCLI cmdlets.
The goal of this chapter is to familiarize you sufficiently with PowerCLI, so you can
practice specific PowerCLI cmdlets when encountered in subsequent chapters.
Chapter 1: Administrator Tools 37
Installation
Here are the steps for implementing PowerCLI:
Key
Step 1. Select a Windows desktop or server to be used to run PowerCLI and to Topic
allow scripts to be built and executed. This could be the administrators
desktop or a central Windows server. Most administrators choose to use
a Windows VM that can be shared with a team of administrators and ac-
cessed via Remote Desktop. Prerequisites are Windows PowerShell (ver-
sion 2.0 or higher) and dot-Net Framework (version 2.0 SP2 or higher).
Step 2. Install Microsoft Windows PowerShell. The installation steps depend
on the version of Windows. For example, to install PowerShell 3.0 on a
Windows 2008 R2 Server, the basic steps are to install dot-Net Frame-
work 4.x and Windows Management Framework 3.0. For specific steps,
use the PowerShell Installation Guide (http://technet.microsoft.com/en-
us/library/hh847837.aspx).
Step 3. Install PowerCLI. The basic steps are to download the installer from
VMwares website; run the installer on the selected Windows system; and
use the wizard to complete the installation, typically keeping the default
values for all options provided by the installer.
Step 4. Select Start > Programs > VMware > VMware vSphere PowerCLI to
launch PowerCLI.
Step 5. On the first use of PowerCLI, execute this command to enable
PowerCLI:
Set-ExecutionPolicy RemoteSigned
Usage
After PowerCLI has been implemented, you can gain basic familiarity by using it
to connect to a vSphere environment and to perform various tasks, such as display-
ing VM, networking, and storage configuration data. For example, to connect to a
vCenter Server named vc-app-01 and identify all the ESXi hosts and VMs that it
manages, use the following commands:
Connect-VIServer vc-app-01 (when prompted, provide user credentials)
Get-VMHost
Get-VM
The Get-VMHost cmdlet returns a list of all managed ESXi hosts and displays
some details for each host. Likewise, the Get-VM cmdlet returns a list of all man-
aged VMs with some details for each VM, as illustrated in Figure 1-44.
38 VCAP5-DCA Official Cert Guide
In this example, the first command creates an object variable named $MyVM that
is used to store the results of the Get-VM VM-2 command, which retrieves the
VM named VM-2. In other words, after the first command finishes, the variable
$MyVM represents the VM-2 VM. The second command shows all the available
operations and properties for VM-2, as shown in Figure 1-46.
Chapter 1: Administrator Tools 39
Object variables can reference a list of objects. The for-each command can be used
to operate on each object in a list of objects. The if command can be used to selec-
tively perform one task when a given condition is true and perform another task
otherwise. For example, consider the following scenario.
40 VCAP5-DCA Official Cert Guide
Scenario Use PowerCLI to toggle the connection state of all virtual NICs
Use a series of PowerCLI commands to
Retrieve a list of all virtual network adapters from all VMs
Display the current connection state of each adapter
Toggle the state of each adapter
Re-display the current connection state of each adapter
Figure 1-47 illustrates an example set of commands that meet the requirements in
the scenario.
Figure 1-47 Example of PowerCLI commands to toggle the connected state value.
Often a PowerCLI script will need to utilize environment variables in a guest oper-
Key
ating system. One use case is the environment variable named $env:ProgramFiles, Topic
which is used to reference the path to the Program Files folder in a Windows oper-
ating system and is commonly needed to locate programs and scripts. Another use
case is the environment variable named $env:Tmp, which can be used to reference
the location of temporary files in Windows. The following example uses these two
variables to build a character string containing the full command necessary to run
the msinfo32 command in a VM and save its results in a file named inforeport in
the temporary folder. The first command builds the character string, and the second
command passes the string to VM for execution:
$script = '&"$env:ProgramFiles\Common Files\Microsoft Shared\MSInfo\
msinfo32.exe" /report "$env:Tmp\inforeport"'
Invoke-VMScript -ScriptText $script -VM VM -HostCredential $hostCre-
dential -GuestCredential $guestCredential
Summary
This chapter described how to implement and use the vSphere Client, esxcli, vmkfs-
tools, esxtop, vCLI, vMA, and PowerCLI. At this point, you should ensure that you
can successfully apply the procedures in this chapter to deploy and utilize each of
42 VCAP5-DCA Official Cert Guide
these tools in your own vSphere environment. The prerequisites for the remaining
chapters are that you are comfortable using each tool.
Key Terms
Define the following key terms from this chapter, and check your answers in the
glossary.
vSphere Client, esxcli, esxtop, vmkfstools, vCLI, vMA, PowerCLI, DCUI,
ESXi Shell.
Review Tasks
These Review Tasks allow you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a
set of tasks are provided instead of a set of questions. You should now attempt to
perform each of these tasks without looking at previous sections in this chapter or
at other materials, unless necessary. The steps for each task are located within the
chapter:
1. Install the vSphere Client.
2. Connect remotely to an ESXi host using SSH, and use an esxcli command to
display all the NFS datastores available to the host.
3. Use a command-line utility to create a new VMFS datastore on a new, empty
LUN that has no existing disk partitions.
4. Use resxtop to create a CSV file containing all statistics from an ESXi host
taken at 2-minute intervals for 10 minutes. Input the file into Windows Per-
formance Monitor to display graphically.
5. Deploy the vMA and use fastpass to provide credentials and make connec-
tions to two ESXi hosts. Set the default target to be the first ESXi host, and
use vicfg commands to list the network adapters and virtual switches on the
host. Then change the default target to the second host, without re-entering
credentials, and use vicfg commands to list the network adapters and virtual
switches on that host.
6. Implement PowerCLI in a Windows desktop, and use it to identify and toggle
the current connection state of each virtual network adapter of each VM.
This chapter covers the following subjects:
This chapter covers a portion of the VCAP-DCA Exam objectives 2.1, 2.2, 2.3,
and 2.4.
CHAPTER 2
Network Administration
This chapter is intended to provide you with the knowledge and skills to suc-
cessfully perform administration of an enterprise network that includes virtual
networks built using vSphere. It is also intended to ensure that you have the
skills to successfully complete network configuration, troubleshooting, and
management tasks that might be part of the VCAP5-DCA exam. As you read
this chapter, take time to practice the steps provided until you are confident that
you can perform such tasks rather quickly without any assistance. Some steps
involve using the vSphere Client; others involve using the vCLI and PowerCLI.
4. Which method can be used to configure the VLAN settings of a vDS port
group where a Wireshark VM will be used to inspect network packets to and
from all other VMs connected to all other port groups and VLANs on the
same vDS?
a. Set the VLAN on the port group to 4096.
b. Set the VLAN Type to VLAN Trunking.
c. Set the VLAN Type to Promiscuous.
d. Set the VLAN Type to PVLAN.
Chapter 2: Network Administration 47
5. Which method can be used to connect a vSS port group to two uplink ports
that are configured with EtherChannel?
a. Change the Load Balancing Policy to Route based on the originating
port ID on the vSS.
b. Change the Load Balancing Policy to Route based on the originating
virtual switch port ID on the vSS port group.
c. Change the Load Balancing Policy to Route based on Physical NIC
Load on the vSS port group.
d. Change the Load Balancing Policy to Route based on IP Hash on the
vSS.
8. Which of the following summarizes the steps that should be followed to allow
a Wireshark VM connected to a vDS to inspect packets to and from just one
other specific VM on the same vDS?
a. Set VLAN Type to Trunking, and then enable Promiscuous Mode.
b. Configure Port Mirroring.
c. Edit the settings of the monitored VM and configure port replication.
d. Configure NetFlow.
48 VCAP5-DCA Official Cert Guide
Foundation Topics
Overview
You should already be familiar with basic vSphere network virtualization concepts
and administrative tasks. If any of the following details in this overview are new to
you, be sure to research the appropriate information before continuing on to the
remainder of this chapter.
vSphere Standard Switches (vSSes) are implemented on each ESXi host in a vSphere
implementation. These Layer-2, software-based switches provide the following
features: VLAN Tagging, Security, NIC Teaming, Failover, and Traffic Shaping.
All these features have settings that can be configured using the vSphere Client. On
each vSS, one or more port groups can be configured. These port groups can sup-
port virtual machine and management traffic and services like vMotion, IP storage,
and FT logging. The default settings for the Security, Teaming, and Shaping poli-
cies can be modified per vSS and can be overridden per port group. VLAN settings
can be configured on each port group. Some settings, such as Maximum Transmis-
sion Unit (MTU) and Cisco Discovery Protocol (CDP), can be configured only at
the vSS level.
Prior to attaching virtual machines to a network, a VM port group must be cre-
ated on a vSS. The port group is then configured with the VLAN, Traffic Shaping,
Security, and physical NIC Teaming settings. Finally, the vmnic on the virtual ma-
chine is connected to the appropriate port group.
Management traffic and all other network services, including vMotion, IP-based
storage, VMware HA heartbeats, and VMware Fault Tolerance logging, require a
vmkernel port. When a vmkernel port is created on a vSS, a port group is first cre-
ated; then a vmkernel virtual adapter is created and placed in the port group. When
using the vSphere Client, the port group creation for vmkernel ports is transparent.
When using the vCLI, the port group must first be created.
vSphere Distributed Virtual Switches (vDSes) are implemented at the datacenter
level, where vCenter Server controls the configuration and management of the vDS.
Chapter 2: Network Administration 49
ESXi hosts are then attached to these vDSes. When a host is connected to a vDS,
vCenter Server creates a data plane at the ESXi host level by creating one or more
hidden vSwitches. The settings and statistics of the hidden vSwitch(es) are automati-
cally synchronized with those on the vDS. The data plane and packet movement are
controlled by the hidden vSwitch(es) at the ESXi host level, which ensures that any
disruption of the connection between the ESXi host and vCenter Server does not af-
fect the network connectivity of the VMs. The control plane is handled by vCenter
Server. So, any loss of connectivity between the ESXi host and vCenter Server will
affect the ability to make modifications to the vDS.
As mentioned earlier, all ports on a vSS or vDS are created from a port group. Al-
though it can appear that a vmkernel port created using the vSphere Client is cre-
ated without a port group, it is actually created as part of the operation. This port
group is used only for the vmkernel port. Policies can be configured for the vmker-
nel, but they are actually configured on the port groupnot the vmkernel virtual
adapter. This bit of detail might be new to you concerning vSSes, but it should seem
familiar to those who configure vDSes because in the vSphere Client, port groups
must first be configured on a vDS prior to attaching vmkernel virtual adapters.
vSSes can be managed by selecting the appropriate ESXi host and using the Con-
figuration Tab > Networking option, as shown in Figure 2-1.
The Add Networking link can be used to launch a wizard to create a new vSS. The
first page of the wizard is the Connection Type page, as shown in Figure 2-2.
50 VCAP5-DCA Official Cert Guide
The properties of a vSS can be overridden per port group. The General tab can
used to set the Network Label and VLAN ID of the port group, as shown in Figure
2-3.
The Load Balancing, Failover Detection, Notify Switches, Failback, and Failover
Order settings can be configured on the NIC Teaming properties tab of a port
group or the vSS, as shown in Figure 2-4.
Security policy settings, such as Promiscuous Mode, can be set on the Security
properties page of a port group or the vSS, as shown in Figure 2-5.
Chapter 2: Network Administration 51
Traffic Shaping policy settings, such as Average Bandwidth and Peak Bandwidth,
can be set on the Traffic Shaping properties page of a port group or the vSS, as
shown in Figure 2-6.
vDSes can be managed using the vSphere Client by connecting to a vCenter Server
and navigating to the Inventory > Networking section. You can right-click a data-
center object and select New vSphere Distributed Switch to launch the Create
vSphere Distributed Switch wizard, as shown in Figure 2-7.
To configure a vDS, right-click the vDS and select Edit Settings. General settings,
such as the Name and number of uplink ports, can be set on the General proper-
ties page of the vDS, as shown in Figure 2-8.
Chapter 2: Network Administration 53
All the policies that can be configured on a vDS port group are shown. Selecting any
Policy Category (or categories) and clicking Next allows the related policy settings
to be applied to one or more vDS port groups. An example of this is shown in Fig-
ure 2-10.
To configure the selected policies, select the vDS port groups to configure and then
click Next. The Configure Policies screen is displayed, as shown in Figure 2-11.
Chapter 2: Network Administration 55
The vDS Configure Policies page allows you to adjust the settings for all the poli-
cies you selected and will apply those changes to the port groups you have chosen.
The final screen summarizes the changes that will be applied, as shown in
Figure 2-12.
Of course, individual vDS port groups can be configured. To do so, right-click the
vDS port group and select Edit Settings. The General properties page of the vDA
port group is shown and can be used to set the Name, Number of Ports, and Port
Binding option, as shown in Figure 2-13.
Security policy settings, such as Promiscuous Mode, can be set on the Security
properties page of the vDS port group shown in Figure 2-14.
Chapter 2: Network Administration 57
Traffic Shaping policy settings, such as Average Bandwidth and Peak Bandwidth on
ingress and egress traffic, can be set on the Traffic Shaping properties page of a dis-
tributed port group, as shown in Figure 2-15.
58 VCAP5-DCA Official Cert Guide
The same process can be used to adjust the VLAN, Teaming and Failover, Resource
Allocation, Monitoring, and other settings.
After creating and configuring a vDS, ESXi hosts are added. Adding the host cre-
ates the data plane and applies the settings from the vDS to the host. To connect
an ESXi host, right-click the vDSS and select Add Host, which launches the Add
Host to vSphere Distributed Switch wizard shown in Figure 2-16.
Select the hosts to be added and choose the vmnics that the vDS will utilize.
The remainder of this chapter focuses on specific, advanced administration tasks,
including commands that are called out on various VCAP5-DCA Exam Blueprint
objectives. These tasks include configuring SNMP using commands and migrating
objects from vSSes to vDSes.
Chapter 2: Network Administration 59
Configure SNMP
Typically, administrators are required to automatically retrieve status information
from vSphere and to feed this data to monitoring and management systems. This
can be accomplished using SNMP. A vCenter Server can be configured to send
SNMP traps to management systems that use SNMP receivers. A maximum of four
SNMP receivers can be configured per vCenter Server. The required privilege is
Global.Settings.
The procedure for configuring SNMP receivers on a vCenter Server using the
Key
vSphere Client is as follows: Topic
Step 1. Select Administration > vCenter Server Settings.
Step 2. Select SNMP.
Step 3. In the Receiver URL fields, enter the hostname or IP address of the
SNMP receiver.
Step 4. In the adjacent field, enter the port number used by the receiver, which
must be between 1 and 65535.
Step 5. In the Community field, enter the community identifier.
Step 6. Click OK.
60 VCAP5-DCA Official Cert Guide
The procedure to configure VMware Direct Path I/O involves configuring the PCI
Key
Topic device as a pass-through device and assigning it to a specific VM. The steps to con-
figure these settings using the vSphere Client are shown here:
Step 1. Select the ESXi host.
Step 2. Select Configuration tab > Hardware > Advanced Settings.
Step 3. Select the Pass-through page.
Step 4. Click Edit.
Step 5. Select the appropriate PCI device.
Step 6. Click OK.
Step 7. Right-click the VM, and then select Edit Settings.
Step 8. Click the Hardware tab.
Step 9. Click Add.
Step 10. Choose the PCI device.
Step 11. Click Next.
Step 6. Accept any defaults related to distributed port groups (this will create a
default port group named dvPortGroup that can be renamed and recon-
figured later).
Step 7. Click OK.
Next, attach the ESXi host and migrate all items, including VMs, NICs, and vmker-
Key
nel ports, from the vSS to the vDS. This approach works nicely for vSSes config- Topic
ured with IP Hash-based NIC Teaming and Etherchannel. Follow these steps:
Step 1. In the Inventory pane, click the vDS.
Step 2. Select the Configuration tab.
Step 3. Visually examine the diagram to determine whether any port groups exist
on the vDS.
Step 4. Decide which port groups should be configured on the vDS and the spe-
cific settings for each port group policy, including VLAN, Security, NIC
Teaming, and Traffic shaping policies. These ports will act as the desti-
nation port groups during the migration.
Step 5. Modify any existing port groups to match the planned settings for that
port group. Create all other port groups as planned. To create a new port
group, right-click the vDS and select New Distributed Port Group.
Provide a port group name and appropriate settings when prompted by
the wizard.
Step 6. In the Inventory pane, right-click the vDS and select Add Host, which
launches the Add Host to vSphere Distributed Switch Wizard.
Step 7. When prompted by the wizard, select the ESXi host and select all the
physical adapters that are currently attached to the vSS that is being re-
placed, as shown in Figure 2-18. Click Next.
Step 8. In the next page of the wizard, choose any vmkernel ports (such as
VMotion or Management virtual adapters) that you want to migrate
from the vSS, as shown in Figure 2-19. In the Destination Port Group
column, select the distributed port group where you want to move the
vmkernel port.
64 VCAP5-DCA Official Cert Guide
Figure 2-18 The Select Host and Physical Adapter page of the Add Host Wizard.
Figure 2-19 The Network Connectivity page of the Add Host Wizard.
Chapter 2: Network Administration 65
Step 9. In the next page of the wizard, check the box labeled Migrate Virtual
Machine Networking. In the Destination Port Group column, select
the target distributed port group for each VM, as shown in Figure 2-20.
Figure 2-20 The Virtual Machine Networking page of the Add Host Wizard.
Step 10. Click Finish. All the selected VMs, vmkernel ports, and NICs should mi-
grate safely to the new vDS with little or no disruption in network con-
nectivity per VM.
Other options to migrate from vSS to vDS exist. For example, the previous pro-
cedure could be modified such that only one NIC (instead of all NICs) from the
current vSS is selected in the wizard. By using this method and ensuring that all
VMs and vmkernel virtual adapters have migrated successfully to the vDS prior to
migrating the remaining NICs, network connectivity is maintained. Even during
the midst of the migration, where some VMs are still connected to the original vSS
and some to the new vDS, the VMs on either switch are still connected to the net-
work. Do not use this approach if IP Hash-based NIC Teaming and Etherchannel
(IEE802.3ad) are currently in use.
For another example, instead of migrating VMs when attaching the ESXi host, the
VMs could be migrated after attaching the host. This could be accomplished using
66 VCAP5-DCA Official Cert Guide
Configure NetFlow
NetFlow is an industry standard for collecting and analyzing network data. It is
a collection of related network packets traveling in sequence in the same direc-
tion, sharing specific characteristics, including source IP address, target IP address,
source port, target port, and type of service. Ethernet switches that support the
NetFlow protocol can be configured to identify net flows and send data about the
net flow to net flow receivers. NetFlow analyzers can be used to analyze the col-
lected data and produce reports. Some examples of NetFlow analysis products are
Solarwinds NetFlow Traffic Analyzer and OptiView NetFlow Tracker.
vSSes cannot be configured for NetFlow collection, but vDSes can.
The steps to configure a vDS for NetFlow collection using the vSphere Client are as
Key
Topic follows:
Step 1. Drill to Inventory > Networking.
Step 2. Right-click the vDS, and select Edit Settings.
Step 3. Select the NetFlow tab.
Step 4. Define the IP and port ID for the NetFlow Collector.
Step 5. Define the IP for the vSphere Distributed Switch.
Step 6. Configure any advanced settings as needed (sampling rate, process inter-
nal flows only, and so on).
Step 7. Click OK to save.
Step 8. Then right-click and select Edit Settings on the dvPort Group on which
you want to enable NetFlow.
Step 9. Click Monitoring.
Step 10. Use the drop-down menu to give NetFlow a status of Enabled on this
port group.
Step 11. Click OK.
Discovery Protocols
Cisco Discovery Protocol (CDP) can be configured on both vSSes and vDSes. Link
Layer Discovery Protocol (LLDP) can also be configured on vDSSes, but not vSSes.
CDP is a protocol used on Cisco switches to discover identity and configuration
information about the switches to which they are attached and broadcast its own in-
formation to those switches. CDP can be used by vSwitches to discover and broad-
cast information in much the same way. In addition, in a vSphere implementation,
Chapter 2: Network Administration 69
CDP can be used to allow attached Cisco switches to discover information about
vSwitches and ESXi hosts. Similarly, LLDPa vendor-neutral implementation of
CDPcan be used to discover and broadcast the same information on switches that
support LLDP rather than CDP. The main use case for utilizing LLDP is when a
network contains non-Cisco switches, but this use case does require vDSes.
The following steps can be used to configure LLDP on a vDS:
Key
Step 1. Select Inventory > Networking. Topic
The following command enables CDP and sets it to both on a vSS named vSwitch1:
esxcli network vswitch standard set c both v <vSwitch. Name>
This method of VLAN tagging is also known as Virtual Switch Tagging (VST).
vSphere supports two other VLAN tagging methods, External Switch Tagging
(EST) and Virtual Guest Tagging (VGT). To configure EST, configure the physi-
cal Ethernet switch to assign the VLAN numbers. No configuration is performed
on the vSS or vDS, and packets are not tagged until they reach the physical switch
infrastructure. All virtual machines on all port groups using the vmnic that connects
to the physical switch port will reside in that VLAN. VGT is enabled by configuring
the VLAN within the guest OS rather than on the virtual port group. Packets are
tagged before they leave the guest OS.
VMware recommends network segregation between different types of traffic, such
as management, vMotion, and VMs. This can be achieved by using separate VLANs
for each network type. For example, a management VLAN can be created on physi-
cal switches and configured accordingly on vSwitches.
You can configure VLANs on port groups on vSSes using the vSphere Client by fol-
lowing these steps:
Step 1. In the Host and Clusters Inventory, select an ESXi server.
Step 2. Select Configuration > Networking.
Step 3. Click the Properties link for the desired vSS.
Step 4. Select the appropriate port group, and click Edit.
Step 5. In the General Properties page, enter the appropriate VLAN number.
Step 6. Click OK.
VLANs can be configured with the esxcli network vswitch standard portgroup
Key
Topic command. For example, to assign VLAN 101 to a port group named Test, the com-
mand is
esxcli network vswitch standard portgroup set -p Test -v 101
NOTE Also set the Security setting of the sniffer port group to allow Promiscuous
Mode. This is necessary to allow the Wireshark VM to inspect packets that are not
destined for the sniffer VM.
VST (assigning VLAN numbers to virtual port groups) requires VLAN trunking on
the physical switch ports. The trunk should include all VLANs that will be assigned
to the virtual port groups that share the same physical uplinks. For example, con-
sider this scenario.
In this scenario, the physical switch ports must be configured to trunk VLANs 101
and 201. The Management Network vmkernel port must be set for VLAN 101. The
production VM port group must be set for VLAN 201.
VLAN trunking is permitted on vDSes, where it is more configurable than VLAN
trunking on vSSes. On vDSes, the VLAN type can be set to VLAN Trunking and
the trunk can be set to a combination of specific VLAN values and VLAN ranges.
For example, if the Wireshark VM is needed to inspect packets on VLAN 101 and
201, but not on any other VLAN, then it can be attached to a distributed port group
that is trunked for just VLANs 101 and 201.
NOTE The Route based on the originating virtual port ID algorithm does not con-
sider load into its calculation for traffic placement.
The second NIC Teaming policy available for both vSSes and vDSes is Route based
on source MAC hash. This policy is similar to the Route based on the originating
virtual port ID policy, except that the vSwitch uses the MAC address of the virtual
adapter to select the path, rather than the port number. The vSwitch performs a
modulo function, where the MAC address is divided by the number of NICs in the
team and the remainder indicates the path to place the outbound I/O.
Chapter 2: Network Administration 75
NOTE The Route based on source MAC hash algorithm does not consider load into
its calculation for traffic placement.
Another NIC Teaming policy available for both switch types is Route based on
IP hash. This is the only option that permits outbound data from a single virtual
adapter to be distributed across all active paths on the vSwitch. This option requires
that the physical switch be configured for IEEE802.3ad, which is often referred
to as Etherchannel. Likewise, if Etherchannel is configured to bond a set of paths
on the physical switch, then Route based on IP hash must be configured on the
vSwitch. This allows inbound traffic to be truly load balanced by the physical switch,
which treats all paths in the bond as a single pipe. The outbound data from each
virtual adapter is distributed across the active paths using the calculated IP hash,
where the vSwitch maintains a table of all current external connections to the virtual
adapter and directs the traffic destined for each external connection individually.
So, if a virtual adapter is concurrently sending data to two or more clients, the I/O
to one client can be placed on one path and the I/O to another client can be placed
on a separate path. The outbound traffic from a virtual adapter to a specific external
client is based on the most significant bits of the IP addresses of both the virtual
adapter and the client. The combined value of these bits is used by the vSwitch to
place the associated outbound traffic on a specific path.
NOTE The Route based on IP hash algorithm does not consider load into its cal-
culation for traffic placement. But, the inbound traffic is truly load balanced by the
physical switch.
NOTE The Route based on IP hash algorithm does require a specific configuration
(IEEE802.3ad) on the physical switch. Algorithms using virtual port ID or MAC hash
do not require a specific configuration on the physical switch.
A final load balancing policy is available for vDSes only. The Route based on physi-
Key
cal NIC load policy is the only load balancing option that factors in the load on the Topic
physical NIC when determining traffic placement. It also does not require special
settings on the physical switch. Initially, outbound traffic from each virtual adapter
is placed on a specific path. Activity is monitored across each path in the team, and
when the I/O through a specific vmnic adapter reaches a consistent 75% capacity,
then one or more virtual adapters is automatically remapped to other paths. This
76 VCAP5-DCA Official Cert Guide
algorithm is a good choice for situations in which you are concerned about saturat-
ing the bandwidth of some NICs in the team but would rather not configure Ether-
channel on the physical switch.
NOTE The Route based on physical NIC load algorithm does consider load into its
calculation for traffic placement. It is available only on vDSes.
You can configure NIC Teaming and Failover policies on a vSS by following these
steps:
Step 1. Select Inventory > Hosts and Clusters; then select the ESXi host.
Step 2. Select Configuration > Networking.
Step 3. Select the Properties link of the appropriate vSS.
Step 4. Select the NIC Teaming tab.
Step 5. Use the drop-down menu to set the Load Balancing option to the de-
sired option.
You can set NIC Teaming and Failover policies on vDS by navigating to Inventory
> Networking and modifying the vDS. You can also override vSS and vDS settings
at the port group level by using the NIC Teaming tab on the individual port group
property pages. On vDSes, you can also allow individual ports to override the set-
tings of the port group.
In addition to the Load Balancing option, you can configure other settings on the
NIC Teaming tab, such as Failback, Notify Switches, and explicit failover. By de-
fault, if a virtual adapter is reconnected to a new path due to a path failure, it will
notify the physical switch. One use case where this should be changed is when Mi-
crosoft Network Load Balancing (NLB) is used in a unicast mode. In this case, set
the Notify Switches option to No. Next, when a virtual adapter is placed on a new
path due to failover or failback, it notifies the physical switches by default. One use
case where this might need to be changed is when a physical network connection
is having intermittent issues and you want to ensure that VMs are not using it until
it is permanently repaired. Finally, by default, all NICs in a team are active and the
selected load-balancing policy determines the appropriate I/O paths for each virtual
adapter. One use case where this might need to be changed is when you want to
place the Management Network on a specific physical path for normal use but allow
it to failover to another specific path if necessary.
Chapter 2: Network Administration 77
Live Port Moving, configuring vDS settings to satisfy specific network require-
ments, Network I/O Control, and troubleshooting.
groups. In cases where you expect to never have more than a specific number of
concurrently running virtual adapters connected to a port group, you could set the
port binding method to dynamic. Ephemeral binding is the most flexible and scal-
able. Ephemeral can be a good choice in most cases due to its flexibility and the fact
that it allows additional VMs to be attached to the port group even when vCenter
Server is offline.
This can be accomplished by configuring the port groups on the vDS for ephemeral
binding, which allows the administrator to connect VMs to the port group using
the vSphere Client connected directly to the ESXi host. Static binding and dynamic
binding do not allow such changes without involving vCenter Server.
ScenarioNetwork Sniffing
On a vDS, configure a new port group named Sniffer that allows a VM running
Wireshark to successfully inspect network I/O involving two other VMs connected to
two other port groups on the vDS whose VLANs are 101 and 102. Do not allow the
Wireshark VM to inspect any I/O from any other VMs, port groups, or VLANs.
This can be accomplished by adding a new port group named Sniffer to the vDS
and making the following settings:
Step 1. Select Inventory > Networking, and right-click the Sniffer port group.
Step 2. Select Edit Settings.
Step 3. Set the VLAN Type to VLAN Trunk.
Step 4. Enter 101, 102 in the VLAN text box.
Step 5. Click OK.
Step 6. Select Inventory > VMs and Templates, and then locate the Wireshark
VM.
Step 7. Right-click the Wireshark VM, and select Edit Settings.
Step 8. Select the network adapter, and change its connection to Sniffer port
group.
Step 9. Ensure that Connected and Connected at Power On are selected.
Step 10. Click OK.
Step 11. Select Inventory > Network, and select the vDS.
Step 12. Select the Ports tab, and locate the source and Wireshark VMs.
Step 13. For each of the source VMs, identify and record their port IDs. For ex-
ample, the port IDs of the VMs could be ports 11 and 21.
Chapter 2: Network Administration 83
Step 14. Identify the port ID of the Wireshark VM. For example, the port ID
could be 40.
Step 15. In the inventory view, right-click the vDS.
Step 16. Select the Port Mirroring tab, and then click Add.
Step 17. Specify a name for the port mirroring sessionfor example, use Wire-
shark.
Step 18. Select Allow normal I/O on destination ports.
Step 19. Click Next.
Step 20. Choose Ingress / Egress.
Step 21. Type the port IDs of the source ports, separated by commas. For exam-
ple, type 11, 21.
Step 22. Click Next.
Step 23. Click the >> link and enter the port ID of the Wireshark VMfor ex-
ample, type 40.
Step 24. Click Next.
Step 25. Click Finish.
Summary
This chapter described how to perform network administration in vSphere environ-
ments. It provided details on administration procedures involving the use of the
vSphere Client, the vCLI, and PowerCLI. At this point, you should ensure that you
can successfully apply the material in this chapter to perform network administra-
tion tasks in an actual vSphere environment.
Review Tasks
These Review Tasks allow you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a set
of tasks is provided instead of a set of questions. You should now attempt to perform
each of these tasks without looking at previous sections in this chapter or at other
materials, unless necessary. The steps for each task are located within the chapter.
Chapter 2: Network Administration 87
3. Build a vDS and host migrate all VMs, vmkernel ports, and network adapters
from an existing vSS.
4. Create a vSS, add a virtual switch port group, attach uplink adapters, and as-
sign VLANs using the esxcli namespace.
5. Configure a vSS to support LLDP and Jumbo Frames.
Storage Concepts
4. You are implementing multipathing using the Fixed multipathing policy. You
have an ESXi host with four available paths and four configured VMFS datas-
tores. How many paths will be used by the host to send data to the four datas-
tores?
a. 4
b. 8
c. 16
d. 1
5. When coordinating the VMware NMP and any installed third-party MPPs,
the PSA performs which two tasks? (Select two.)
a. If failover takes too long to complete, it interrupts the I/O to complete
failover.
b. Loads and unloads multipathing plug-ins.
c. Manages offload creation of linked clones.
d. Handles physical path discovery and removal.
92 VCAP5-DCA Official Cert Guide
RAID Levels
One concept that anyone taking the VCAP exam should already have is knowledge
of RAID, but in case you are not familiar with RAID or need a refresher, let us
begin the storage chapter by discussing RAID. The primary purpose of RAID is
to protect data from an underlying hardware failure. With every RAID level above
RAID-0, if a disk(s) fails, the RAID volume should continue to remain online and
usable. When there is a failure, the RAID volume will operate in a degraded mode
until the problem is fixed. The various RAID types available will vary depending on
the capabilities of the storage device connected to the ESXi host. Following are ex-
amples of some common RAID levels.
The advantage of Raid-0 is performance. You can use all of the disks. In addition,
striping allows for high data transfer rates because there will be no parity calcula-
tions.
Chapter 3: Storage Concepts 93
The disadvantage of Raid-0 is no redundancy. The loss of one physical disk drive
will result in the loss of all the data on all the striped disk drives.
Raid 1 (Mirroring)
The primary reason for using mirroring is to provide a high level of availability or
reliability. Mirroring provides data redundancy by recording multiple copies of the
data on independent spindles. The mirrored disk drives appear as one virtual disk
drive to the application. In the event of a physical disk drive failure, the mirror on
the failed disk drive becomes unavailable, but the system continues to operate using
the unaffected mirror or mirrors. The array management software takes duplicate
copies of the data located on multiple physical disk drives and presents one virtual
disk drive to the application. See Figure 3-2.
PLEX
PLEX
An advantage of Raid-5 is that the plex requires only one additional drive to pro-
tect the data. This means Raid-5 is less expensive to run than to mirror all the data
drives with Raid-1.
One of the limitations of Raid-5 is that you need a minimum of three disks to calcu-
late parity. In addition, write performance will be poor because every write is going
to require a recalculation of parity.
it. To identify an HBA such as a fibre channel adapter or a RAID controller, use the
esxcfg-scsidevs command. In the output in Figure 3-4, you can see an example of
an iSCSI HBA labeled as vmhba33.
Figure 3-4 Sample output showing the HBAs connected to an ESXi host.
Lazy-zeroed Thick
Key
The default virtual disk format used with VMFS datastores is the thick lazy-zeroed Topic
disk format. This is the traditional approach that preallocates the capacity of the
virtual disk from the VMFS Datastore as it is being created. The blocks and pointers
are allocated in the VMFS, but the blocks are not allocated on the array at the time
of creation. Also, the blocks are not zeroed or formatted on the array either. Thus,
the creation time is very fast because the data blocks are not zeroed out or format-
ted. At a later point in time when data needs to be written to the disk, the write
process must pause while the blocks required to store the data on the storage array
are zeroed out and allocated on the storage array. This operation occurs every time
a first-time-write needs to occur on any area of the disk that has not been written.
Thus, with the lazy-zeroed virtual disk type, the formatting and zeroing out of data
blocks happen during the write process. In addition, the lazy-zeroed thick
96 VCAP5-DCA Official Cert Guide
provisioning process can use VAAI with both SAN and NAS devices to improve the
disks first write performance by offloading the zeroing operation to the storage array.
Eager-zeroed Thick
The second virtual disk type is eager-zeroed thick disk, which is capable of provid-
ing better performance than a lazy-zeroed thick disk. Like lazy-zeroed thick, space
required for the virtual disk is allocated at creation time. However, the blocks and
pointers on the virtual disk are preallocated and zeroed out when the virtual disk is
created. Although this increases the virtual disk creation time, it improves the per-
formance of the virtual disk during regular use. When using a SAN that supports
VAAI, the zeroing of the blocks can be offloaded to the storage device, reducing the
time needed to create the virtual disk.
Thin Provisioned
The thin provisioning format is similar to the lazy-zeroed format in that the blocks
and pointers are not zeroed or formatted on the storage area at the time of creation.
In addition, the blocks used by the virtual disk are not preallocated for the VMFS
datastore at the time of creation. When storage capacity is required by the virtual
disk, the VMDK allocates storage in chunks equal to the size of the file system
block. The process of allocating blocks from within the datastore occurs on demand
any time a write operation attempts to store data in a block range inside the VMDK
that has not been written to by a previous operation. This process of allocating
blocks is considered a metadata operation. During this process any writes will be
suspended as the SCSI locks are imposed on the datastore. At a later point in time
when data needs to be written to the disk, the writes will pause as the blocks re-
quired to store data are zeroed out. Thin provisioning provides storage on demand,
and the amount of space consumed by the virtual disk on the VMFS datastore grows
as data is written to the disk. Thin-provisioning must be carefully managed, as
multiple virtual machines may be using thin provisioned disks on the same VMFS
datastore.
Thin provisioned and lazy-zeroed thick provisioned storage both suspend I/O when
writing to new areas of a disk that need blocks to be zeroed out. The difference with
thin provisioning is that the virtual disk might have to allocate additional capacity
from the datastore because it does not pre-allocate that capacity on creation. Table
3-2 identifies the differences between virtual disk options, including a comparison of
the time it takes to create the virtual disk type, how block allocation and zeroing are
performed and how the virtual disk is laid out on disk.
Chapter 3: Storage Concepts 97
All three types of virtual disk format types can be created using the vSphere Client
or the vSphere CLI. To create a virtual disk format type using the vSphere Client,
follow these steps:
Step 1. Right-click the Virtual Machine and select Edit Settings.
Step 2. From the Hardware tab, click Add > Hard Disk.
Step 3. At the Select a Disk window, select the radio button Create a new vir-
tual disk.
Step 4. The Create a Disk window appears, and you can specify the provisioning
policy, as shown in Figure 3-5.
RDM
Key
Topic Another virtual disk option is Raw Device Mapping. RDM allows a virtual machine
(VM) to directly utilize a LUN. Even though the two most common approaches for
a VM to access storage are done by using virtual disks created on VMFS or NFS
datastores, RDMs can be useful in certain situations. There are special cases where
the guest OS or application will not support a VMFS or NFS virtual disk. An ex-
ample of this is Microsoft Cluster Server, which requires a quorum disk that utilizes
the SCSI-3 protocol to provide clustering support. Because VMFS- or NFS-based
virtual disks do not support the SCSI-3 protocol, an RDM can be used to bypass the
VMware hypervisor and allow the VM to communicate directly with the LUN or
SCSI device. The capability of the RDM to directly assign a LUN to a VM is ac-
complished by using either its virtual SCSI adapter or DirectPath I/O.
The process of adding an RDM to a virtual machine can be done using the vSphere
client, like so:
Step 1. Right-click the VM and select Edit Settings.
Step 2. From the Hardware tab, click Add > click Hard Disk.
Step 3. On the device type page, select Raw Device Mappings.
Step 4. Select LUN.
Step 5. Select a datastore.
In Figure 3-6 the option to Select Compatibility Mode for the virtual disk of the
virtual machine is shown.
There are two different compatibility modes to choose from when creating an
RDM: physical compatibility mode (rdmp) or virtual compatibility mode (rdm). The
key difference between these two options is the amount of SCSI virtualization that
will occur at the VM level.
The physical compatibility (pass-through) mode is the default format. In this format
the SCSI commands pass directly through to the hardware during communication
between the guest operating system and the LUN or SCSI device. This allows for
unsupported features such as SCSI-3 clustering. Another use case is if the applica-
tion in the virtual machine is SAN-aware and needs to communicate directly to
storage devices on the SAN. However, this mode does not support virtual machine
snapshots, VMware cloning, and several other features that require hypervisor sup-
port.
Virtual compatibility mode supports a subset of SCSI commands to be passed
through the hypervisor for communication between the guest operating system and
a mapped physical raw LUN or SCSI disk. Virtual compatibility mode will fully
virtualize the mapped device, which enables an RDM virtual disk to appear to the
virtual machine as a typical VMFS-based virtual disk. Because this mode allows
some SCSI commands to be passed through the hypervisor, VMware features that
physical compatibility mode will not allow, such as VMware snapshots, cloning, or
storage migration, are supported.
In addition to allowing the pass through of SCSI commands for use cases previously
described, the use of an RDM can be beneficial for performance reasons. This is
due to the fact that a typical VMFS datastore is shared by multiple virtual machines,
which have to share the available I/O operations of the underlying LUN. Some
applications might have specific I/O requirements and might be critical enough to
require guaranteed I/O. An RDM is presented directly to a single virtual machine
and cannot be used by any other virtual machine; it also is presented with the I/O
characteristics defined by the storage administrator. It is important to note that
similar performance requirements can be gained by placing a single VM on a VMFS
datastore that fully utilizes the datastore.
A final reason to use RDMs is if you want to use N-Port ID Virtualization (NPIV),
which is covered in the next section.
interface card (NIC) to have multiple unique WWNs. NPIV also can be useful
if you need an ESXi host to have more Fibre Channel connections than VMware
normally would allow. Thus, you can go beyond the maximum number of 8 HBAs
allowed per host or 16 HBA ports per host. Finally, unique WWPNs can be used
with SAN management software to provide storage visibility to each VM.
NOTE NPIVworks only if the VM has an RDM disk attached, and the HBA and
switch used to access the storage must be NPIV-aware.
To begin using NPIV, right-click the virtual machine and select Edit Settings.
This opens the Properties window of the VM. In the Properties window, click
the Options tab and highlight the Fibre Channel NPIV setting. By default, no
WWNs are assigned. To assign WWNs to the virtual machine, click the radio but-
ton Generate new WWNs and, using the drop-down boxes, decide how many
WWNNs and WWPNs to assign; then click Next. Next time you go back to the
Options tab of the VM, you will see the new WWNs. An example of this is shown
in Figure 3-7. Notice in the screenshot the virtual machine now has a Node WWN
and a Port WWN.
select Advanced Settings. The DirectPath I/O Configuration page then displays, as
shown in Figure 3-8.
In addition, there are situations where a hardware device needs to bypass the hy-
pervisor. This need to use vSphere DirectPath I/O could be due to the hardware
not yet being supported by vSphere, such as an early release of 40 Gbe or 100 Gbe
network card. Even though the hardware is not yet supported, there is still a need to
test and use the PCI or PCIe device. When DirectPath I/O is enabled, it allows the
guest operating system of the virtual machine to bypass the hypervisor and directly
access the physical device. In the case of networking, DirectPath I/O enables the
virtual machine to access a physical NIC rather than using an emulated device (such
as the E1000) or a paravirtualized device (such as VMXNET3). DirectPath I/O for
vSphere 5.0 has been enhanced to allow the vMotion of a virtual machine containing
DirectPath I/O network adaptors on the Cisco Unified Computing System (UCS)
platform. A common use for DirectPath I/O continues to be to reduce CPU usage
for network intensive applications using 10 Gbe network cards.
Key
vCenter Server Storage Filters
Topic
vSphere provides filters that optimize the use of storage in a mutlihost environment
managed by vCenter Server. The vSphere environment provides four storage filters
that can affect the action of the vCenter Server when scanning storage. Without
these filters, when vCenter Server is scanning for storage, all storage that is found
Chapter 3: Storage Concepts 103
could be presented to vSphere, even if it is in use. The filters prevent this type of
unwanted activity. However, some specific use cases can affect the storage devices
that are found during scanning. By default, the storage filters are set to true and are
designed to prevent specific storage datastore problems. Except for in certain situ-
ations, it is best to leave the storage filters in their enabled state. Table 3-3 displays
the vCenter Server storage filters and their respective Advanced Setting keys.
RDM filterFilters out LUNs that have been claimed by any RDM on any
ESXi host managed by vCenter Server. This storage filter can be used in a
situation such as when using Microsoft Cluster Server. When set to false, the
filter is disabled, allowing a LUN to be added as an RDM, even though the
LUN is already being utilized as an RDM by another VM. To set up a SCSI-3
quorum disk for MSCS, this storage filter would need to be disabled.
VMFS filterFilters out LUNs that have been claimed and VMFS format-
ted on any ESXi host managed by vCenter Server. Thus, in the vSphere client
when you go to the Add Storage Wizard, you will not see any VMFS-format-
ted LUNs. If the setting is switched to false, the LUN would be seen as avail-
able by the vSphere Client, and any ESXi host could attempt to format it and
claim it.
Host rescan filterBy default, when a VMFS volume is created, an auto-
matic rescan occurs on all hosts connected to the vCenter Server. If the setting
is switched to false, the automatic rescan is disabled when creating a VMFS
datastore on another host. As an example, you could run a PowerCLI cmdlet
to add 100 datastores; you should wait until the cmdlet is finished before scan-
ning all the hosts in the cluster.
Same host and transports filterFilters out LUNs that can not be used as
VMFS datastore extents due to host or storage incompatibility. If the setting
is switched to false, an incompatible LUN could then be added as an extent to
an existing volume. An example of an incompatible LUN would be adding a
LUN as an extent that is not seen by all of the hosts.
104 VCAP5-DCA Official Cert Guide
NOTE All storage filters are enabled (TRUE) and are not listed in the Advanced
Settings by default.
Figure 3-9 displays the vCenter Server Advanced Settings screen, which is where
storage filters can be enabled or disabled. This screen can be reached from the
vSphere Client by selecting Administration > vCenter Settings > Advanced Set-
tings. To disable a filter, it must first be added to the Advanced Settings. At the
bottom of the window in the Key box, type in one of the four storage filters and add
the Value of false to enable the storage filter.
Figure 3-10 Listing of the datastore named Shared that shows its UUID.
A change in the host LUN or SCSI device type causes the VMFS volumes UUID
to require a new signature. The ESXi host will notice that the LUN and the
signature do not match. The result of a mismatch is that the ESXi host needs to re-
signature the VMFS datastore and assign a new UUID.
NOTE A UUID is stored in the metadata of the inode on a VMFS datastore. Be-
cause an NFS datastores inode resides on the storage device, it does not have a
UUID.
One of the main reasons that a VMFS datastore needs to be re-signatured is when a
disaster recovery (DR) event occurs. There are two ways to look at a DR event
either an actual DR event is occurring or you are performing a DR test. If an actual
DR event is occurring, there is no need to re-signature the VMFS datastore. When
an actual DR event occurs, the primary site is no longer functioning, so there is no
need to worry about a second datastore with the same UUID. LUNs at the recovery
site will be given the same UUID, and there will be no worry about a conflict.
On the other hand, a DR test could lead to an issue. If you are using VMwares DR
product called Site Recovery Manager (SRM), re-signaturing is not a concern. SRM
has a built-in capability to alleviate any UUID issues. If you are not using SRM, the
LUN that is copied and re-created at the recovery site will have the same signature
as the datastore at the primary site. This creates a problem where the hosts could see
two datastores with the same UUID. If two datastores are mounted with the same
UUID, the ESXi host will not know on which VMFS datastore to perform read and
106 VCAP5-DCA Official Cert Guide
write operations, which could lead to corrupted data. Therefore, you need to use
datastore re-signaturing to assign a new UUID and a new label to the datastore copy
at the recovery site and mount the datastore copy as a new distinct VMFS datastore.
For vSphere to take advantage of VAAI, the storage array has to support VAAI
hardware acceleration. One way to check whether the storage array is supported for
VAAI hardware acceleration is to check the Hardware Configuration List. It lists
Chapter 3: Storage Concepts 107
all supported storage arrays. Hardware acceleration for VAAI is supported for both
SAN and NAS storage devices.
You can easily check in vSphere whether the storage supports VAAI hardware accel-
eration. In the Figure 3-12 inventory panel, select the ESXi host, click the Configu-
ration tab, and then select Storage under Hardware. The hardware acceleration
status can be seen in the Datastores View.
108 VCAP5-DCA Official Cert Guide
The three possible values for Hardware Acceleration are Supported, Unknown, and
Not Supported. The initial value is Unknown, and it changes to Supported after the
host successfully performs the offload operation. However, if the offload operation
fails, the status changes to Not Supported.
The NFS datastore have an initial value of Not Supported and become Supported
when the storage performs an offload operation.
When storage devices are not supported or provide partial support for the host op-
erations, then the host reverts to its native SCSI-2 methods to perform operations.
In Figure 3-16 currently no virtual machines are associated with the Production
storage profile. Before we can associate virtual machines with the storage profile, we
112 VCAP5-DCA Official Cert Guide
need to enable the ESXi hosts to use virtual machine profiles. In the taskbar shown
in Figure 3-16, click Enable VM Storage Profile.
After you enable storage profiles for the ESXi hosts, it is time to associate a stor-
age profile with a virtual machine. Go back to the VMs and Templates inventory
view, and right-click the virtual machine you want to associate with a storage profile.
Select VM Storage Profile > Manage Profiles. The Virtual Machine Properties
window appears and the Profiles tab is displayed. Underneath Home VM Storage
Profile, select the storage profile with which you want to associate the VM. In this
example you would select the Production Storage Profile and click OK. When
you click the Summary tab of the virtual machine after a storage profile has been
applied, as shown in Figure 3-17, you might notice that the virtual machines Pro-
files Compliance is Noncompliant. This occurs if the current storage on which
the VM is located is not in compliance with the attached profile. To get more infor-
mation, you can click Noncompliant. In this case, the detail would state that there
is a capability mismatch, which confirms that the storage on which the VM is lo-
cated is not compliant with the profile.
To resolve this problem, the VM needs to be moved to compliant storage. To do
so, right-click the virtual machine in the inventory and select Migrate. Select the
option that allows you to migrate the VM to another datastore. The Storage screen
shown in Figure 3-18 lets you select a VM Storage Profile. Select the appropriate
profile, and the list of datastores will be filtered to show which datastores are
Chapter 3: Storage Concepts 113
compatible with the chosen profile. Selecting a compatible datastore begins the
process of storage migration and moves the virtual machines files to the compliant
datastore. After the migration is finished, click Refresh, and the Profiles Compli-
ance for the VM should now say Compliant.
Figure 3-19 Enter Storage DRS Maintenance mode and unmount a datastore.
Another option to place a datastore into maintenance mode is to unmount the datas-
tore. When you unmount a datastore that is shared to multiple ESXi hosts, you will
be prompted with a list of the shared hosts. The datastore will be unmounted from
all selected hosts and will no longer be visible to those hosts. The datastore will re-
main mounted to the other hosts, allowing them to continue to access the data on
the datastore. In Figure 3-19 you can see the Unmount option for the datastore.
Chapter 3: Storage Concepts 115
When maintenance has been finished on the storage device, you can use the Mount
option to reconnect to the data.
The upgrade will be very fast, but the problem is that you have very limited
VMFS-5 capabilities. Also, after you upgrade a datastore, you can not revert to
the previous version. You are better off upgrading the datastore by using Storage
vMotion to vacate the datastore and reformatting it because it is then treated as if
you created a brand-new VMFS-5 datastore.
116 VCAP5-DCA Official Cert Guide
You can also create a custom alarm by navigating to the Datastores and Datastore
Clusters view. Highlight a datastore or an object where you want a new datastore
alarm created in the hierarchical view, and then click the Alarms tab. In the Defini-
tions view, right-click underneath the header fields and select New Alarm.
118 VCAP5-DCA Official Cert Guide
The Alarm Settings window will then be displayed, as shown in Figure 3-22. Select
the General tab if it is not already displayed, and begin creating an alarm by provid-
ing a name. Next, choose which type of alarm you are setting up by selecting one of
the two radio buttons. If you select the Monitor for specific conditions or state
radio button, the types of triggers you can set up are shown on the Triggers tab in
Figure 3-22.
Figure 3-22 Triggers available when you choose the Monitor for specific conditions or
state radio button.
If you choose the other radio button in the General tab, which is Monitor for
specific events occurring on this object, youll have a lot more Event triggers to
choose from. Some of these triggers are shown in Figure 3-23.
You can monitor available capacity on a datastore by setting up a condition or state
trigger, which is set up at the datacenter level. This trigger will create an alarm
when the datastore disk usage is above the configured levels. In Figure 3-24 you can
see that the Warning trigger is set for above 75% and the Alert trigger is set for
above 85% usage. You can modify these values for your own environment.
Chapter 3: Storage Concepts 119
Figure 3-23 Triggers available when you choose the Monitor for specific events radio
button.
Figure 3-25 Creating a datastore cluster, with the option to turn on Storage DRS.
The SDRS Runtime Rules screen is where you define all the values for the Storage
DRS thresholds. The configuration options are shown in Figure 3-27. You begin by
either checking or not checking the Enable I/O metric for SDRS recommenda-
tions box. If this option is checked or enabled, then Storage I/O Control is enabled
on all datastores in the cluster. If the box is not checked or disabled, then the initial
placement for VMs files based on IOPS and IOPS load balancing will not be sup-
ported. In this case, SDRS will still use storage capacity when doing initial place-
ment and load balancing recommendations for virtual machines files.
The two Storage DRS thresholds are Utilized Space (Capacity) and I/O Latency.
When these thresholds are met by storage, a recommendation for Storage vMotion
or a Storage vMotion action will occur.
You can click the Show Advanced Options link to view advanced options that can
be modified. The first option is No recommendations until utilization differ-
ence between source and destination is. This setting is designed to prevent un-
necessary storage migrations where the capacity adjustment would provide minimal
benefit. The value set here will determine the minimum amount of capacity differ-
ence between datastores that must be met before a migration is recommended or
performed. Thus, if the setting was 15% and the source was at 80% utilization, the
target would have to have 65% or less capacity utilization before action would be
taken.
The next option is Check imbalances every. This option defines how often Stor-
age DRS checks for IOPS latency, which by default is every 8 hours and can be
modified. However, you should not set it too small because every check causes an
elevated level of CPU activity on both vCenter Server and the ESXi hosts con-
nected to the Datastore Cluster. The Utilized Space or capacity is checked every
5 minutes. The last option is I/O imbalance threshold, which helps to determine
the amount of imbalance that Storage DRS should tolerate. An aggressive setting
would result in an increased number of storage migrations, so adjust this setting
with care.
Chapter 3: Storage Concepts 123
As shown in Figure 3-28, highlight the ESXi host in the vSphere Client. Click the
Configuration tab and select Storage Adapters; then click Add. The Add Storage
Adapter window will appear, and you should click OK to create the Software iSCSI
Adapter.
The next step in configuring iSCSI and port binding is to create the number of
desired VMkernel ports and ensure that the same number of network adapter ports
are available and can see the iSCSI storage. When this is done, a 1:1 relationship
must be established between each VMkernel port and the corresponding network
adapter port. By default, the port group policy for network adapters is set to Active.
This setting attempts to use any and all adapter ports for traffic, which is not desired
when configuring port binding. To resolve this, select the Override switch failover
order option and ensure that the only active adapter port for the VMkernel is the
desired port; then move all other ports to Unused. Repeat this process for each
VMkernel port configured for iSCSI use.
The final step is to bind the adapter ports to the iSCSI initiator. To do this, click
the Properties of the Software iSCSI Adapter. In the iSCSI Initiator Properties
dialog box, click the Network Configuration tab. Click Add and select a VMker-
nel adapter to bind with the iSCSI adapter. Repeat this process for each VMkernel
adapter that will be used with the iSCSI adapter.
MPP
The top-level plug-in in PSA is the Multipathing Plug-in (MPP). The MPP can be
either the internal MPP, which is called the Native Multipathing Plug-in (NMP),
or a third-party MPP supplied by a storage vendor. Examples of third-party MPPs
are Symantec DMP and EMC PowerPath/VE. Therefore, all storage is accessed
through an MPP, whether it is VMwares built-in MPP or one of the third-party
MPPs. The MPP combines NMP+SATP+PSP, which are really the pieces that
make up the process.
As an example, I have a Netapp storage array I want to connect to VMware. I first
make sure that the Netapp array is supported by VMware by checking the Hardware
Compatibility List (HCL). If it is on the support list, I could simply use the built-in
NMP, which will handle all the multipathing and load balancing. The other option
is to switch to Symantecs DMP, which is a supported third-party MPP. Symantecs
Dynamic Multipathing solution can handle the path discovery and path manage-
ment of the ESXi host to the Netapp storage array. This third-party MPP solution
might provide better load-balancing performance than the built-in solution.
NMP
The Native Multipathing Plug-in (NMP) is the default MPP in vSphere and is used
when the storage array does not have a third-party MPP solution. VMware has a
default claim rule that applies to storage that has not been claimed by a claim rule;
it defaults to NMP. The NMP will contain a Storage Array Type Plug-in (SATP)
and a Path Selection Plug-in (PSP). One of the tasks of NMP is to associate physical
storage paths with an SATP and associate a PSP that chooses the best available path.
126 VCAP5-DCA Official Cert Guide
SATP
VMware provides a Storage Array Type Plug-in (SATP) for every type of array
that VMware supports in the HCL. As an example, VMware provides an SATP for
supported storage arrays such as the IBM SVC, which uses the VMW_SATP_SVC
Storage Array Type Plug-in provided by VMware. The SATP monitors the health
of each physical path and can respond to error messages from the storage array to
handle path failover. There are third-party SATPs that the storage vendor can pro-
vide to take advantage of unique storage properties.
PSP
The Path Selection Plug-in (PSP) performs the task of selecting which physical path
to use for storage transport. One way to think of PSP is which multipathing solu-
tion you are using to load balance. There are three built-in PSPs: Fixed, MRU, and
Round Robin (which was added with vSphere 4.1). The NMP assigns a default PSP
from the claim rules based on the SATP associated with the physical device. If you
need to override the default PSP, you would create a claim rule to assign a different
PSP to the device.
Figure 3-29 Using an esxcli command to list the current SATPs and their default PSP.
Chapter 3: Storage Concepts 127
Using esxcli commands, you can modify the default PSP for an SATP, as shown in
Key
Figure 3-30. Any device that is currently using an SATP that is going to be modified Topic
will have to have all its paths unclaimed and then reclaimed. The following esxcli
command changes the default Path Selection Plug-in for the VMW_SATP_CX
SATP from MRU to Round Robin.
# esxcli storage nmp satp set s VMW_SATP_CX P VMW_PSP_RR
For this modification to take effect, you still must reboot the ESXi host. After the
default PSP has been changed, you can execute the satp list command to verify that
the default PSP has been changed:
# esxcli storage nmp satp list
Figure 3-30 Using an esxcli command to modify a PSP plug-in to Round Robin.
host can see a particular LUN. Thus, LUN masking can be used to make a LUN
available to some hosts and unavailable to other hosts.
The most common place to do LUN masking is on the back-end storage array. For
example, Netapp implements LUN masking through initiator groups, or if you are
using an EMC Clarion or VNX device, LUN masking is provided through storage
groups. Both methods use the same concept in which you add host(s) and a LUN to
the initiator group or storage group and only those ESXi host(s) can see the LUN.
A virtual SCSI bus will be created whether you use an initiator group or a storage
group. Best practice is to set up LUN masking on the storage array. The exam will
only look at setting up LUN masking on the ESXi host using the vSphere CLI.
When you power on an ESXi host or manually choose to rescan for storage devices,
the ESXi host will send a signal down the physical bus paths and discover any stor-
age available to the host. The ESXi host will then assign each storage device an
MPP based on the claim rules listed in the /etc/vmware/esx.conf file. When the
storage device has a proper MPP assigned, the multipathing driver will be respon-
sible for managing the path selection for the storage device. By default, every 5 min-
utes the ESXi host will resend a signal down the physical bus paths looking for any
unclaimed paths to be claimed by the appropriate MPP. This process of associating
a storage device with a plug-in is referred to as claiming the device, and the MPP
claims a storage device by finding an appropriate claim rule in the /etc/vmware/
esx.conf file.
The process of LUN masking using PSA commands begins by identifying which
LUN you want to mask. The command line esxcfg-scsidevs m will display LUNs
with VMFS volumes, which is shown in Figure 3-31. The VMFS datastore named
Shared is listed here. Using the Shared datastore as an example, we find the device
id for the datastore which will begin with naa:
naa.6000eb3a2b3b330e00000000000000cb
Figure 3-31 The esxcfg-scsidevs m command enables you to find the device ID.
Now that we have the device ID of the datastore, it will need to be copied. The next
step is to find all the paths to the LUN. Using the esxcfg-mpath L command and
the device ID of the datastore, we discover there is one path to the LUN, which is
shown in Figure 3-32.
Chapter 3: Storage Concepts 129
Figure 3-32 The esxcfg-mpath L command shows all of the paths the device ID.
From the output of the esxcfg-mpath L command, we see the path to the
datastore. Now that we have the path to the datastore C0:T4:L0, we can create a
new claim rule. To get a list of the current claim rules, use the esxcli storage core
claim rule list command, as shown in Figure 3-33.
Figure 3-33 List the current claim rules for an ESXi host.
Figure 3-33 shows the list of the current claim rules on the ESXi host. You can use
any claim rule number that is not being used, with the exception of rules 0100,
which are reserved for VMwares internal use. By default, the PSA claim rule 101
masks Dell array pseudo devices and should not be removed unless you need to un-
mask these types of devices. Claim rules can be created a number of ways, including
manually masking based on the HBA adapter (C:#T:#L:#).
Claim rules can also be created based on the following options:
Vendor StringA claim rule can be set up using the Vendor string, which
must be an exact match. An example would be vendor=DELL.
Model StringA claim rule can be set up using the Model string, which
must be an exact match. An example would be model=Universal Xport.
Transport typeA claim rule can be created to mask all LUNs based on the
transport type. Valid transport types are block, fc, iscsi, iscsivendor, ide, sas,
sata, usb, parallel, and unknown.
130 VCAP5-DCA Official Cert Guide
Driver typeA driver name is an option that can be used to create a claim
rule. An example of listing all the drivers that can be used in a claim rule can
be seen in Figure 3-34. You can set up a claim rule masking all paths to devices
attached to an HBA using a driver such as the iscsi_vmk driver.
Here is an example of creating a claim rule using a transport type. This example of
Key
Topic masking all LUNs that are of transport type fibre channel is shown in Figure 3-34.
The example uses rule number 200 because it was not being used and is greater than
100. The first two lines in Figure 3-34 show the successful addition of the claim rule
because no error message was given. Line two shows loading the claim rule into the
runtime environment. The third line shows that because multipathing was not set
up, the host did not want to disconnect the last path. Fortunately, when all the claim
rules are listed in the fifth line, we do see that the claim rule was successfully added.
This success can be seen by looking at the Class field shows file status for the new
rule 200.
Figure 3-34 Steps showing LUN masking for all FC devices on an ESXi host.
One final step is needed because the fibre channel paths originally were claimed
by the default NMP plugin (rule 65535). The command shown in Figure 3-35 will
unclaim all the paths that are currently claimed by NMP and then reclaim any un-
claimed paths using runtime rules.
Figure 3-35 The esxcli command that reclaims unused paths for the LUN.
Chapter 3: Storage Concepts 131
Removing a claim rule is shown in Figure 3-36. The example given is removing
rule number 200 that was created to mask fibre channel devices. After the rule is
removed, a command needs to be run to unclaim and then reclaim a supported plug-
in for the device. Finally, a command is run to load the claim rules into the runtime
environment.
Figure 3-37 shows the command to display all the drivers that are loaded on the
ESXi host. You can use the information provided to create a claim rule that will
mask whichever driver you want to exclude from the ESXi host. The output of Fig-
ure 3-37 shows there are two drivers that could be masked: ata_piix and iscsi_vmk.
Figure 3-37 The command-line output shows the drivers loaded on the ESXi host.
132 VCAP5-DCA Official Cert Guide
Multipathing Policies
The PSA is used to take control of the path failover and load-balancing operations
for specific storage devices. These multipathing operations do not apply to NFS,
which relies on networking over multiple TCP sessions. PSPs are included with the
VMware NMP that determine the physical path for I/O requests. By default, three
PSPs are included with vSphere: Round-Robin, MRU, and Fixed. They are ex-
plained here:
Round Robin - VMW_PSP_RR
The ESXi host uses an algorithm that rotates through all the active paths and
can be used with active-active and active-passive arrays. On supported arrays
multiple paths can be active simultaneously; otherwise, the default is to rotate
between the paths.
Most Recently Used (MRU) VMW_PSP_MRU
The ESXi host selects the path that was most recently used. If the active path
fails, then an alternative path will take over, becoming active. When the origi-
nal path comes back online, it will now be the alternative path. MRU is the
default for most active-passive storage arrays.
Fixed VMW_PSP_FIXED
The ESXi host uses a designated preferred path, if it has been configured.
Otherwise, it selects the first working path discovered at boot time. Fixed is
the default for active-active storage arrays.
Summary
This module discussed how to implement and manage storage in a vSphere environ-
ment. The two main datastore types are NFS, which is file based, and VMFS, which
is block based. The NFS datastore uses the storage device to format the storage,
and VMware accesses the NFS data in a file format. The VMFS datastore needs a
LUN to be created on the storage array and formatted by vSphere with VMFS. The
VMFS datastore can be created with three virtual disk formats: lazy-zeroed thick,
eager-zeroed thick, or thin provisioned. The default VMFS format is lazy-zeroed
thick.
The chapter also looked at other features that can affect storage such as VMware
DirectPath I/O, RDM, vCenter Server Storage Filters, and others. In addition, the
module discusses VASA and VAAI and how the two APIs perform important tasks
for storage.
Finally, the section on the Pluggable Storage Architecture (PSA) helped to define
how multipathing works within vSphere. PSA provides the structure that can associ-
ate storage with multipathing drivers.
Chapter 3: Storage Concepts 135
Key Terms
Define the following key terms from this chapter, and check your answers in the
glossary.
Review Tasks
These Review Tasks allow you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a set
of tasks is provided instead of a set of questions. You should now attempt to perform
each of these tasks without looking at previous sections in this chapter or at other
materials, unless necessary. The steps for each task are located within the chapter:
1. Create a user-defined storage capability.
Performance
This chapter is intended to provide you with the knowledge and skills to suc-
cessfully execute performance tuning, optimization, and troubleshooting. It
is also intended to ensure that you have the skills to successfully complete the
performance analysis, configuration, and troubleshooting tasks that might be
part of the VCAP5-DCA exam. As you read this chapter, take time to practice
the steps that are provided until you are confident that you can perform such
tasks quickly and without any assistance. Some of these steps involve using the
vSphere Client. Others involve using the vCLI and PowerCLI.
1. Which option summarizes the steps that can be taken to ensure that an ESXi
host supports SplitRx Mode?
a. Select the ESXi host, navigate to Configuration tab > Advanced Set-
tings, and set Net.NetSplitRxMode = true.
b. Select the ESXi host, navigate to Configuration tab > Advanced Set-
tings, and set SplitRx-Mode = true.
c. Select the ESXi host, navigate to Configuration tab > Advanced Set-
tings, and set Net.NetSplitRxMode = 1.
d. Select the ESXi host, navigate to Configuration tab > Advanced Set-
tings, and set SplitRx-Mode = true.
2. Which option summarizes the steps that can be taken to calculate the available
remaining memory resources in a DRS cluster that are not reserved for VMs
or resource pools?
a. Choose the cluster, navigate to Performance tab > Overview Graphs,
and select the Available Memory graph.
b. Choose the cluster, navigate to Performance tab > Overview Graphs,
select the Memory Usage graph, and manually calculate the available
memory by subtracting Memory Used in the graph from the known total
memory capacity of the cluster.
c. Choose the cluster and navigate to the Resource Allocation tab.
d. Choose the cluster and navigate to the DRS tab.
3. Which option summarizes the steps that can be taken to save a custom profile
in RESXTOP?
a. Press the W key and enter a filename at the prompt.
b. Press the w key and enter a filename at the prompt.
c. Press the P key and enter a filename at the prompt.
d. Press the p key and enter a filename at the prompt.
Chapter 4: Performance 141
4. Which option summarizes the steps that can be taken to determine whether a
Windows VM needs to be resized with more memory?
a. Use the vSphere Client to determine whether ballooning is high for the
VM.
b. Use esxtop to determine whether the SWCUR value is higher than zero
for the VM.
c. Use the vSphere Client to determine whether memory compression or
swapping is occurring on the ESXi host where the VM is running.
d. Log in to the Windows VM and use Windows Performance Monitor to
determine whether Pages per Second is high.
5. Which option summarizes the steps that can be taken using the ESXi Shell to
display configuration and statistics for a dvSwitch?
a. Use the esxcli network dvswitch namespace.
b. Use the esxcfg-dvswitch command.
c. Use the esxcli network core dvs namespace.
d. Use the net-dvs command.
6. Which option summarizes the steps that can be taken to identify all the iSCSI
adapters in an ESXi host?
a. Use the vSphere Client to navigate to Configuration tab > Storage >
iSCSI Adapters.
b. Use the esxcli iscsi adapter list command.
c. Use the esxcli storage adapter iscsi list command.
d. Use the esxcfg-iscsi l command.
7. Which option summarizes the steps that can be taken to restart the vCenter
agent on an ESXi host?
a. In the ESXi Shell, enter restart vpxa.
b. In the ESXi Shell, enter /etc/init.d/vpxa restart.
c. In the ESXi Shell, enter restart hostd.
d. In the ESXi Shell, enter /etc/init.d/hostd restart.
142 VCAP5-DCA Official Cert Guide
Foundation Topics
features and to allow sufficient space to run VMs. Ensure that each ESXi host has
sufficient memory resources to meet the peak concurrent demand of its VMs and
system services.
Usually, the performance of VMs can be significantly enhanced when hardware-
assisted memory management unit (MMU) virtualization is used. Hardware-assisted
MMU virtualization is a feature provided by CPUs and is implemented by Intel
using extended page tables (EPTs) and by AMD with rapid virtualization indexing
(RVI). Hardware-assisted MMU virtualization provides an additional level of page
tables in the hardware that maps VM memory (what the guest operating system per-
ceives to be physical memory) to actual host physical memory (commonly called ma-
chine memory). ESXi hosts that utilize hardware-assisted MMU virtualization do not
need to maintain shadow page tables, thus reducing overhead memory consumption
and improving the performance of workloads in VMs. VMware recommends that
when available, set the system BIOS of the ESXi host to enable hardware-assisted
MMU virtualization.
The performance benefit of hardware-assisted MMU virtualization can be negated
if a VMs workload causes a high frequency of misses in the hardware translation
lookaside buffer (TLB) because the time required for the ESXi host to service a
TLB miss is increased in the absence of shadow page tables. In most cases, the ad-
ditional cost to accommodate TLB misses can be overcome by configuring the guest
O/S in the VM and the ESXi host to utilize large pages, which is covered in the
Modify Large Memory Page Settings section of this chapter.
Some systems that support non-uniform memory architecture (NUMA) provide
a BIOS option to enable node interleaving. In most cases, VMware recommends
disabling node interleaving, which effectively enables NUMA and enables ESXi to
optimally place each page of each VMs virtual memory.
The BIOS of some ESXi host systems that utilize ECC memory can contain an
option to set the memory scrub rate. In these cases, set the memory scrub rate to
match the manufacturers recommendations, which is typically the default setting.
Memory overhead is required for the VMkernel and host agents, such as hostd and
vpxa. A new feature in ESXi 5.1 enables the use of a system swap file, which allows
up to 1GB of this memory overhead to be reclaimed when the host is under memory
pressure. This feature is not enabled by default but can be enabled using an
ESXCLI command. For example, to create and enable a system swap file on a
datastore named Local-01, the following command can be used:
esxcli sched swap system set d true n Local-1
144 VCAP5-DCA Official Cert Guide
NOTE The system swap file is unrelated to the standard VM swap file (VSWP) file,
which is used to enable the VMs guest O/S to consume less physical memory than
the configured memory.
Memory overhead is also required for each running virtual machine. The per-VM
memory overhead supports the following VM components:
VM executable (VMX) process, which is needed to bootstrap and support the
guest O/S
VM monitor (VMM), which contains data structures that are used by the vir-
tual hardware, such as the TLB, memory mappings, and CPU state
Virtual hardware devices, such as mouse, keyboard, SVGA, and USB
Other subsystems, such as the kernel and management agents
Although the memory requirements for the VMM and virtual devices are fully re-
served at the moment the VM is started, the memory reserved for the VMX process
can be reduced by the use of VMX swap file. The size of the VMX swap file is typi-
cally less than 100MB. Its use typically reduces the VMX memory reservation from
about 50MB or more per VM to about 10MB per VM. By default, the ESXi host
automatically creates a VMX swap file for each VM in the VMs working direc-
tory, but this can be controlled by setting a value for the sched.swap.vmxSwapDir
parameter in the VMX file. The sched.swap.vmxSwapEnabled parameter can be
set to FALSE in a VMs VMX file to prevent it from using a VMX swap file. To
set these parameters, click the Configuration Parameters button located on the
Options tab of the VMs Properties pages. In the Configuration Parameters
dialog box, search the Name column for the name of the parameter. If it exists, then
modify its value. Otherwise, use the Add Row button to create a row for the param-
eter. When adding a row, be sure to enter the parameter name and value carefully.
For example, to modify a VM, such that its VMX swap file is stored in a datastore
named Local-01, add a row to the Configuration Parameters, where the parameter
name is sched.swap.vmxSwapDir and the value is /vmfs/volumes/Local-01/, as illus-
trated in Figure 4-1.
To verify success, power on the VM and use the vSphere Client to examine the
VMs files on the Local-01 datastore using the Datastore Browser, as illustrated in
Figure 4-2.
Chapter 4: Performance 145
NOTE The VMX swap file is unrelated to the standard VM swap file (VSWP) file,
which is used to enable the VMs guest O/S to consume less physical memory than
the configured memory.
146 VCAP5-DCA Official Cert Guide
In some rare cases, Direct I/O might be desired to meet the high throughput de-
mand of a virtual machine. In these cases, ensure that the BIOS settings of the ESXi
Chapter 4: Performance 147
and system services. VMware recommends using modern CPUs that provide the lat-
est features, such as hardware-assisted virtualization.
The performance of VMs can be significantly enhanced whenever hardware-assisted
instruction set virtualization is used. Instruction set virtualization is a feature pro-
vided by CPUs that support Intel VT-x or AMD-V, where the hardware traps sensi-
tive events and instructions eliminating the need for hypervisor to do so. VMware
recommends that when available, set the system BIOS of the ESXi host to enable
hardware-assisted instruction set virtualization. As mentioned in other sections,
VMware also recommends enabling the hardware-assisted MMU virtualization fea-
tures: Intel EPT and AMD RVI.
VMware also recommends making the following settings in the system BIOS when
Key
Topic available:
Enable all installed CPU sockets and cores.
Enable Intel Turbo Boost, which allows the CPU to run at faster than its
thermal design power (TDP) configuration specified frequency whenever the
hypervisor requests the highest processor performance state and the CPU is
operating below its power, current, and temperature limits.
Enable hyperthreading, which allows each core to behave as two logical CPUs,
permitting two independent threads to run concurrently on the core.
Disable any devices that will not be utilized. For example, if the system in-
cludes a serial port that you plan to never use, disable it in the BIOS.
Ensure that only supported host bus storage adapters (HBAs) are installed and that
each HBA is installed in slots with enough bandwidth to support their expected
throughput. For example, a dual-port 16 Gbps Fiber Channel HBA should be in-
stalled in, at a minimum, a PCI Express (PCIe) G2 x8 slot, which can support up
to 40Gbps in each direction. Ensure that the maximum queue depth of the HBA is
configured to meet manufacturer and VMware recommendations, which are unique
depending on the combination of ESXi version and HBA model and version. Here
are some useful examples of using ESXCLI commands to manage HBA queue depth:
To view all currently loaded modules, use this command:
esxcli system module list
Key
Topic
To view all currently loaded Qlogic HBA modules, use this command:
esxcli system module list | grep qla
To view all currently loaded Emulex HBA modules, use this command:
esxcli system module list | grep lpfc
To view all currently loaded Brocade HBA modules, use this command:
esxcli system module list | grep bfa
To determine the current queue depth for an HBA, first use the vSphere Client to
navigate to the Storage Adapters configuration page for the ESXi host and iden-
tify the device name of the HBA. Then use the esxtop command to determine the
queue depth size. For example, to determine the queue depth for vmhba33, the fol-
lowing steps can be used:
1. In the ESXi Shell, enter esxtop.
4. Press the d key to select the Queue_Stats field. Press the f and g keys to hide
two other columns.
5. Examine the value for the AQLEN field for device vmhba33, as illustrated in
Figure 4-5.
The name of the parameter to set the queue depth on an HBA depends on the HBA
module. To determine the available parameters for a particular HBA module, use
the esxcli system module parameters list command. For example, to list the avail-
able parameters for the qla2xxx module, use this command:
esxcli system module parameters list -m qla2xxx
In this example, by examining the results you might determine that the appropriate
parameter name is ql2xmaxqdepth. To set the maximum queue depth for the qla2xxx
module, use this command:
esxcli system module parameters set -p ql2xmaxqdepth=64 -m qla2xxx
VMware recommends maintaining uniform configuration settings for all the HBAs
used in an ESXi host cluster. You should ensure that any changes to a specific
HBAs queue depth in one ESXi host is also implemented to all identical HBAs
throughout that host and all hosts in the cluster.
knowledge of the exact parameter name and its acceptable values. The administrator
should enter parameter names and values carefully. All parameters that are added
and all values that are set using this dialog box are automatically added to the VMs
VMX file.
To test this, use the Options tab of the VMs Properties page to modify the CPU/
MMU Virtualization attribute. Set its value to Use Intel VT/AMD-V for
instruction set virtualization and software for MMU virtualization, as shown in
Figure 4-9.
Chapter 4: Performance 153
To meet this requirement, you can examine the Installing VMware vCenter Server
5.1 Best Practices knowledgebase article (KB 2021202), which reveals that the mini-
mum supported memory for running just vCenter Server 5.1 in a Windows VM is
4GB and no additional memory is required in deployments with fewer than 50 ESXi
hosts and fewer than 500 VMs. Based on this information, you might decide to con-
figure the VM memory for 4GB.
To meet this requirement, you can examine the Installing VMware vCenter Server
5.1 Best Practices knowledgebase article (KB 2021202), which reveals that the
minimum number of CPU cores supported for running just vCenter Server 5.1 in
a Windows server is 2 and no additional CPU cores are required in deployments
with less than 50 ESXi hosts and less than 500 VMs. Based on this information, you
might decide to configure the VM with 2 virtual CPU cores.
You should ensure the file system used by the guest O/S is properly configured for
proper track alignment. In a modern guest O/S, the default settings should properly
align the tracks of the file system, but this should be verifiedpreferably before cre-
ating VM templates. The steps for proper track alignment are unique in each guest
O/S type. For example, in Windows 2003, the diskpart command could be used to
properly align the NTFS partitions.
When configuring a VM for maximum performance, configure the virtual disk type
as thick provision eager-zeroed, which preallocates the disk space and pre-zeroes the
bits in the virtual disk. This is the best performing virtual disk type because it does
not have to obtain new physical disk blocks or write zeros to newly accessed blocks
at runtime.
In rare cases, VMs could be configured to use raw device mappings (RDMs) to re-
move the VMFS layering.
Figure 4-11 Memory resource allocation for the test resource pool.
fewer VMs running on the hosts than necessary, which in turn triggers ballooning,
swapping, and compression.
To meet this requirement, you can examine the Installing VMware vCenter Server
5.1 Best Practices knowledgebase article (KB 2021202), which reveals that the mini-
mum supported memory for running just vCenter Server 5.1 in a Windows Server
is 4GB and the minimum number of cores is 2. But, it also reveals that VMware
recommends configuring at least 8GB memory and 4 CPU cores if the deployment
includes between 50 and 300 ESXi hosts and between 500 and 3,000 VMs. Given
this information, you might choose to configure the VM with 8GB virtual memory
and 4 virtual CPU cores.
Figure 4-12 Configuring a Windows Server 2003 user to support large memory pages.
Large memory page support is enabled in ESXi 5.x by default. The advanced setting
named Mem.AllocGuestLargePage can be used to view and modify support for
large memory pages per ESXi host. Likewise, the setting monitor_control.
disable_mmu_largepages can be set in a VMs configuration file to control its
capability to use large pages. One use case for modifying this setting involves its
impact on transparent page sharing.
on the ESXi host would not be noticeably impacted if he disabled the use of large
memory pages, although this can cause an increased number of TLB misses for the
hardware-assisted MMU virtualization. To test his theory, he decides to disable large
memory page support on the host.
To accomplish this task, the administrator can perform the following steps:
Step 1. Using the vSphere Client, navigate to Inventory > Hosts and Clusters
and select the ESXi host.
Step 2. Click the Configuration tab.
Step 3. Select Software > Advanced Settings.
Step 4. In the Advanced Settings dialog box, select Mem.
Step 5. In the right pane, set Mem.AllocGuestLargePage to 0.
Step 6. Click OK.
use CPU scheduling affinity to configure the VM to use specific logical CPUs and
to configure all other VMs to use the remaining logical CPUs.
CPU scheduling affinity is also a useful tool for testing and capacity planning pur-
poses. For example, you might be interested in measuring a VMs throughput and
response time when it is pinned along with a set of competing VMs to a specific set
of logical CPUs.
dialog box, select the datastore to use to store the swap file for all VMs on the host
and click OK, as illustrated in Figure 4-14.
NOTE The standard VM swap file (VSWP) file is unrelated to the VMX swap file,
which is used to reduce the memory requirement for the VMs VMX process when
the ESXi host experiences memory pressure.
Step 10. Verify that ESXTOP opens to the memory statistics and that only the
swap statistics fields are displayed. Notice that the selection to display
only VMs was not saved as part of the custom profile.
You can maintain multiple custom profiles for use with ESXTOP. You can also
modify the default ESXTOP profile, which enables you to control the data that is
displayed by ESXTOP when it is opened without specifying a custom profile. To
modify the default profile for ESXTOP, enter esxtop to open ESXTOP without
using a custom profile, make the desired selections, and then use the W key to save
selections without entering a filename. This allows the settings to be saved in the
default profile, which is stored at /.esxtop50rc. (The default profile for RESXTOP is
/home/vi-admin/.esxtop50rc.)
Step 8. Change to the parent folder and replay the batch collection using:
esxtop -R esx-host-01.lab.local-2014-01-14--13.18
In this example, the p parameter is used with the vm-support command to instruct
it to collect performance data. The d parameter is used to set the duration to 120
seconds, and the i parameter is used to set the interval to 2 seconds. The w
parameter is used to set the target directory for the output file. In Figure 4-16,
after the vm-support command completes, a message appears that identifies the
output TGZ file. This filename is then used in the tar command that extracts the
contents of the TGZ file, using the xzf parameters. The ls commands are used to
illustrate the files and folders that exist in the tmp folder prior to and after the
execution of the tar command. After the tar command execution completes, the
cd esx-host-01.lab.local-2014-01-14--13.18/ is used to change the default direc-
tory into the directory produced by the tar command. Next, the files used for replay
are prepared by executing the reconstruct.sh script. Finally, esxtop R is used to
open ESXTOP in replay mode using the prepared data, which is identified by using
the directory name.
Chapter 1 of this guide contains an example of using ESXTOP in batch mode to
collect data and display it using the Windows Performance Monitor.
168 VCAP5-DCA Official Cert Guide
To address these needs, you could collect data using vm-support and examine
Key
Topic the data using ESXTOP replay mode. You could decide to use a VMFS datastore
named VMFS-01 to hold the data prepared by vm-support. Promptly at 2 a.m., you
could use vm-support to collect data for 60 minutes at 10-second intervals, using
this command.
vm-support -p -d 3600 -i 10 w /vmfs/volumes/VMFS-01
After the collection is finished, you can use the steps provided in the previous ex-
ample to finish preparing the data using the tar command and reconstruct.sh
script. After the data is prepared, use the ESXTOP replay mode to examine the data
with the esxtop R command and the name of the folder where the prepared data
resides.
The first step for using vscsiStats is to determine the world ID and handle IDs asso-
ciated with the VM you intend to monitor. You can use the vcsciStats l command
to list information on all currently running VMs and their virtual disks, including
the worldGroupID of each VM and the handleID of each virtual disk. The second step
is to start the data collection for a specific single virtual disk or for all virtual disks
associated with a specific VM. To start the data collection for all virtual disks used
by a specific VM whose worldGroupID is 1000, use this command:
vscsiStats -s -w 1000
To start the data collection for a specific virtual disk whose handleID is 2000 that is
used by a specific VM whose worldGroupID is 1000, enter this command:
vscsiStats -s -w 1000 i 2000
The data collection runs in the background. While the data collection is running,
you can use vscsiStats -p option to print a histogram for a specific statistic. The
choices for statistics are iolength, seekDistance, outstandingIOs, latency, and interarrival.
For example, this command can be used to print a histogram for the latency statistic:
vscsiStats p latency
Figure 4-17 shows the results of a sample execution of this command. In this exam-
ple, for the first disk, no I/Os completed in 100 microseconds or less; no I/Os took
longer than 15,000 microseconds; and 55 I/Os experienced latency between 100 and
500 microseconds.
By default, the data collection will run for 30 minutes, but you can stop it by enter-
ing the following command:
vscsiStats -x
The vSphere Clients offer many CPU-related counters for use with advanced per-
formance graphs. Certain counters are more useful than others for troubleshooting
specific CPU-related issues. For example, for a poorly performing VM, high CPU
Ready Time indicates that CPU contention exists, where the VM is contesting with
other VMs for scheduled CPU time. Table 4-2 contains a set of potential CPU-
related performance issues. For each potential issue, the table includes an
Indicators column that contains details on using specific CPU counters in real
graphs identify the issue. Also, for each potential issue, the table includes a column
that lists some potential resolutions.
NOTE Table 4.2 does not contain all the potential resolutions, just a few examples.
Other potential resolutions exist. Likewise, it does not contain all the indicators, just a
few of the strongest indicators.
Step 7. In the Counters section, select the memory metrics to include in the
graph, such as Balloon and Active.
Step 8. Click OK.
A number of memory-related counters are available for use with advanced perfor-
mance graphs. Certain counters are more useful than others for troubleshooting
specific memory-related issues. For example, for a poorly performing VM, a high
Swap in rate indicates that memory contention exists, where the VM is competing
with other VMs for access to physical memory. Table 4-3 contains a set of potential
memory-related performance issues. For each potential issue, the table includes an
Indicators column that contains details on using specific Memory counters in real-
time graphs to identify the issue. Also, for each potential issue, the table includes a
column that lists some potential resolutions.
174 VCAP5-DCA Official Cert Guide
Other indicators that a VMs virtual memory resources are insufficient to meet the
demand from its current workload can be found within the guest O/S. For example,
the Performance Monitor on a Windows VM could be used to examine the Pages
per sec counter, which indicates that Windows is actively swapping data in from its
page file.
To configure memory and CPU hot-add for a VM, use the vSphere Client and fol-
low these steps:
Step 1. Ensure the VM is powered down.
Key
Step 2. Right-click the VM and select Edit Settings. Topic
After successful completion of these steps, the VM will be able to increase its mem-
ory and/or add virtual CPUs while the VM is running. Figure 4-20 illustrates an
example of what the Options tab shows for a VM whose guest operating system (in
this case Windows 2003 Standard 32-bit) does not support CPU hot-add.
NOTE The setting to enable hot-add of CPU and memory is disabled by default for
each VM. This setting can be enabled only while the VM is powered off. So, if you
want to use this feature for a VM, be sure to enable the hot-add feature shortly after
creating the VM.
To use the vi text editor to view the net-dvs-results file, use this command:
vi net-dvs-results
Typically, the first line of this file begins with the string switch, which indicates the
first row in a section that provides details on a specific dvSwitch. The following lines
contain details about the configuration of the dvSwitch, such as max ports and global
properties. To quickly find the first line for next dvSwitch section, press the / key and
enter switch at the prompt (including a space character at the end). To navigate
through each dvSwitch section, use the arrow keys on the keyboard. Each section
contains many attribute names and corresponding values. Table 4-4 provides infor-
mation for a few of the attributes, including a brief description.
After using vi to view the file, you can close the file without changes. To do so, type
the : key and enter q! at the prompt.
issues that affect the ESXi management network, access to the ESXi host from
the vSphere Client, an SSH client, the vCLI, or the vMA might be unavailable.
Troubleshooting ESXi network issues can require using ESXCLI commands from
the ESXi Shell accessed directly from the ESXi host console. This section focuses
on troubleshooting ESXi network issues using ESXCLI commands from the ESXi
Shell, but it could be applied to using the vCLI, if available.
Chapters 1 and 2 of this guide provide details for using the ESXCLI command
set, the ESXi Shell, and specific network-related commands. This section provides
scenarios and sample solutions for troubleshooting specific ESXi network configura-
tion issues.
To address this challenge, you could access the ESXi Shell directly from the console
and enter the following commands. The first command displays information on all
of the ESXi hosts vSwitches. The second command displays information on all the
ESXi hosts VMkernel ports:
esxcli network vswitch standard list
esxcli network vswitch standard portgroup list
ScenarioConfigure VLAN
To correct a certain connectivity issue, you need to set the VLAN for the Manage-
ment Network port group on a standard vSwitch to 100.
To address this need, you could access the ESXi Shell directly from the console and
enter the following command:
esxcli network vswitch standard portgroup set -p 'Management Network'
-v 100
Chapter 4: Performance 179
To address this challenge, you could use CLI to enter the following command:
esxcli network nic list
As another example, consider the same network design used in the previous ex-
ample. In this case, assume that multiple ESXi hosts and multiple VMs are success-
fully using all the PVLANs. But on one particular ESXi host, the VMs connected
to the distributed port group assigned to the 70-102 PVLAN cannot successfully
communicate with other VMs running on other ESXi hosts and connected to the
same distributed port group. Because the VMs on the troubled ESXi host connect
to the same distributed port group as VMs that are communicating successfully, you
should be able to eliminate improper PVLAN type configuration as a potential root
cause. In other words, if the wrong PVLAN type is assigned to the 70-102 PVLAN
on the dvSwitch and the 70-102 PVLAN is assigned to a distributed port group, it
would affect all VMs on all ESXi hosts that are connected to the distributed port
group. A better fit for the root cause of the problem could be the configuration of
the physical network ports, where the physical adapters from the troubled ESXi host
are connected. If one of these ports is misconfigured, it could impact just the VMs
on this specific ESXi host. Perhaps one of these ports is not properly configured to
accept the 70-102 PVLAN.
Step 3. If the issue seems to be isolated to just one VMkernel port, examine its IP
address, mask, gateway settings, and other direct settings.
Step 4. If the problem appears to be isolated to a specific ESXi host, examine
the corresponding virtual port group, vSwitch, and uplink settings. For
example, ensure that the appropriate physical adapters are configured as
Active uplinks.
Step 5. If the problem appears to be isolated to a specific virtual port group (stan-
dard or distributed), examine its settings, such as VLAN and Load Bal-
ancing policies.
To address this need, you could begin by accessing the ESXi Shell on the source
ESXi host and enter the following command to see whether the target VMkernel
port responds:
vmkping I vmk1 192.168.2.11
This scenario could be caused by duplicate IPs on the vMotion VMkernel ports on
host-01 and host-02. When troubleshooting VMkernel network connectivity issues
where tests fail and succeed intermittently, consider whether duplicate IP addresses
could be the root cause. This could be determined by first temporarily disconnect-
ing, disabling, or deleting one the associated VMkernel ports and then pinging its
address to see whether some other network node responds to the ping. Another ap-
proach is to examine the events and logs of the ESXi hosts to search for messages
indicating duplicate IP addresses.
To determine the root cause of routing issues, first examine the mask and gateway
settings of the VM or VMkernel port. Then use the traceroute command in the
ESXi Shell (or similar command in a VM, such as tracert in a Windows VM) to ex-
amine the network route that is being traversed. The traceroute command provides
the s parameter, which can be used to identify the source IP address. Figure 4-22
illustrates an example in which traceroute displays details for successfully reaching
Chapter 4: Performance 183
Utilize the DCUI and the ESXi Shell to Troubleshoot ESXi Networking
This section focuses on using the direct console user interface (DCUI) to trouble-
shoot and configure ESXi networking. Previous sections and chapters have provided
details on using the ESXi Shell to troubleshoot, configure, and monitor ESXi net-
working, but in some cases, the DCUI might need to be used.
For example, consider a case where no ESXi management interfaces are respond-
ing to attempts to use the vSphere Client, the vCenter Server, or an SSH client to
access an ESXi host. Or consider a case where Lockdown Mode is enabled and
vCenter Server loses connection to an ESXi host. In these cases, you will likely need
to use the DCUI to address the problem.
To get started using the DCUI to troubleshoot ESXi networking issues, access the
ESXi console either directly or by an available remote access connection, such as
HP ILO, Dell DRAC, or KVM. At the ESXi 5.x splash screen, press F2 to open
the login prompt and enter credentials for the root accountor another appropriate
Login Name. The DCUI should appear and provide a menu of options that can be
used for troubleshooting, configuring, and monitoring the ESXi host, as illustrated
in Figure 4-24.
The first ESXi management network troubleshooting step is typically to select
the Test Management Network option. This option provides a dialog box, as il-
lustrated in Figure 4-25, where you can choose to ping up to three addresses and
resolve a hostname. By default, it will ping the gateway and resolve its own fully
qualified hostname, but you can modify these values and add more addresses.
186 VCAP5-DCA Official Cert Guide
Another step is to examine the configuration of the management network and make
corrections, if necessary. To perform this step, select the Configure Management
Network option, which enables you to change the physical network adapter, IP ad-
dress, gateway, mask, and VLAN that is used for the management interface. Regard-
less of whether you reconfigure the management network, the next step should be to
select the Restart Management Network option to see if the issue still exists.
ESXi 5.1 provides some new Network Restore Options, as illustrated in Figure
4-26. These options are useful in scenarios in which a management network issue
was caused by a recent configuration change to port group or vSwitch. These
options provide a means to undo or correct the misconfiguration. One choice is the
Restore Network Settings option, which reverts all network settings back to the
original default configuration. The other choices are the Restore Standard Switch
and Restore vDS options, which revert changes made to virtual switches.
Other troubleshooting steps could involve selecting the Troubleshooting option
to enable the ESXi Shell, which allows you to enter the ESXi Shell from the DCUI
by typing Alt-F1. From the ESXi Shell, you can use the ESXCLI command set as
described elsewhere in this chapter to perform troubleshooting tasks. To return
to the DCUI, type Alt-F2. From the Troubleshooting menu, which is shown in
Chapter 4: Performance 187
Figure 4-27, you can also select the Restart Management Agents option if you
suspect the root cause is actually related to the agent itself and not the management
network.
From the DCUI, you can also select the System Logs option and choose the spe-
cific logs you want to view, as shown in Figure 4-28.
The results of this command tend to be long, so you might with to add | more to
the end of the command to display one page at a time, as shown in Figure 4-29.
plug-in for this LUN. Typically, this can be resolved by following the storage
manufacturers recommendations to install vendor-specific multipath plug-ins and
modify claim rules.
Figure 4-30 Using an ESXCLI command to obtain details on a specific storage device.
Another typically useful troubleshooting step is to identify all the paths to LUNs
that are available on an ESXi host, using this command:
esxcli storage core path list
The results of this command contain every path that is known to the ESXi host. You
could use this information to determine all the known paths for a particular LUN,
but it would be challenging due to the size of the results.
A more convenient way to identify all the paths for a given LUN is to use the
Key
esxcg-mpath command. For example, to list all the paths for a LUN whose Topic
identifier is naa.6000d771000020d40f1ac91fb172e72e, use this command:
esxcfg-mpath l d naa.6000d771000020d40f1ac91fb172e72e
To troubleshoot multipathing issues, you might want to closely examine the details
of a particular path. To see the details for a specific path, you can use the previous
command with the path parameter to identify the path using the Runtime Name,
as shown in Figure 4-31. In this example, the results show that the State of the path
is active. If any other value appeared for the State, it could be the sign of a problem
or a misconfiguration.
190 VCAP5-DCA Official Cert Guide
Figure 4-31 Using an ESXCLI command to list multiple paths for a LUN.
If you are concerned that a particular path has some health or performance issues,
you could examine the statistics for the path by using the ESXCLI command set.
For example, the following command can be used to retrieve the statistics for a spe-
cific path identified by the runtime name vmbha33:C0:T0:L9:
esxcli storage core path stats get --path vmhba33:C0:T0:L9
Figure 4-32 shows a sample of the results for this command. In this example, the
results include many statistics for the path, such as 759 successful commands; 42,584
blocks read; 2 failed commands; and 0 failed write operations. When troubleshoot-
ing performance issues for a LUN, any non-zero values for the any of the Failed
statistics could indicate issues with the path or the storage.
As mentioned previously in this section, you might need to modify claim rules to
resolve PSA-related issues. For example, you might need to modify claim rules to
allow a custom multipath plug-in or custom path selection policy to claim a LUN.
Another purpose for modifying claim rules is to configure the MASK_PATH plug-
in to claim all the paths to a LUN, which effectively prevents the ESXi host from
accessing the LUN. For example, if you suspect that one ESXi host is experiencing
unreliable connection issues to a datastore and are concerned that it could impact
the performance of VMs running on other ESXi hosts, you could modify the ESXi
host to allow the MASK_PATH plug-in to claim each path to the LUN. To accom-
plish this, first examine the current claim rule list by using this command:
esxcli storage core claimrule list
An example of this command is shown in Figure 4-33, which indicates that MASK_
PATH is initially configured to claim a couple of specific DELL devices, but all
other devices are claimed by NMP. In this case, you could create new rules that are
assigned rule numbers in the acceptable range between 150 and 199. Each new rule
should assign a specific path to the MASK_PATH plug-in.
ScenarioLUN Masking
Key
You discover that one of your ESXi hosts is having a high volume of failed reads and Topic
writes to a particular LUN, but no other ESXi host is having such issues. You migrate
all VMs that access the LUN from the troubled ESXi host to other ESXi hosts. You
now want to temporarily prevent the ESXi host from attempting to access the LUN.
You decide to add new claim rules to allow the MASK_PATH plug-in to claim each
path to the LUN. The ESXi host has two paths to the LUN that are identified by the
runtime names vmbha33:C0:T0:L5 and vmhba33:C1:T0:L5.
To address this need, you could create a claim rule numbered 192 that claims the
path with MASK_PATH, as shown in Figure 4-34.
192 VCAP5-DCA Official Cert Guide
After creating the claim rule, use this command to load the rule into the active
working set and to reclaim the LUN. In this example, the LUN identifier is naa.600
0d771000020d40f1ac91fb172e72e:
esxcli storage core claimrule load
esxcli storage core claiming reclaim -d naa.6000d771000020d40f1ac91fb
172e72e
You can then use this command to verify that one path has been removed:
esxcfg-mpath -l -d naa.6000d771000020d40f1ac91fb172e72e
You can then repeat these steps for the second path, whose runtime name is
vmhba33:C1:T0:L5:
Figure 4-35 shows an example of this command. In this example, the second column
identifies the driver for each HBA. You should ensure that the correct driver is as-
signed to each adapter by following the manufacturers recommendations. If you
suspect that a driver or adapter is not functioning well, you could display adapter
statistics using this command:
esxcli storage core adapter get
Figure 4-35 also shows an example of using this command, which shows statistics,
including failure statistics. In this example, no failed commands appear on vmhba0.
Chapter 4: Performance 193
Figure 4-35 Using ESXCLI commands to list storage adapters and statistics.
The results of this command include the Name, Driver, State, Unique ID (UID),
and Description of each iSCSI adapter. To display more details on a specific iSCSI
adapter, such as an adapter named vmhba33, the following command can be used:
esxcli iscsi adapter get --adapter vmhba33
These commands, shown in Figure 4-36, can be used to examine details like the
Hardware Version and Firmware Version of hardware iSCSI adapters, which can
be useful for troubleshooting.
194 VCAP5-DCA Official Cert Guide
The esxcli iscsi adapter set command can be used to modify the iSCSI Quali-
fied Name (IQN) and the Alias of the adapter. The esxcli iscsi adapter auth chap
namespace can be used to view and configure CHAP settings, whereas the esxcli
iscsi adapter discovery namespace can be used to manage targets. These com-
mands could be useful for modifying the adapter, its CHAP authentication, and its
targets in an attempt to troubleshoot problems where the adapter is not properly
discovering LUNs that have been presented to an ESXi host.
and removing NFS datastores, can also be used for troubleshooting. For example,
this namespace can be useful for creating scripts that can be quickly applied from
the vMA to large groups of ESXi hosts to either retrieve data or make configuration
changes that are needed to troubleshoot NFS issues. Figure 4-38 illustrates using
the esxcli storage nfs add command to add an NFS datastore to an ESXi host, us-
ing the same configuration as in the last example.
To examine the I/O latency for a particular LUN, press the u key and examine the
GAVG/cmd column, as shown in Figure 4-40.
To examine the latency for I/O that occurs for a virtual disk, press the v key and ex-
amine the LAT/rd and LAT/wr columns, as shown in Figure 4-41.
In most cases, these latency values should be less than 5 milliseconds. Whenever the
GAVG/cmd value for a particular storage adapter or LUN is high, you should de-
termine the root cause. GAVG/cmd is the metric that indicates the latency for each
I/O from the guest operating systems perspective. It includes VMkernel Latency
(KAVG/cmd) and device Latency (DAVG/cmd). So, the next step is to examine
the KAVG/cmd and DAVG/cmd values for the troubled adapter or LUN. High
KAVG/cmd values indicate CPU contention within the VMkernel. High DAVG/
cmd values indicate slowness in the physical storage infrastructure, including the
storage adapters, storage network, and storage arrays.
As described previously in this chapter, the vscsiStats utility is useful for analyzing
storage activity. It can be used to troubleshoot storage performance by producing
histograms of latency, seek distance, I/O size, number of outstanding I/Os, and
inter-arrival time whenever this data is useful. For example, if you determined that
high device latency exists, you might want to learn details about the characteristics
of the I/O of the VMs that are involved. This information might lead you to move
some VMs to a datastore backed by a different RAID type.
ScenarioUsing vscsiStats
Key
Several VMs are performing poorly, and you have determined that the root cause is Topic
high latency for a particular LUN. You want to move some workloads off the LUN
to LUNs backed by physical drives that are not part of the currently used LUN. But
the only available LUNs are built on RAID-5, which you fear will not perform well
enough for some workloads. You are curious about the characteristics of the disk
I/O produced by a VM named vm-01, which has two virtual disks, but you are only
concerned about the activity of the second virtual disk. You theorize that if vm-01
is mostly performing sequential reads, it might perform adequately on the RAID-5
LUN. You know you can use the v key in ESXTOP to examine the READ/s and
WRITE/s of the virtual disks to determine whether the I/Os are mostly reads. You
need to use vscsiStats to report on the seekDistance to determine whether the I/O is
mostly sequential.
To determine the seekDistance of the I/O for the second virtual disk used by vm-01,
you can use vscsiStats to produce a histogram, as shown in Figure 4-42. In this ex-
ample, 10,178 operations out of a sample of 14,068 had a seekDistance equal to or less
than 1 LBN. This indicates the data is mostly sequential.
198 VCAP5-DCA Official Cert Guide
In this example, the name of the VMFS datastore is Shared-30. The fully qualified
path is /vmfs/volumes/Shared-30. Technically, this is the path to a file that is a sym-
bolic link to the actual VMFS datastore. Each VMFS datastore is assigned a unique
ID (UID), which in many cases should be used to reference the datastore. In this
example, the /vmfs/volumes/Shared-30 symbolic link references a VMFS datastore
whose UID is 5049c876-51d6f59e-a658-005056956fa9. You can use this command
to learn the mapping between symbolic links and VMFS UIDs:
ls -la /vmfs/volumes
To retrieve the properties of this VMFS datastore, use the UID with this command:
vmkfstools -P /vmfs/volumes/ 5049c876-51d6f59e-a658-005056956fa9
The results of the command are identical to the results of the last command, as
shown in Figure 4-44. The results contain details on VMFS UID, capacity, and
spanned partitions.
The vmkfstools utility can also be used to troubleshoot issues with creating and
upgrading VMFS datastores. For example, if you experience issues trying to create a
new VMFS volume using the vSphere Client, you could try to do so using
vmkfstools C, as explained in Chapter 1. Likewise, if you have issues using the
vSphere Client to upgrade a VMFS-3 volume to VMFS-5, you could try using the
vmkfstools T command, as shown in Figure 4-45. In this example, the VMFS
UID is 52d81f5d-6726097b-b2bb-005056954ce5; the VMFS name is VMFS-003; the
original VMFS version is 3.58; and the updated VMFS version is 5.58.
that contain the same VMFS UID in its metadata. The administrator should en-
sure that no ESXi host is ever permitted to mount two LUNs containing the same
VMFS UID.
For this reason, if any ESXi host attempts to mount a VMFS datastore that it de-
tects as a replica, it prompts the user to choose one of two options to complete the
mount operation. One option is the Keep the existing signature, which maintains
the VMFS UID but updates other VMFS metadata. This option can be used if the
replica is not presented to any ESXi host that accesses the original LUN. This can
be useful when SAN replication is used for disaster recovery (DR). The other option
is to use Assign a new signature, which updates the UID in the VMFS metadata.
This option must be selected if the replica will be presented to an ESXi host that ac-
cesses the original LUN.
When troubleshooting issues exist where an ESXi host has difficulty mounting a
new VMFS datastore, you can check the VMkernel log. If it contains a message with
a string similar to Device vmhba1:0:5:1 is a snapshot, the ESXi host is deliberately not
mounting the VMFS datastore. If the vSphere Client is also not prompting you to
keep the signature or assign a new signature, you might need to use an ESXCLI
command to fix the issue. In this case, use this command to determine whether the
ESXi host truly detects a snapshot:
esxcli storage vmfs snapshot list
Here are a few examples of error messages that might appear in the log file.
202 VCAP5-DCA Official Cert Guide
The VMkernel log file might contain an entry similar to following sample, which
indicates that a LUN, whose runtime name is vmhba33:C1:T0:L5, is detected to be
a replica:
Jan 18 11:15:41 Host-01 VMkernel: 0:14:17:59.787 cpu13:1046)LVM:5670:
Device vmhba33:1:0:5 is a snapshot
The VMkernel log file might contain an entry similar to the following sample,
which indicates a SCSI error. In this example, the portion marked as bold (in this
guide, not in the actual log file) is a Device Status number that identifies the issue.
In this example, the Device Status is 0x8, which indicates the SCSI device was too
busy to accept the SCSI command, which the VMkernel will automatically resend
again. A number of these messages could indicate the LUN is overloaded.
VMkernel: 1:02:02:02.206 cpu3:4099)NMP: nmp_CompleteCommandForPath:
Command 0x28
(0x410005078e00) to NMP device "naa.6001e4f000105e6b00001f14499bfead"
failed on
physical path "vmhba1:C0:T0:L100" H:0x0 D:0x8 P:0x0 Possible sense
data: 0x0 0x0
0x0.
The VMkernel might contain other entries with similar codes that indicate the
meaning of the error. Table 4-6 shows a few examples of Device Status codes and
a brief description of each. Each of these can indicate that the LUN is overworked.
One possible solution is to migrate one or more VMs to other datastores.
For more extensive troubleshooting needs, you can use the Firewall Properties
page to examine and verify that the correct Incoming Ports and Outgoing Ports
are identified for each service. You can use the Options button to start and stop
the corresponding services manually and to configure the corresponding services
to automatically start with the ESXi host or automatically start when the ports are
enabled. For example, the NTP Client service can be configured to start manually,
automatically start when the ESXi host restarts, and automatically start when the
NTP Client is enabled in the firewall, as shown in Figure 4-47.
Figure 4-47 Modifying the NTP daemon options in the ESXi firewall.
Chapter 4: Performance 205
The ESXi firewall provides the ability to restrict the networks that are permitted to
connect per service type. For example, to restrict the networks that can connect to
the VMware vCenter Agent, such that only the vCenter Server IP address is al-
lowed, click the Firewall button and specify the vCenter Server IP address in the
Only allow connections from the following networks box, as shown in Figure
4-48.
Summary
You should now have the knowledge and skills to successfully perform administra-
tion tasks focused on monitoring, optimizing, and troubleshooting VM performance
in a vSphere environment. You should also be able to successfully complete cluster
configuration, troubleshooting, and management tasks that might be part of the
VCAP5-DCA exam. Be sure to take time to practice the steps that are provided
in this section until you are confident that you can perform such tasks quickly and
without any assistance.
206 VCAP5-DCA Official Cert Guide
Review Tasks
These review tasks enable you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a set
of tasks is provided instead of a set of questions. You should now attempt to perform
each of these tasks without looking at previous sections in this chapter or at other
materials, unless necessary. The steps for each task are located within the chapter:
1. Configure a swap file for the ESXi system (not a VM swap file, but an ESXi
system swap).
2. Change a VM to use the best performing virtual SCSI driver instead of the
virtual SCSI driver that was selected by default based on the guest O/S type.
3. Use vm-support to collect performance data, and then use ESXTOP in replay
mode.
4. Use the vSphere Client to create a custom performance chart that can be used
for a single VM to show just a single counter that best indicates whether the
VM is experiencing CPU contention where it is contesting with other VMs
for access to CPU resources.
5. Use the DCUI to restore network settings back to the original, default con-
figuration.
6. Use the esxcfg-mpath command to list all the paths for a specific LUN.
7. Configure the ESXi firewall to permit only VMware vCenter Agent traffic to
communicate with a specific IP address.
This chapter covers the following subjects:
This chapter contains material pertaining the VCAP5-DCA exam objectives 3.3,
4.1, and 4.2
CHAPTER 5
Clusters
This chapter is intended to provide you with the knowledge and skills to suc-
cessfully perform cluster administration in a vSphere virtualized datacenter. It
is also intended to ensure that you have the skills to successfully complete the
cluster configuration, troubleshooting, and management tasks that might be
part of the VCAP5-DCA exam. As you read this chapter, take time to practice
the steps that are provided until you are confident that you can perform such
tasks quickly and without any assistance. Some of these steps involve using the
vSphere Client. Others involve using the vCLI and PowerCLI.
1. Which option summarizes the steps that can be taken to ensure that virtual
machines continue to run on ESXi hosts that become disconnected from the
management network but remain connected to storage?
a. Use the Set-Cluster PowerCLI cmdlet and set the
-HAIsolationResponse parameter to DoNothing.
b. Use the Set-Cluster PowerCLI cmdlet and set the
-HAIsolationResponse parameter to LeaveVMsRunning.
c. Use the esxcli cluster ha set command.
d. Use the esxcli cluster ha isolation command.
2. Which option summarizes the minimum steps that can be taken to configure
DRS Automation to automatically place and migrate VMs as necessary to en-
force DRS rules but not to just balance the workload?
a. Edit the cluster settings, set the DRS Automation Level to Fully Au-
tomated, and move the Migration Threshold slider to the extreme left
(Conservative) setting.
b. Edit the cluster settings, set the DRS Automation Level to Fully Auto-
mated, and move the Migration Threshold slider to the extreme right
(Aggressive) setting.
c. Edit the cluster settings, set the DRS Automation Level to Partially
Automated, and move the Migration Threshold slider to the extreme
left (Conservative) setting.
d. Edit the cluster settings, set the DRS Automation Level to Partially
Automated, and move the Migration Threshold slider to the extreme
right (Aggressive) setting.
3. Which option summarizes the steps that can be taken to configure an SDRS
datastore cluster?
a. Select New Datastore Cluster. In the wizard, check the Turn on
Storage DRS box, select the ESXi hosts or clusters, and then select the
datastores.
b. Select New Datastore Cluster. In the wizard, check the Turn on Stor-
age DRS box, select the datastores, and then select the ESXi hosts or
clusters.
Chapter 5: Clusters 211
4. Which option summarizes the steps that can be taken to properly configure
Distributed Power Management?
a. Select New Cluster. In the first page of the wizard, check the Turn on
DPM box.
b. For each ESXi host in the cluster, check the Turn on DPM box on the
Configuration tab.
c. Use the New-Cluster PowerCLI cmdlet with the DPM $Enable op-
tion.
d. Select New Cluster. Set the default power management state to Man-
ual or Automatic.
5. Which option summarizes the steps that can be taken to properly configure
EVC on a cluster containing some Intel Nehalem processors and some Intel
Westmere processors?
a. Set the VMware EVC properties of the cluster to Enable.
b. Set the VMware EVC properties of the cluster to Enable EVC for In-
tel Hosts, and set the EVC Mode to Westmere.
c. Set the VMware EVC properties of the cluster to Enable EVC for In-
tel Hosts, and set the EVC Mode to Nehalem.
d. Set the VMware EVC properties of the cluster to Intel.
6. Which option summarizes the steps that can be taken to implement vSphere
Fault Tolerance?
a. Edit the cluster settings and check the Turn on Fault Tolerance box.
b. For each participating ESXi host, use the Configuration tab and select
Turn on Fault Tolerance.
c. Configure a vmkernel virtual adapter on each participating ESXi host to
support FT Logging.
d. Use the FT-Enable PowerCLI cmdlet with the Logging option.
212 VCAP5-DCA Official Cert Guide
Foundation Topics
Overview
You should already be familiar with the following details in this overview. If any of
this information is new to you, be sure to conduct the appropriate research before
continuing on to the remainder of the section.
VMware HA is a vSphere cluster feature that provides automated high availability
for virtual machines (VMs) and applications. Its main feature is to provide auto-
mated recovery of VMs that fail as a result of an unplanned ESXi host downtime
event. When an ESXi host becomes nonresponsive, VMware HA automatically cold
migrates the failed VMs to surviving ESXi hosts in the cluster and restarts them.
HA requires these VMs to be hosted on shared datastores, which allows them to
be immediately registered on the surviving hosts in the cluster without the need to
copy any files. Typically, when a host fails, HA migrates and restarts all failed VMs
within a few minutes.
VMware HA also offers other forms of protection, such as VM Monitoring and Ap-
plication Monitoring, which are not enabled by default. When configured for VM
Monitoring, VMware HA listens to the heartbeat of each VM, which is generated
by VMware Tools. If at any point the heartbeat cannot be detected, VMware HA
restarts the affected VMs. When configured for Application Monitoring, VMware
HA listens to heartbeats that are generated by applications that are customized to
interface with VMware Tools. If at any point the heartbeat cannot be detected, VM-
ware HA restarts the affected VMs.
VMware HA has many configurable settings, such as Admission Control, Restart
Priority, and Host Isolation Response. It has a highly available architecture, includ-
ing ESXi host-based agents and network and datastore heartbeats. Although vCen-
ter Server is required for configuration as well as maintaining the protected VM list,
VMware HA is not dependent on vCenter Server availability for its failover opera-
tion. A minimum licensed edition of vSphere Essentials Plus to use VMware HA in
a vSphere implementation.
Chapter 5: Clusters 213
In this scenario, the administrator might decide to enable Admission Control and
set the Host failures the cluster tolerates to 1.
Finally, the Admission Control Policy can be set to use one or more specified hosts
for failover events. In this case, the selected ESXi hosts sit idle and do not run VMs
unless an ESXi host failure occurs in the cluster. To configure this option, select the
Failover ESXi Hosts option and select which hosts will be used for HA failover.
HA displays the results on the Advanced Runtime Info page, as illustrated in Figure
5-1. The Advanced Runtime Info page is accessible from the Advanced Runtime
link on the clusters Summary tab.
216 VCAP5-DCA Official Cert Guide
By default, the slot size is automatically set to reflect the VM with the highest CPU
Key
Topic reservation and the VM with the highest memory reservation. This might not al-
ways be desirable. Consider a case where one VM has 8 GB of memory reserved
and all the other VMs in the cluster have 0 GB reserved. In this case, HA effectively
allocates 8 GB for all VMs in the case of a host failure. As a result, under normal
conditions Admission Control will allow very few VMs to start. It is possible to
manually control the slot size by setting advanced options in HA to establish mini-
mum and maximum slot sizes. The options das.vmCpuMinMHz and
das.vmMemoryMinMB are used to configure the minimum allowed slot size. The
options das.vmCpuInMHz and das.vmMemoryInMB are used to configure the
maximum allowed slot size. The names of these options must be carefully entered
in the Advanced Options page of the HA cluster settings along with their values, as
illustrated in Figure 5-2.
Chapter 5: Clusters 217
then it is considered to have failed. If datastore heartbeats are received from a slave
host, but no network heartbeats or ping responses are received, the host is consid-
ered to be isolated from the network. If a particular host is not receiving heartbeats
or election traffic from any other host, it pings its set of isolation addresses. If at
least one isolation address responds, the host is not isolated from the network.
You can preconfigure the Host Isolation Response setting of a cluster to control
which action should be taken on running VMs if the host becomes isolated. Natu-
rally, if a host fails, HA will migrate and restart all of its protected VMs. If the host
does not fail, but instead becomes isolated, it will perform the action configured for
Host Isolation Response. The options are Leave VMs Running, shut down VMs,
or Power down VMs.
HA can now recognize network partitions, where a set of hosts in the cluster loses
connectivity to the other hosts in the cluster. Technically, a host is isolated if it
is not receiving heartbeats from the master, is not receiving election traffic from
slaves, and cannot ping its isolation address. A host is partitioned if is a host is not
receiving heartbeats from the master but is receiving election traffic from slaves. In
this case, the hosts in the partition re-elect a second master and the cluster continues
to provide high availability.
Configure HA Redundancy
The networks and the datastores used for HA should be as resilient as possible.
Redundancy should be configured for the HA network heartbeat and the datastore
heartbeat. Placing additional vmkernel ports on each host and enabling them for
management traffic can achieve network heartbeat redundancy. This allows HA
heartbeats to traverse multiple networks, so that HA does not mistake a loss of con-
nectivity on one network for host failure or host isolation. Additionally, each
Chapter 5: Clusters 219
vmkernel port used for heartbeats can be configured to use NIC teaming to increase
resiliency for each network.
HA datastore heartbeats are automatically assigned to two datastores that are avail-
able to all hosts in the cluster, if available. To change this assignment, do the follow-
ing:
Step 1. Select Inventory > Hosts and Clusters.
Step 2. Right-click the HA cluster, and select Edit Settings.
Step 3. Select Datastore Heartbeating as shown in Figure 5-3.
The best choices for heartbeat datastores typically involve datastores with as much
separation as available. Optimal choices are datastores on separate arrays, separate
spindles, separate RAID groups, or separate LUNs. If a host is successfully updating
its heartbeat region on either selected datastore, the host has not failed.
A best practice to improve redundancy is to add more isolation addresses. By de-
Key
fault, a single isolation address is used and is set to the default gateway of the man- Topic
agement network. It is recommended to have at least one isolation address for each
heartbeat network and a minimum of two isolation addresses. Isolation addresses
can be added by using the Advanced Options button on the HA Cluster Settings,
220 VCAP5-DCA Official Cert Guide
Examine the total capacity, reserved capacity, and available capacity of the cluster.
Key
Topic For example, a cluster contains two hosts and the HA Admission Control is set to al-
low one host failure. This resulted in about 50% of the total memory capacity being
reserved. You can use the View > Memory button to examine the memory reserva-
tion for each VM, sum these values, and verify that the reserved amount is sufficient.
If the capacity reserved for HA is either too low or too high, consider changing
the Admission Control policy to use specific percentages of CPU and memory re-
sources. If the previous example is changed to reserve 25% CPU and 25% memory
resources for failover, the resulting resource allocation would look like the example
in Figure 5-5.
Chapter 5: Clusters 221
In this scenario, if an administrator wants to shut down one host for maintenance,
she will need to manually migrate one of the domain controllers because DRS can-
not do so due to the rule. However, if one of the hosts unexpectedly failed, HA will
migrate all VMs including the failed domain controller to the surviving host and
restart them. After the failed host is repaired and is successfully reconnected to the
cluster, DRS will immediately apply the rule and migrate one of the domain con-
trollers to the reconnected host.
If HA admission control is set to designate one or more failover hosts, DRS will not
make recommendations to migrate VMs to those hosts. If Distributed Power Man-
agement (DPM) is enabled and an HA failover event occurs, DPM will likely ask
hosts to start up and exit standby mode.
The Set-Cluster PowerCLI command can be used to configure the cluster. For ex-
ample, to configure a cluster named Cluster-01 to enable HA and set HA Isolation
Response to Leave VMs Running, the following command can be used:
Set-Cluster Cluster-01 HAEnabled $True
-HAIsolationResponse DoNothing
In this PowerCLI example, the value DoNothing corresponds to the Leave VMs
Running value provided by the vSphere Client for HA Isolation Response. Other
acceptable values for HAIsolationResponse are PowerOff and Shutdown.
DRS Overview
You should already be familiar with the following details in this overview. If any of
this information is new to you, be sure to conduct the appropriate research before
continuing on to the remainder of the section.
DRS is a vSphere feature that provides automatic balancing of CPU and memory
workloads across a cluster of ESXi hosts. It achieves this balancing by intelligently
placing VMs on hosts as they are powered on and by migrating running VMs to less
used hosts in the cluster using vMotion. The key requirements for DRS are a proper
license for vSphere Enterprise edition or higher and a properly configured vMo-
tion network. For optimal workload balancing, each ESXi host and each VM should
meet vMotion requirements as well. DRS also provides cluster-based resource pools
allowing CPU and memory resources to be reserved for groups of VMs.
DRS Configuration
The DRS Automation Level can be set to Manual, Partially Automated, or Fully
Automated. When set to Manual, DRS only makes recommendations, which then
require manual approval to actually apply the placements or migrations. When set
to Fully Automated, DRS automatically performs some placements and migrations
that it recommends, dependent on a configured threshold setting. When set to Par-
tially Automated, DRS automatically performs initial placements but only makes
recommendations for migrations. You can set the DRS Automation Level by using
the Cluster Settings page, selecting vSphere DRS on the left side, and the appropri-
ate level on the right side, as shown in Figure 5-6.
224 VCAP5-DCA Official Cert Guide
When set to Fully Automated, DRS only applies recommendations that are allowed
based on the Migration Threshold. This setting controls how aggressively recom-
mendations are applied. Recommendations are priority based from priority levels
1 to 5. The most aggressive setting results in applying all recommendations. The
default threshold applies only priority 13 recommendations. If the threshold is set
to Conservative, it applies only priority 1 recommendations, which effectively means
it applies only the DRS rules and does not balance based on workload. Each prior-
ity maps to an allowed level of deviation between the workload levels of each host in
the cluster, as illustrated in Figure 5-7 and Figure 5-8.
Chapter 5: Clusters 225
Figure 5-7 The target host load std dev for default threshold.
Figure 5-8 The target host load std dev for Priority 2 threshold.
226 VCAP5-DCA Official Cert Guide
ScenarioAffinity Rule
A three-tier application uses a database server VM, an application server VM, and a
web server VM. Due to high network traffic between the application server and the
other two VMs, you are tasked to ensure that the three VMs run on the same ESXi
hosts, allowing this traffic to stay inside the host.
To meet this requirement, you can apply the previously provided steps to create an
affinity rule, as shown in Figure 5-9.
You can also configure affinity and anti-affinity based on groups of hosts and groups
of VMs. Use the DRS Groups Manager option on the Cluster Settings page to
create Virtual Machine DRS groups and Host DRS groups. For each group, supply
a logical name and select its members, as illustrated in Figure 5-10.
If you create Virtual Machine DRS groups and Host DRS groups, then the Rule
page will offer an additional type of rule called Virtual Machines to Hosts. To create
VMs to Hosts affinity rules, select this option, select one VM DRS group, select one
host DRS group, and select the affinity designation. The choices are as follows:
Should run on hosts in group
Must run on hosts in group
Must not run on hosts in group
Should not run on hosts in group
Chapter 5: Clusters 227
To meet this requirement, you can create two Host DRS groupsone for each
Key
Topic chassiscontaining the corresponding ESXi hosts. Create two VM DRS groups,
containing one domain controller VM each. Create a VM to Host affinity rule for
one of the VM DRS groups specifying that it should run the first host DRS group as
shown in Figure 5-11. Likewise, create a second rule for the other VM DRS group
specifying that it should run in the other host DRS group.
DRS Alarms
No DRS-specific alarms are defined by default in vSphere, but you should consider
creating some custom alarms. You can create new alarms at any point in the vCenter
Server hierarchy, but by creating the alarms on the vCenter Server (root) object,
they can then be easily applied to any DRS cluster. Setting the Alarm Type to moni-
tor clusters enables you to choose DRS specific triggers, such as DRS disabled and
DRS enabled, as illustrated in Figure 5-12.
You might want to create alarms to trigger on Cluster status changed and Cluster
overcommitted and assign actions to notify administrators via email or SNMP for
immediate attention.
When set to Manual, SDRS only makes recommendations, which require manual
approval before SDRS will apply the placements or migrations. When set to Full
Automation, SDRS automatically makes the placements and migrations that it rec-
ommends, which requires no manual activity.
Advanced options are available to granularly control SDRS behavior. Select the
Show Advanced Options link on the settings page of the datastore cluster. Use the
No recommendations until utilization difference between source and desti-
nation is option to instruct SDRS to ensure that the target datastore utilization is
lower than the source datastore utilization by a specified percentage. For example,
if the usage threshold is 80%, a datastore is 81% full, and the difference threshold
is 5%, then the selected target utilization must be 76% or less. Notice this setting
impacts only disk space usage balancing. Another advanced option is the Check
imbalances every setting, which defines how often SDRS invokes I/O latency and
disk space usage balancing. The default setting is 8 hours. Notice this option mainly
impacts I/O latency balancing because disk space usage balancing is also automati-
cally triggered whenever the Utilized Space threshold is exceeded on one or more
datastores in the datastore cluster. Another advanced option is the I/O imbalance
threshold setting, which defines the aggressiveness of I/O Latency balancing. An
example of the Advanced Options page is shown in Figure 5-14.
Chapter 5: Clusters 233
SDRS will apply the settings from the Advanced Options page along with its inter-
nal algorithms to perform a cost/benefit analysis if a threshold is exceeded and will
make a recommendation only if a significant improvement is expected.
ScenarioAnti-affinity Rule
A Storage DRS cluster contains multiple datastores that are accessed by a cluster of
multiple ESXi hosts. A DRS rule is implemented for a pair of Active Directory do-
main controller VMs, with the setting separate virtual machines, which ensures that
a single host failure does not cause the failure of the entire AD domain. Likewise, a
requirement is defined that the failure of a single datastore should not cause the fail-
ure of the AD domain.
To satisfy the requirement in this scenario, you can create an SDRS VM anti-
affinity rule on the two domain controllers, as illustrated in Figure 5-15.
One SDRS best practice is to ensure that all datastores in the cluster are similar and
use the same back-end storage, particularly when balancing on I/O latency. Another
best practice is to run SDRS in manual mode initially and monitor recommenda-
tions before changing to automatic. A final best practice is to follow storage vendor
recommendations, especially for automatic tiered arrays. For automatic tiered ar-
rays, the vendor will likely suggest turning off SDRS balancing on I/O latency.
Chapter 5: Clusters 235
In this case, the administrator configures the action on the Storage DRS recom-
mendation alarm to send an SNMP trap to a monitoring system. She defines a
procedure to be manually followed whenever the trap is received. The procedure is
as follows:
Step 1. Use the vSphere Client to select a datastore, select its Alarms tab, select
Triggered Alarms, and verify that Storage DRS Recommendation
alarm is triggered.
236 VCAP5-DCA Official Cert Guide
Step 2. Right-click the alarm and select Acknowledge Alarm, which indicates to
others you are working to address the alarm.
Step 3. Select the Summary tab for the datastore and use it to collect details on
the current usage and free space.
Step 4. Select the datastore cluster in the inventory, and select the Datastores
tab to examine the usage and free space of all datastores in the cluster.
Step 5. Identify at least one datastore whose usage is significantly below the
threshold.
Step 6. Manually migrate at least one VM from the first datastore to the second
datastore.
Step 7. Return to the Triggered Alarms tab for the first datastore, and locate
the Storage DRS Recommendation alarm.
Step 8. Right-click the alarm and select Clear. Verify that the alarm is removed
from the list and the alert icon is removed from the datastore cluster in-
ventory object. This indicates to others that the issue is resolved.
VAAI-supported arrays that provide storage device thin provisioning can now trig-
Key
Topic ger events in vCenter Server when the thin-provisioning threshold on the storage
array is exceeded for the volume(s) backing the datastore. No default alarms are
triggered by this condition, but you can create alarms on VAAI thin-provisioned
datastores that are triggered by the event. This alarm can be configured only via
APIs, but it can be viewed in the vSphere Client as illustrated in Figure 5-17.
In this example, the latency threshold is set to 10 ms and the automation level is set
to Fully Automated.
DPM Overview
You should already be familiar with the following details in this overview. If any of
this information is new to you, be sure to conduct the appropriate research before
continuing on to the remainder of the section.
DPM is a DRS cluster feature that can be enabled and used to save electrical power
and cooling costs by automatically shutting down some ESXi hosts during periods
of low workload. DPM monitors CPU and memory activity across a cluster of hosts
and compares it to the current capacity. If it determines that the workload could
run effectively on fewer hosts, it recommends shutting down one or more hosts. It
first asks such hosts to enter maintenance mode. If DRS is fully automated, it will
migrate the VMs from a host that enters maintenance mode to other hosts in the
cluster. When the host is in maintenance mode, DPM will instruct the host to enter
standby mode, which means the host will gracefully shut down and power down.
The host remains available to DPM and can be automatically powered on and added
to the cluster if the workload increases.
The main prerequisites for DPM are for DRS to be enabled and for each ESXi host
to contain a network adapter capable of powering on the host. DPM appears as a
238 VCAP5-DCA Official Cert Guide
subset feature within the settings of DRS. DRS must be enabled before DPM can
be enabled. This implies that all requirements of DRS, such as shared storage and
vMotion, are also requirements of DPM. DPM also needs the ability to wake a host
from standby mode, which means it needs the ability to send a network command
to the host to power on. For this feature, DPM requires iLO, IPMI, or a Wake On
LAN adapter to be present in each host of the cluster. DPM must be supplied with
the proper credentials to access the interface and power on the host.
DPM Configuration
To enable DPM, edit the cluster settings, navigate to the vSphere DRS section,
Key
Topic and select the Power Management option. Set Power Management to either
Manual or Automatic; then set the Aggressiveness, as illustrated in Figure 5-18.
For each host in the cluster, navigate to the Configuration tab, select Power Man-
agement, and select Properties. Provide the appropriate IP address, MAC address,
and user credentials, as shown in Figure 5-19.
Chapter 5: Clusters 239
DPM offers many configuration options that should be set based on business needs.
It provides a threshold control that performs much like the DRS version, but the
focus is on how aggressively power operations are performed. These thresholds are
separate controls, so, for example, the DRS threshold could be set to aggressive,
while the DPM threshold could be set to conservative. The DPM Automation Level
can be set to Manual or Full Automation. When set to Manual, DPM only makes
recommendations, which require manual approval before action is taken. When set
to Full Automation, DPM automatically takes the actions it recommends, which re-
quires no manual intervention.
DPM performs a cost/benefits analysis as part of its decision making. It accounts for
costs associated with placing hosts in standby mode, such as compute costs for mi-
grating VMs, cost of compute resources lost while on standby, and cost of potential
VM performance degradation. Likewise, it accounts for similar costs incurred when
exiting standby mode and the benefits for entering and exiting standby mode. For
this computation, DRS must assign CPU and memory costs to each underlying ac-
tivity. DRS provides Advanced Options that can be configured to granularly impact
the analysis. You can use the Advanced Options button in the VMware DRS sec-
tion of the Cluster Settings page to set advanced options, such as:
PowerPerformanceRatio: Default value = 40. Range = 0 to 500.
HostMinUptimeSecs: Default value = 600. Range= 0 to maxint.
240 VCAP5-DCA Official Cert Guide
ScenarioDPM Settings
In a DRS/HA cluster running on 16 blades evenly split between two enclosures, the
administrator wants to implement power management, but business requirements de-
mand a high level of redundancy to be maintained continuously. He needs to ensure
that active compute resources are always available in each enclosure in case one enclo-
sure unexpectedly fails.
Chapter 5: Clusters 241
In this case, the administrator could choose to select two or more blades in each
Key
enclosure to disable from DPM. This allows DPM to be fully automated while en- Topic
suring that some ESXi hosts are always available in each enclosure. To make these
settings, the following steps can be performed:
Step 1. Right-click the cluster, and select Edit Settings.
Step 2. Select vSphere DRS > Power Management > Host Options.
Step 3. Select one of the ESXi hosts on the right side.
Step 4. Use the Power Management drop-down tool to select Disabled.
Step 5. Repeat steps 3 and 4 for additional hosts.
DPM Alarms
One default alarm exists related to DPM, which is the Exit Standby Error alarm.
This alarm triggers if DPM fails to bring a host out of standby mode, meaning it
does not start and does not make its resources available. You should consider con-
figuring an action to send an SNMP Trap or email on this alarm. Additionally, you
can create custom alarms that are triggered when a host attempts and successfully
completes entering and exiting standby mode.
EVC Overview
You should already be familiar with the following details in this overview. If any of
this information is new to you, be sure to conduct the appropriate research before
continuing on to the remainder of the section.
EVC is a cluster feature that is useful in scenarios where not all the hosts in the
cluster are compatible with each other for vMotion migration but are from the
same CPU vendor. It enables vMotion migration between hosts that have older and
newer versions of Intel-based CPUs. It enables vMotion migration between hosts
242 VCAP5-DCA Official Cert Guide
that have older and newer versions of AMD-based CPUs. However, it does not en-
able vMotion migrations between hosts, where one has an Intel CPU and one has an
AMD CPU.
EVC is disabled by default. It can be enabled by selecting either the Enable EVC
for AMD Hosts or the Enable EVC for Intel Hosts option on the cluster settings
page.
EVC Configuration
When enabling EVC, you must select the baseline for the appropriate CPU vendor.
The choices for the AMD CPU family are shown in Figure 5-20.
The choice for the Intel CPU family are shown in Figure 5-21.
A best practice is to initially set the baseline to the most modern generation of the
Key
Topic appropriate chip vendor that is common among all the hosts in the cluster. For
example, if in a four-host cluster, three hosts are Nehalem and one is Westmere,
select Nehalem. Notice in Figures 5-20 and 5-21 that the Description panel pro-
vides a list of processor types that are permitted for that selected baseline. EVC will
not allow hosts containing a non-listed processor to be added to the cluster.
Chapter 5: Clusters 243
A best practice is to initially enable EVC on a new cluster, prior to running any
VMs in the cluster. If running VMs need to be migrated into the cluster with vMo-
tion, their actively used CPU feature set must be compatible with the configured
EVC generation. Any running VMs with a larger feature set than the selected EVC
mode must be shut down and cold migrated into the cluster, which could be planned
for during a maintenance window. Another best practice is to enable EVC even
when all the hosts in the cluster have identical processors. Simply select the highest
generation level that fits the chip type. This makes the potential, future task of add-
ing hosts with newer CPUs much simpler, where the host might simply be added to
the cluster without having to modify the cluster settings.
EVC expects software to be written to use CPUID machine instruction to discover
its CPU features.
EVC can be set or changed on an active cluster, provided that all the VMs in the
cluster are running with a CPU feature set that is lower than the selected EVC
mode.
well as the steps, examples, and scenarios to perform common FT tasks. These steps
involve the use of vSphere Client and PowerCLI.
Overview
You should already be familiar with the following details in this overview. If any of
this information is new to you, be sure to conduct the appropriate research before
continuing on to the remainder of the section.
FT is a vSphere feature that provides fault tolerance for a VM even if the host cur-
rently running the VM fails. When a VM is protected with FT, a secondary VM is
automatically created on another host in the cluster. The technology used is similar
to vMotion, except users are not transferred to the secondary VM. Users continue
to access the original (primary) VM. The secondary VM is kept in synchronization
with the primary, which means that every CPU instruction that executes on the
primary also executes on the secondary. This is done so that if the host running the
primary VM fails, the secondary VM contains all the same information and can be
accessed in place of the primary. When a failure occurs, the secondary VM becomes
the primary, end users are reconnected to the new primary, and, if possible, fault
tolerance re-protects the VM by creating a new secondary on a surviving host.
A secondary VM has the same MAC addresses and IP addresses as the primary, but
the secondary is not actually connected to the network. The secondary is fooled
into thinking it is on the network and that it is sending and receiving exactly the
same packets as the primary. The vmkernel blocks the outgoing packets from the
secondary. FT feeds the incoming packets from the primary to the secondary via a
dedicated channel, ensuring that every packet that reaches the primary also reaches
the secondary. Likewise, the secondary VM is fooled into thinking it is reading and
writing to the virtual disk. The vmkernel blocks the outgoing disk I/O from the
secondary, and FT delivers the incoming disk I/O that reaches the primary via the
dedicated channel. The dedicated channel is a designated vmkernel virtual adapter
configured for FT logging.
VMware vLockstep is the name of the record/replay technology that allows all
instructions that run in the primary to be captured, sent to the secondary, and exe-
cuted in the secondary. It provides an acknowledgement to the primary that ensures
that each instruction is delivered to the secondary before the primary continues.
Requirements
You should verify that your hosts meet the Fault Tolerance requirements and in-
Key
Topic teroperability as defined in the vSphere Availability Guide and the VMware Com-
patibility Guide (or online matrix). Fault Tolerant Compatibility Sets are similar,
but not identical, to the Enhanced vMotion Capability Modes. The host running
Chapter 5: Clusters 245
the secondary VM must have CPUs in the same family as the host running the pri-
mary VM.
FT requires shared storage and compatible CPUs. It requires that a vmkernel port
be enabled for FT logging and that it is on a dedicated 1 Gbps or faster network. FT
requires that all power management features be turned off in the BIOS of the host.
This requirement is to ensure the host running the secondary VM does not enter
power savings mode, which could result in insufficient resources to keep the second-
ary VM running well. The primary VM must be configured with thick eager zeroed
virtual disks. FT does not support thin-provisioned or thick lazy zeroed virtual disks.
No more than four fault-tolerant VMs (primary VMs or secondary VMs) should ex-
ist on any single ESXi host.
FT Logging Configuration
Create a vmkernel port on each ESXi host in the cluster, and check the Use this
port group for Fault Tolerance logging check box on its property page, as shown
in Figure 5-22.
Operation
When a VM is protected by FT, the Summary tab of the VM contains status details,
Key such as these:
Topic
FT Status indicates whether the VM is Protected or Not Protected.
Secondary Location indicates the host where the secondary executes.
Total Secondary PCU and Total Secondary Memory indicate the second-
arys total CPU and memory usage.
Chapter 5: Clusters 247
To test the failover ability of an FT-protected VM, right-click the VM and select
Fault Tolerance > Test Failover. This causes the primary VM to be stopped; the
secondary VM to be promoted; users to be reconnected to the secondary; and a new
secondary to be created on an available, compatible host, if feasible. To migrate the
secondary VM to another ESXi host, right-click the VM and select Migrate Sec-
ondary VM and use the wizard to select the target host and a migration priority.
You can choose between two other actions on a protected VM named Turn Off FT
and Disable FT. Either option will remove FT protection from the VM, but his-
torical data will be lost if the Turn Off FT option is selected.
Summary
You should now have the knowledge and skills to successfully perform cluster ad-
ministration in a vSphere virtualized datacenter. You should also be able to success-
fully complete cluster configuration, troubleshooting, and management tasks that
may be part of the VCAP5-DCA exam. Be sure to take time to practice the steps
that are provided in this section until you are confident that you can perform such
tasks quickly and without any assistance.
Review Tasks
These Review Tasks enable you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a set
of tasks is provided instead of a set of questions. You should now attempt to perform
each of these tasks without looking at previous sections in this chapter or at other
materials, unless necessary. The steps for each task are located within the chapter.
1. Configure vSphere HA to use two heartbeat networks and two heartbeat
datastores.
Chapter 5: Clusters 249
This chapter contains material pertaining to the VCAP5-DCA exam objective 5.2.
CHAPTER 6
Patch Management
This chapter is intended to provide you with the knowledge and skills to suc-
cessfully perform patch management and the updating of ESXi hosts, virtual
machine hardware, VMware Tools, and virtual appliances. It is also intended to
ensure that you have the skills to successfully complete the configuration, trou-
bleshooting, and management tasks related to updating that might be part of
the VCAP5-DCA exam. As you read this chapter, take time to practice the steps
that are provided until you are confident that you can perform the tasks quickly
and without any assistance. Some steps involve using the vSphere Client. Others
involve using the vCLI and PowerCLI.
1. Which of the following options summarizes the steps that can be followed to
successfully install VMware Update Manager?
a. Double-click the VMware-UMDS.exe file located on the VUM instal-
lation DVD and interact with the installation wizard.
b. Double-click the VUM-install.exe file located on the VUM installation
DVD and interact with the installation wizard.
c. During the installation of vCenter Server, select the Install VMware
Update Manager option from the wizard.
d. From the VMware vCenter Installer, select the VMware vSphere Up-
date Manager option.
2. Which of the following options summarizes the steps that can be followed to
successfully configure VUM to download updates from a shared repository?
a. Select Download Settings > Use a shared repository.
b. Select Cluster tab > Shared Repository, and then select Enabled.
c. Use the vmware-umd -E --shared-store command.
d. Install the Shared Repository option using the VMware-UMDS.exe
file.
3. Which of the following options summarizes the steps that can be followed to
create a fixed baseline of critical host patches?
a. In the Create Baseline Wizard, set Baseline Type to Critical and set
Patch Option to Host Patch.
b. In the Create Baseline Wizard, set Baseline Type to Host Patch and set
Patch Option to Critical.
c. In the Create Baseline Wizard, set Baseline Type to Host Patch and set
Severity to Critical.
d. In the Create Baseline Wizard, set Baseline Type to Critical and set Se-
verity to Critical.
4. Which of the following options summarizes the steps that can be followed to
perform an orchestrated host upgrade on a cluster?
a. Select the cluster, and then select the Update Manager tab. Attach at
least two baseline groups and select the Orchestrate option. Select Re-
mediate.
b. Select the cluster, and then select the Update Manager tab. Ensure at
least two baseline groups are attached. Select Remediate. In the Reme-
diate Wizard, select the Orchestrate option.
Chapter 6: Patch Management 253
c. Ensure at least one baseline group is attached to the cluster. Use a Pow-
erCLI command with the -enableOrchestration option to start the
remediation.
d. None of these options is correct.
5. Which of the following options summarizes the steps that can be followed to
generate a report from a SQL Server query that shows the results of the latest
VUM scan?
a. Use a SELECT statement that contains a FROM clause that joins the
tables VUMV_UPDATES and VUMV_ENTITY_SCAN_RESULTS.
b. Use a SELECT statement that contains a FROM clause that joins the
tables VUM_UPDATES and VUM_ENTITY_SCAN_RESULTS.
c. Use a SELECT statement that contains a FROM clause that joins the
tables VM_UPDATES and VM_ENTITY_SCAN_RESULTS.
d. Use a SELECT statement that contains a FROM clause that joins the
tables VUM_UPDATES and VM_ENTITY_SCAN_RESULTS.
6. Which of the following options summarizes the steps that can be followed to
successfully configure smart rebooting?
a. In the Remediation Wizard, select Smart Reboot.
b. On the Configuration tab > vApp Settings, check the Enable smart
boot after remediation box.
c. In the Edit Baseline Wizard, check the Enable smart boot box.
d. Use the UPD_SmartBoot PowerCLI cmdlet.
7. Which of the following options summarizes the steps that can be followed to
begin using VMware Update Manager PowerCLI after it has been installed?
a. Start > All Programs > VMware > VMware Update Manager Power-
CLI.
b. Start > All Programs > VMware > VMware vSphere PowerCLI.
c. Double-click VMwareUpdateManagerUtility.exe.
d. Double-click UpdateManagerUtility.exe.
254 VCAP5-DCA Official Cert Guide
Foundation Topics
Overview
You should already be familiar with the following details in this overview. If any of
this information is new to you, be sure to conduct the appropriate research before
continuing onto the remainder of the chapter.
VMware Update Manager (VUM) is the component of VMware vSphere that can
be used to facilitate the patching and upgrading of ESXi hosts managed by vCen-
ter Server. Patching ESXi refers to the process of installing periodically released
vSphere patches that are usually intended to repair known bugs and vulnerabilities.
Upgrading ESXi refers to the process of installing a newer version of the product,
such as when upgrading from ESXi 5.0 to ESXi 5.1. Upgrading ESXi also refers
to installing an update for a particular version, such as upgrading from vSphere 5.0
to vSphere 5.0 Update 1. Updates are more significant than patches but are not as
significant as new versions. They are typically intended to increase the landscape
of supported hardware, operating systems, drivers, and other related items. For ex-
ample, VMware supports a higher number of processors per ESXi host and more
guest operating systems in vSphere version 5.0 Update 1 than VMware supported
for vSphere version 5.0. VUM can be used to install patches and updates and install
newer versions of ESXi over existing versions while retaining the host configuration.
VUM can also be used to upgrade VMware Tools inside a VM. It can be used to
upgrade the VM version, which is commonly referred to as the VM virtual hardware
version. Finally, VUM can be used to upgrade virtual appliances.
VUM is a product that can be installed on a Windows-based vCenter Server or on
another instance of Windows. It can be configured to check for available patches on
a scheduled basis. It provides two default host baselines, Critical and noncritical, and
it enables the creation of custom baselines. Baselines contain a fixed set of patches or
a dynamically identified set of patches, such as patches that were released prior to a
specific date.
VUM enables the administrator to attach a baseline or group of baselines to an
ESXi host or container, like a cluster. Attaching does not install the patches; it just
associates the hosts with the baseline. Likewise, VUM enables the administrator to
Chapter 6: Patch Management 255
You can upgrade ESXi 4x servers to ESXi 5.1, but not if the servers were previously
upgraded from ESXi 3.x, due to insufficient free space in the /boot partition. You
can use VUM to migrate an ESX 4.x host to ESXi 5.x, which results in a fresh install
of ESXi that retains the original ESX configuration. You cannot use VUM to roll
back to a previous host version or to uninstall a patch.
VUM Installation
VUM is a 32-bit application that must be installed on a 64-bit version of Windows.
It requires a database that, for environments having no more than 5 ESXi hosts and
50 VMs, can be built using SQL Server 2008 R2 Express, which is bundled with
VUM. Otherwise, the database can reside on a SQL Server or Oracle server, which
must be built prior to VUM installation. For large environments, you should en-
sure the database server does not run on the same Windows VM as VUM. Because
VUM is a 32-bit application, it requires a 32-bit ODBC System DSN. To prepare
for VUM installation, first create the SQL or Oracle database, then install the SQL
Native Client or Oracle ODBC drivers, and finally create the DSN. Also, ensure
256 VCAP5-DCA Official Cert Guide
that the location on which the VUM is installed has at least 125 GB free disk space
because the installer will complain unless it detects a minimum of 120 GB free
space.
To install VUM, you can run the same VMware-VIMSetup-all-5.1.0-xxxx (where
xxxx is the build number) installer program that you used to install vCenter Server.
Select the VMware vSphere Update Manage option, as illustrated in Figure 6-1.
Use the wizard and follow these steps to complete the installation:
Step 1. Select the appropriate language, and click OK.
Step 2. On the Welcome page, click Next.
Step 3. On the Patent page, click Next.
Step 4. On the License Agreement page, select Accept and click Next.
Step 5. Select the option to download updates immediately, and click Next.
Step 6. Enter the vCenter Server fully qualified name and a user account and
password with administrative privileges, as shown in Figure 6-2. Keep the
default port setting and click Next.
Chapter 6: Patch Management 257
Step 7. Choose to Use an existing supported database and select the appropri-
ate DSN; then click Next.
Step 8. Select the appropriate IP address or hostname for the VUM instance.
Keep the default port configuration. If appropriate, specify a proxy server,
as illustrated in Figure 6-3; then click Next.
Step 9. Specify a folder to install the software to. Next, specify a folder for the
repository where patches will be stored. To make a change, click the
Change button and then select the folder. Click Next.
Step 10. If a message appears warning about the disk free space, click OK.
Step 11. Click Install.
Step 12. Click Finish.
258 VCAP5-DCA Official Cert Guide
After installing the VUM server, you can add the VUM Client Plug-in to the
vSphere Client by following these steps:
Step 1. Open the vSphere Client and log on to vCenter Server.
Step 2. In the menu, select Plug-ins > Manage Plugins.
Step 3. Click the Download and install link for the VUM extension, as illus-
trated in Figure 6-4.
For situations where the VUM server will not have access to the Internet, the VUM
Download Service (UMDS) might be needed. UMDS should be installed on a
server with Internet access, perhaps a server in the DMZ. UMDS will download up-
dates from the Internet and export the updates to a location that VUM can access.
Like VUM, UMDS requires a database and a 32-bit DSN, which must be created
prior to installation.
You can use the following steps to install UMDS:
Key
Topic Step 1. On the VUM installation DVD, locate and run VMware-UMDS.exe.
Step 2. Select the language, and then click OK.
Chapter 6: Patch Management 259
Step 3. If prompted, install any missing items, such as Windows Installer 4.5.
Step 4. On the Welcome page, click Next.
Step 5. On the Patent page, click Next.
Step 6. On the License Agreement page, click Next.
Step 7. Select Existing database and select the DSN; then click Next.
Step 8. Enter any appropriate proxy settings, and then click Next.
Step 9. Select the UMDS installation folder and the UMDS patch download
folder. To make a change, click the Change button and select the folder.
Click Next.
Step 10. If warned about disk free space, click OK.
Step 11. Click Install.
Step 12. If warned about dot-Net 3.5 SP1, click OK, which automatically installs
the missing component.
Step 13. Click Finish.
To verify that VUM Server and vSphere Client plug-in are successfully installed,
use the client to navigate to Home > Solutions > Update Manager, as shown in
Figure 6-5.
This selection should open the VUM interface in the vSphere Client, as shown in
Figure 6-6.
VUM Configuration
The initial items to configure in VUM are the download settings and download
schedule.
VUM can be configured to download data from the Internet using a proxy server.
Key
Topic Proxy settings are available on the Download Settings page on the VUM Con-
figuration tab, as illustrated in Figure 6-7.
You can specify the IP address, port, and credentials for using the proxy server. You
should use the Test Connection link to verify success.
You can configure VUM to use additional download sources, where third-party
patches, extensions, and upgrades can be obtained. This is particularly useful for
patching third-party modules and third-party virtual appliances. To add a third-
party source, click the Add Download Source link on the Download Settings
page and provide a URL and description in the dialog box shown in Figure 6-8.
Chapter 6: Patch Management 261
VUM provides a download schedule that can be configured using these steps:
Step 1. Navigate to Home > Solutions > Update Manager.
Step 2. Select Configuration > Download Schedule.
Step 3. Ensure the Enable scheduled download box is checked.
Step 4. In the upper-right, select Edit Download Schedule.
Step 5. Provide values for Name and Description, or keep the defaults.
Step 6. Specify the Frequency, Start Time, and Interval; then click Next.
262 VCAP5-DCA Official Cert Guide
The VUM Server communicates with VUM client plug-ins via a specific port,
which is port 8084 by default. Likewise, each ESXi host must communicate with the
VUM server via a specific port, which is 9084 by default. These ports and the IP ad-
dress (or hostname) of the patch repository can be changed on the Network Con-
nectivity page on the Configuration tab, as illustrated in Figure 6-9.
ScenarioConfigure UMDS
You need to configure UMDS to download only ESXi 5.x updates. It must be config-
ured to disallow the download of version 4.x updates and virtual appliance updates.
Chapter 6: Patch Management 263
To meet these requirements, you can issue the following commands from a com-
mand prompt on the UMDS server:
cd \program files (x86)\VMware\Infrastructure\Update Manager
vmware-umds S enable-host disable-va
vmware-umds S d esx-4.0.0 embeddedEsx-4.0.0
In this command, replace <path> with the fully qualified path of the target folder,
such as e:\UMDS\repository. The path could also be to a temporary location or
to removable media, which could then be presented temporarily to the VUM server.
If VUM is used in the traditional manner, where it downloads data directly from
the Internet, the Download Settings page can be used to configure the download
sources and to automate the download operation. Alternatively, the Download Set-
tings page provides a Download Now button that can be used to download data im-
mediately. Whenever data is downloaded from online sourceseither immediately
or using the download schedulethe data is stored in the VUM repository, whose
path is set during the VUM installation.
You might choose to configure the UMDS to create a shared repository that is
hosted on an internal web server or file share. A shared repository is useful in sce-
narios where the VUM server has no direct access to the Internet. It is also useful
264 VCAP5-DCA Official Cert Guide
in scenarios where more than one VUM server is needed because more than one
vCenter Server is implemented.
If a shared repository is used, you can use the vSphere Client to configure VUM to
Key
Topic download data from the shared repository using these steps:
Step 1. Navigate to Home > Solutions > Update Manager.
Step 2. Select Configuration > Download Settings.
Step 3. Select Use a shared repository.
Step 4. Enter a folder path or URL to the shared repository.
Step 5. Click Validate URL.
Step 6. Click Apply.
Step 7. Click Download Now to test the configuration.
In step 4, if a folder path is used, it must be local to the VUM server. It cannot be a
network path, such as a UNC path, and it cannot be a mapped drive.
In some cases, VMware and third parties package updates in the form of offline bun-
Key
Topic dles (Zip files). You can download these bundles and import the updates from them
into VUM using this procedure:
Step 1. Download a Zip file containing the desired patches.
Step 2. Ensure you have the Upload File privilege in vCenter Server.
Step 3. Using the vSphere Client, select Configuration > Download Settings.
Step 4. Click Import Patches in the Download Sources pane.
Step 5. Browse and select the Zip file, click Next, and allow time for the download.
Step 6. Click Finish.
The location of the VUM repository is set during the installation and is controlled
by the vci-integrity.xml file. You can use the following procedure to modify its lo-
cation:
Step 1. Log in to Windows on the VUM Server. Open the Services manage-
ment console.
Step 2. Right-click the VMware vSphere Update Manager Service and click
Stop.
Step 3. Use Windows Explorer to locate and copy the vci-integrity.xml file,
which is located in the Update Manager folder within the Program Files
folder. The copy is intended for backup.
Chapter 6: Patch Management 265
Step 4. Right-click the vci-integrity.xml file and select Edit. Using a text editor,
modify the value between the <patchStore> and </patchStore> tags.
For example, if the repository is moved to a folder named VUM-Repos-
itory at the root of the E: drive, then modify the XML file to contain this
string:
<patchStore> E:\VUM-Repository\</patchStore>
Note that the folder path must end with a backslash (\).
Step 5. Start the VUM service.
You can create a dynamic, custom baseline in a similar fashion, except instead of
choosing fixed, specific patches, identify patches automatically based on property
values. For example, dynamic baselines can automatically include patches of a spe-
cific severity or time frame.
266 VCAP5-DCA Official Cert Guide
2. Provide a Name and Description. Set the Baseline Type to Host Patch.
Click Next.
3. Select Dynamic for Patch Options. Click Next.
6. Click Finish.
To modify a baseline, select the baseline in the Baselines section of the Baselines
and Baseline Groups tab and click Edit, which opens the same wizard that was
used to create the baseline. Use this wizard to make any necessary changes.
Chapter 6: Patch Management 267
A baseline group is simply a set of related baselines that can be applied and man-
aged as a single entity. To create a baseline group, click Create next in the Baseline
Groups section on the Baseline and Baseline Groups tab. For example, to create
a host baseline group, the following steps can be used:
Step 1. Navigate to Solutions and Applications > Update Manager > Base-
lines and Baseline Groups
Step 2. To the right of Baseline Groups, click Create.
Step 3. In the wizard, set Baseline Group Type to Host Baseline Group and
provide a name in the Baseline Group Name box. Click Next.
Step 4. On the Upgrades page, select one existing host upgrade baseline. Click
Next.
Step 5. On the Patches page, select one or more host patch baselines. Click
Next.
Step 6. On the Extensions page, select one or more host extension baselines.
Click Next.
Step 7. On the last page, click Finish.
Step 3. In the Import ESXi Image Wizard, use the Browse button to select an
ISO file; then click Next.
Step 4. Select the Create a baseline using the ESXi Image box. Provide a
baseline name and description. Click Finish.
Step 5. On the Baseline and Groups tab, in the Baseline Groups section, click
Create.
Step 6. Provide a unique name for the group and select Host Baseline Group,
as shown in Figure 6-12. Click Next.
Step 7. Select the ESXi 5.1 upgrade baseline that was created in step 4; then click
Next.
Step 8. Select or create the patch and extension baselines to add to the baseline
group. Click Next.
Step 9. On the Ready to Complete page, click Finish.
After creating the host baseline group, an orchestrated host upgrade can be per-
Key
formed. For example, to perform an orchestrated host upgrade on a fully automated Topic
DRS cluster, the following steps can be used:
Step 1. Select the Inventory > Hosts and Clusters, and select the cluster.
Step 2. Select the Update Manager tab, and click Attach in the upper-right cor-
ner.
Step 3. Select the baseline group, as shown in Figure 6-13. Click Attach.
Step 8. On the Selection page, select the baseline group as illustrated in Figure
6-15. Click Next.
Step 13. To generate a report, click the Generate Report option and click Next.
Step 14. On the Ready to Complete page, click Finish.
Step 1. Using the vSphere Client, navigate to Inventory > VMs and Templates
and select the appropriate folder.
Step 2. Select the Update Manager tab, and click Attach in the upper-right cor-
ner.
Step 3. Select the baseline group and click Attach.
Step 4. On the Update Manager tab, select Scan.
Step 5. In the wizard, select both VMware Tools upgrades and VM Hardware
upgrades. Uncheck virtual appliance upgrades.
Step 6. Click Scan. Wait for the scan to complete.
Step 7. On the Update Manager tab, click the Remediate button.
Step 8. On the Selection page, select the baseline group. On the Baselines pane,
select VM Hardware Upgrade to Match Host and VMware Tools
Upgrade to Match Host, as shown in Figure 6-19. Click Next.
Step 9. On the Schedule page, select Immediately for each of the three op-
tions: Powered on VM, Powered off VMs, and Suspended VMs. Click
Next.
274 VCAP5-DCA Official Cert Guide
Step 10. On the Rollback page, select the option to Take a snapshot of the
virtual machine before remediation to enable rollback. Select the op-
tion to keep the snapshot for 18 hours, and then provide a name and a
description for the snapshot. Ensure that the option Take a snapshot of
the memory for the virtual machine is not selected. Click Next.
Step 11. On the Ready to Complete page, click Finish.
Likewise, you can configure host settings using the ESX Host/Cluster Settings page
as illustrated in Figure 6-21.
This page enables you to configure items to apply during remediation, such as the
number of retries to enter maintenance mode and which features to disable.
Another automation option that is available concerns VM updates. Under the VMs
and Templates view, the Update Manager tab contains a button named VMware
Chapter 6: Patch Management 275
Troubleshooting
One potential problem when using VUM is the loss of connectivity between the
VUM server and vCenter Server. A symptom of this issue can be seen when the
VUM plug-in displays a reconnection dialog box but attempts to reconnect result
in a failure message and the plug-in is disabled. The root cause could be that either
the VUM service or the vCenter Server service has failed or has stopped running.
In this case, you might be able to correct the issue by restarting the VUM service,
the vCenter Server service, or both. The root cause could also be a network issue. In
this case, the network administrators must fix the underlying problem.
Another potential problem is the failure to remediate due to missing prerequisites.
Whenever VUM detects that some prerequisites are not met during a staging or re-
Key
Topic mediation operation, it does not install the associated updates. To examine the miss-
ing prerequisites, examine the related events on the Tasks and Events tab.
Some problems can be difficult to diagnose or repair. In these cases, VMware Sup-
port should be contacted. Typically, VMware will ask you to create a log bundle. To
create a log bundle, log on to Windows where VUM is installed and select Start >
All Programs > VMware > Generate Update Manager log bundle.
Another potential root cause for issues using VUM could involve the lack of suffi-
cient VUM privileges. The user account that is used to perform VUM tasks must be
authorized to perform the necessary tasks. Here are some examples:
To create or modify a baseline, the user must be granted the Manage Base-
line privilege.
To attach a baseline to an inventory object, the user must have the Attach
Baseline privilege.
To modify the download schedule, the user must have the Configure Service
privilege.
To remediate hosts, the user must have the Remediate to Apply Patches,
Extensions, and Upgrades privilege.
In each of these examples, permission must be made to grant a role containing the
necessary privileges to the user or group on the appropriate inventory object or con-
tainer. To determine whether an issue is caused by insufficient permissions, examine
the applied permissions. For example, if a user cannot remediate a specific ESXi
host, select the Permissions tab for the host and examine its applied permissions to
ensure that at least one permission assigns the necessary privilege to the appropriate
user.
VUM provides a mechanism for patch recall. If VMware recalls a patch, VUM
learns about the recall during the next scheduled download session as it downloads
Chapter 6: Patch Management 277
metadata. Recalled patches cannot be installed by VUM, and VUM removes any re-
called patches from its repository. If the recalled patch is already installed and its fix
(another patch) is available, VUM notifies you of the fix and prompts you to install
the patch. Key
Topic
By default, a task called VMware vSphere Update Manager Check Notification is
enabled. You can modify the time and frequency at which VUM checks for patch
recalls and patch fixes. The task automatically sends notifications via email to the
specified email addresses whenever recalls or patches are encountered. The notifica-
tion checks can be configured using these steps:
Step 1. Verify that the VUM server has Internet access.
Step 2. Navigate to Home > Solutions and Applications > Update Manager.
Step 3. Select Configuration > Notification Check Schedule.
Step 4. Ensure the Enable scheduled download box is checked, as shown in
Figure 6-23.
Upgrade vApps
VUM enables vApps to be updated in the same manner that it enables a VM folder
or datacenter to be upgraded. It provides an Update Manager tab for the vApp,
where the Attach, Scan, and Remediate options are available to update a vApp, at-
tach a baseline to it, scan it for missing updates, and remediate it. One feature that
can be applied to vApps but cannot be applied to other objects is smart rebooting.
Smart Rebooting
Smart rebooting is a feature that can be enabled on vApps. Its purpose is to ensure
Key
that after remediation, the VMs in the vApp start in the order specified by the vApp. Topic
It is enabled by default, but it can be disabled. If its disabled, the VMs in the vApp
will be restarted in the order specified by the remediation, in the same manner used
for VM folders. To view or edit this setting, follow these steps:
Step 1. Navigate to Home > Solutions and Applications > Update Manager.
Step 2. On the Configuration tab, select vApp Settings.
Step 3. Examine the Enable smart boot after remediation check box and
change it if necessary.
VUM PowerCLI requires that you begin by using vSphere PowerCLI to set the
execution mode and to connect to vCenter Server. After that is done, VUM Pow-
erCLI can be used to perform VUM administration tasks. For example, to create a
patch baseline named Critical 9-30-2013, the following commands can be used:
$patches = Get-Patch -Before 9.30.2013 Severity critical
$staticBaseline = New-PatchBaseline -Static "Critical 9-30-2013"
IncludePatch $patches
To scan a VM named vm-01 against the VMware Tools and VMware hardware
baselines that might be attached to the VM, the following command can be used:
$task01 = Scan-Inventory -Entity vm-01 -UpdateType
VmHardwareUpgrade, VmToolsUpgrade -RunAsync
In this example, the object $task01 will be set to the task that VUM launches to
perform the scan. With this approach, you can display the status of the task by en-
tering the following:
$task01
Or you could use this command to monitor the task and wait until the task
completes:
Wait-Task -Task $task01
282 VCAP5-DCA Official Cert Guide
To remediate a VM name vm-01 with all its attached baselines, the following com-
mands can be used:
$baselines = Get-Baseline -Entity vm-01
The VUM Utility is an optional tool that enables you to make changes to any of
these settings without having to reinstall VUM. It is included with VUM 4.1 Up-
date 1 and later. It is installed automatically as an additional component on the
VUM server.
To use the VUM Utility to view the options associated with the current VUM in-
Key
Topic stallation, use these steps:
Step 1. Use Windows Explorer to navigate to the installation folder for VUM,
which by default is
c:\Program Files (x86)\VMware\Infrastructure\Update Manager
After viewing the options, you can make any necessary changes. For example, to
change the proxy settings, follow these steps:
Step 1. In the Options pane, click Proxy Settings.
Step 2. Select the Use Proxy check box.
Chapter 6: Patch Management 283
Step 3. Enter the proxy server name and port numberfor example,
server01:9119, where server01 is the hostname and 9119 is the port num-
ber. Enter a username and password.
Step 4. Click Apply.
Step 5. Restart the VUM service.
To re-register VUM with a vCenter Server whose hostname has been changed, fol-
low these steps:
Step 1. In the Options pane of the VUM Utility, click Re-register to vCenter
Server.
Step 2. In the vCenter Server IP Address or Name, enter the new vCenter
hostname.
284 VCAP5-DCA Official Cert Guide
Step 3. In the User Name and Password boxes, enter the appropriate creden-
tials.
Step 4. Click Apply.
Step 5. Restart the VUM service.
Summary
You should now be enabled with the knowledge and skills to successfully patch, up-
date, and upgrade a vSphere environment. You should also be able to successfully
complete the VUM configuration, troubleshooting, and management tasks that
might be part of the VCAP5-DCA exam. Be sure to take time to practice the steps
that are provided in this section until you are confident that you can perform such
tasks quickly and without any assistance.
Key Terms
Define the following key terms from this chapter, and check your answers in the
glossary:
vSphere Installation Bundle (VIB), patch, extension, host baseline, baseline
group, VUM Utility, shared repository, offline bundle
Review Tasks
These Review Tasks enable you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a set
of tasks is provided instead of a set of questions. You should now attempt to perform
each of these tasks without looking at previous sections in this chapter or at other
materials, unless necessary. The steps for each task are located within the chapter.
1. Install VMware Update Manager Download Service.
2. Create a shared repository and use it to download updates into Update Man-
ager.
3. Create a host baseline group that contains an ESXi 5.1 upgrade and several
patches. Use it to upgrade a cluster of hosts.
4. Use Microsoft Excel to display the latest scan results for all inventory objects
and for all patches.
This chapter covers the following subjects:
vCenter Server log files and locationsThis section will detail vCenter
Server log files that are useful in troubleshooting.
ESXi log files and locationsLog files for ESXi hosts are important when
it comes to troubleshooting. A number of log files exist, and some of the
more important ones will be detailed in this section.
Tools used to view vSphere log filesSeveral different tools can be uti-
lized by the system administrator to analyze vSphere log files. This section
will discuss tools such as the Syslog Collector and Log Bundles.
The material in this chapter pertains to the VCAP-DCA Exam objectives 6.1.
CHAPTER 7
Logging
In addition, this chapter looks at tools built in to vSphere. The Syslog Collector is a
tool you can use to gather log files from multiple ESXi hosts and collect them onto a
single system. The idea is that by centralizing all the log files in one location, an ad-
ministrator will have to sift through only one system for troubleshooting information.
2. Which tool will not allow you to create a vCenter Server log bundle?
a. PowerCLI
b. vSphere Client
c. vm-support
d. vSphere Dump Collector
Chapter 7: Logging 289
3. Which log file will contain a history list of all commands run from the com-
mand line of an ESXi host?
a. hostd.log
b. syslog.log
c. auth.log
d. vCenter.log
4. Which two locations do not require installation of the Syslog Collector to pro-
vide log centralization? (Select two.)
a. A Windows-based vCenter Server
b. The vCenter Server Appliance
c. A Windows virtual machine
d. The vSphere Management Appliance
5. The vSphere ESXi Dump Collector can be configured on which two loca-
tions? (Select two.)
a. The vCenter Server Appliance
b. An Auto-Deployed ESXi host
c. A manually deployed ESXi host
d. A Windows virtual machine
290 VCAP5-DCA Official Cert Guide
Figure 7-1 The Server log file is being displayed, as well as the Export System Log tool.
Figure 7-2 Select System Log files to be included in the log bundle.
292 VCAP5-DCA Official Cert Guide
After you create the diagnostic bundle, you can FTP it or upload it to VMware sup-
port. A knowledge base document on how to upload diagnostic information is avail-
able; the kb.vmware.com document number is 1008525.
NOTE To see additional options to create the support log bundle, use the command
vm-support h for a list of additional options.
Chapter 7: Logging 293
Generate a Diagnostic Log Bundle on the ESXi Host or vCenter Server Using
PowerCLI
After logging in to the vCenter Server or an ESXi host using the Connect-viserver
PowerCLI cmdlet, you can use the Get-Log cmdlet to generate a diagnostic bun-
dle. As shown in Figure 7-4, a progress bar will display the completion status of the
diagnostic bundle created using the Get-Log cmdlet.
Figure 7-4 The progress bar running during the Get-log PowerCLI cmdlet.
As shown in Figure 7-5, upon completion the PowerCLI console window displays
the name of the output file. This Zip file can now be uploaded to VMware support
or stored for later use.
Figure 7-6 VMware programs available, which include the log bundle creator.
Generate a Diagnostic Log Bundle on the vCenter Server Using vSphere Client
The process and the steps performed to generate a diagnostic bundle on the vCenter
Server using the vSphere Client are almost identical to the steps used to generate a
diagnostic bundle on an ESXi host. However, the main difference when generating
diagnostic information using a vSphere Client pointed to the vCenter Server is that
information can be collected from any of the managed ESXi hosts and also from the
vCenter Server. This can be especially useful when troubleshooting more complex
issues not isolated to a single host.
Add a check mark to the vCenter Server and all the ESXi hosts you want included in
Key the log bundle. In Figure 7-7 you can decide which hosts will be included in the log
Topic
bundle, and you can choose to add the vCenter Server into the log bundle as well.
The screenshot shows the objects vc01.vclass.local, which is the vCenter Server,
and esxi01.vclass.local, which is an ESXi host, being included into a log bundle
created using Export System Logs.
In the Export System Logs window in Figure 7-8, you can choose which system
log files you want included in the diagnostic bundle. If you decide to add perfor-
mance data to the Support Bundle, you will need to specify how long to run the
script that gathers the data. The maximum gathering period is up to one day, and
the interval used to collect data can be up to a maximum of one hour. After deter-
mining the appropriate settings, click Next.
Chapter 7: Logging 295
Figure 7-7 Decide which hosts and vCenter Server to include in the diagnostic bundle.
Figure 7-8 Specifying which System Logs and performance information in the log bundle to
include.
In the Download Location pane in Figure 7-9, you can select Browse to choose a
location on the clients disk where you want to save the diagnostic bundle. This will
be the location where the log bundle file will be saved to on the vCenter Server.
296 VCAP5-DCA Official Cert Guide
After you have selected the download location, click Next and the system will begin
to bundle all the log files into a single file that is in tar format and is gzipped. Figure
7-10 shows the diagnostic bundle being built. The download location where the
diagnostic bundle is going to be placed is listed in the Download Details. After the
process is completed, you can inspect the compressed tar ball by uncompressing it
and extracting the tar ball. Or you can FTP the gzipped tarball to VMware support.
To modify vCenter Server logging options using the vSphere Client, select the
drop-down menu Administration and select the vCenter Server Settings option.
From vCenter Server Settings, select Logging Options. The dialog box shown in
Figure 7-11 appears, and you can set the vCenter Server logging level to the desired
option. The default option is Information; if you need a more verbose option, you
can select the Trivia option. This gives you the most logging information, which
can be beneficial in troubleshooting.
Key
Topic
Log Files
The log files for the ESXi host and vCenter Server can be useful in troubleshooting
problems with vSphere. Log file entries contain configuration and operational er-
rors as well as performance information. There are many log files on the ESXi host
and the vCenter Server. Some of the more important ESXi log files that can be used
for troubleshooting are listed in the following section.
The vCenter Server log files have different directories depending on the Windows
Server version on which the vCenter Server has been installed. The most recent
versions of vCenter Server were supported to run on Windows 2003 and Windows
2008. Both versions of Windows have different directories where the vCenter
Server log files are located. On the Windows Server 2008, the files are found in the
following directory:
%ALLUSERSPROFILE%\VMware\VMware VirtualCenter\Logs\
Key
Topic
vCenter Server Log Files
vpxd.log The main Server log file that communicates with the vCenter
Server Agent (vpxa), which is located on connected ESXi hosts.
This log file is useful for troubleshooting configuration and
operational errors.
vpxd-profiler Operational and performance counters used to profile vCenter
Server operation. This log file is useful for troubleshooting
performance issues.
\drmdump\clusternnn\ DRS actions, grouped by the DRS cluster. The log files are
gzipped.
new log, it then has to figure out what to do with the log information. The configu-
ration of how Syslog is handled is done using the vSphere Client or by using com-
mand-line commands. Figure 7-13 shows how Syslog configuration is handled using
the vSphere Client. You can see several of the configuration changes that can be
made. To configure Syslog in the vSphere Client, highlight the ESXi host, click the
Configuration tab, and then select Advanced Settings under the Software section.
Key
Topic
To configure Syslog using the esxcli command line, you first need to authenticate
to the ESXi host using an SSH client such as PuTTY. After logging in to the ESXi
host, you can execute commands using the vSphere command-line interface. The
options that are configurable in the command line in many cases have a similar func-
tionality when using the vSphere client.
An example of using the esxcli system syslog namespace is shown in Figure 7-14.
Key
The first command shows the esxcli get option, which can be used to display sev- Topic
eral Syslog settings. An example of one of the syslog settings is log file retention for
the ESXi host, which defaults to eight log files to retain. These Syslog settings can
be modified using the esxcli set option. The example in Figure 7-14 shows using
the esxcli set option to change the current number of log files, which is eight for
the ESXi host, and set the new retention value to five.
302 VCAP5-DCA Official Cert Guide
Figure 7-14 Using ESXCLI to get and set the Syslog settings for the ESXi host.
The modifications that are being made in Figure 7-14 are to system variables for the
ESXi host. The command esxcli system syslog config get shows the current values
for Syslog options. In the example, the esxcli system syslog config get command is
shown before and after the change is made to show the effect of the change. A Sys-
log change is made by running the command line
esxcli system syslog config set --<options>
An example of the set option is shown in Figure 7-14 modifying the syslog.global.
defaultRotate Syslog option. Other changes to Syslog options can also be made
using esxcli. Table 7-3 shows the Syslog configuration options that can be modi-
fied for the ESXi host. After making configuration changes, you need to restart
vmsyslogd and load the changes into live memory, which is accomplished using the
reload option, as shown in Figure 7-14:
esxcli system syslog reload
The configuration options for Syslog are detailed in Table 7-3. These options can
be changed using either the vSphere Client or the command line. An example of
making changes to Syslog using the command line is shown in Figure 7-14. Another
example of making a change to Syslog, but using the vSphere Client, is shown in
Figure 7-13.
Option Description
Syslog.global.logDirUnique A Boolean [True|False] option determines whether a
directory using the hostname is created under the configured
logDir
Syslog.global.defaultRotate Number of log files retained on the local ESXi host
Syslog.global.defaultSize Causes the log file to be rotated when it hits the default size
different machine that has network connectivity to the vCenter Server. You can se-
lect a few options during the install process, such as the maximum number of Syslog
Collector log rotations to maintain. Following the wizard prompts during the instal-
lation enables the Syslog Collector to be functional after the install.
In Figure 7-16, the log file vmkernel.log is displayed. The log file shows VMkernel
messages related to storage and contain SCSI Sense codes. The SCSI Sense codes
are an industry standard maintained by an independent organization called Techni-
cal Committee T10. The ESXi host and all storage arrays conform to this standard.
306 VCAP5-DCA Official Cert Guide
The Sense codes are sent during the status phase, which occurs prior to the Com-
mand Complete Message and indicates success or failure. Any time a SCSI com-
mand is sent to a target, the initiator expects a completion status. The various status
codes and descriptions are shown in Table 7-4.
and transmits a compressed core dump. By default, the NetDump protocol service
is registered to the UDP port 6500. The Network Dump Collector service receives
the System Dump and checks the magic numbers at the beginning and end to en-
sure it has all the necessary core dump information. Then the Dump Collector
saves the compressed core dump to a file on its own disk in a zdump format. On the
Dump Collector host, the zdump files are organized by the sending ESXi hosts IP
address in a directory format and using the date and time of the Dump Collector
Server. If the sending hosts IP address was 192.168.33.44, then the directory and
file structure would be as follows:
C:\ProgramData\VMware\VMware ESXi Dump Collector\Data\192\168\33\44
zdump_192.168.33.44-yyyy-mm-dd-hh_mm-N
You can either install the ESXi Dump Collector on a Windows Server using the
vCenter Server Installation media or configure the Dump Collector that is included
with the vCenter Server Appliance.
NOTE The ESXi Dump Collector is installed and enabled by default on the vCenter
Server Appliance. Thus, it just needs configuring on vCenter Server Appliance.
Summary
This module describes logging in vSphere. Although how logging works and is used
in vSphere 5 has changed from previous vSphere versions, behind the scenes Syslog
is still used and in general works in a similar fashion. There are a variety of methods
to bundle the log files that can be sent to VMware support or used by the local sys-
tem administrator for analysis. Of course, knowing where and what the log files are
is helpful to the system administrator. After learning where to find the log files, the
module discussed how to view the log files as well as how to change the settings for
how Syslog is implemented in vSphere 5.x. Finally, the module finished with how to
install and configure Syslog Collector and ESXi Dump Collector. Both tools can be
used to help when issues arise in the vSphere environment.
Key Terms
Define the following key terms from this chapter, and check your answers in the
glossary.
tar, gzip, PuTTY, System Log Bundle, vm-support, Syslog, Syslog Collector,
Dump Collector.
Chapter 7: Logging 311
Review Tasks
These review tasks allow you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a set
of tasks is provided instead of a set of questions. You should now attempt to perform
each of these tasks without looking at previous sections in this chapter or at other
materials, unless necessary. The steps for each task are located within the chapter:
1. Generate a system log bundle using any method from the module.
2. Generate a system log bundle, but do not include the vCenter Server.
4. Change the number of log files that an ESXi host retains to five.
Users and GroupsThis section covers how to secure the ESXi host with
users, groups, and roles. It also looks at SSH, SSL, certificates, and lock-
down mode.
Strong PasswordsThe strength of a users password and the password
policies are covered in this section.
Hardening Virtual MachinesAn often-overlooked part of security is the
security of the virtual machine itself. This section covers how to secure the
virtual machine.
FirewallThis section covers which ports and services are open on the
ESXi built-in firewall. It also discusses how to enable and disable services,
as well as open and close firewall ports using the vSphere Client, CLI, and
PowerCLI.
Custom Service and Firewall Security LevelThis section covers how to
create a custom service and explains the firewall security levels.
The material in this chapter pertains to the VCAP-DCA Exam objectives 7.1
and 7.2.
CHAPTER 8
The way in which security in vSphere works and the various methods used to
secure the environment are discussed in this chapter. Many security settings
in vSphere are controlled by variables located on the hypervisors file system.
These security-related files can be modified to control the behavior of the vari-
ous security tools within vSphere, and these changes are part of the focus of this
chapter. The process of configuring Active Directory integration with vSphere
is also explained. A demonstration on how to configure Secure Sockets Layer
(SSL) timeouts and customize Secure Shell (SSH) settings is provided. In addi-
tion, this chapter examines users and groups on the ESXi host and how to add,
edit, and remove them. Another feature discussed is how users and groups log in
using passwords, as well as how passwords can be strengthened. Other security
functions covered in this chapter include how to enable and disable certificates
(CA-signed) and how to enable lockdown mode in a vSphere environment.
This chapter also includes a section about the ESXi firewall. We identify the
esxcli configuration commands that affect the ESXi firewall, as well as explain
how to modify the firewall by performing actions such as opening and closing
ports. This section also looks at how to enable and disable services, including
how to create custom services.
The latest version of vSphere offers many ways to secure the environment and
is the most secure version of vSphere to date. Unfortunately, as more source
code and new features get added to the hypervisor, new risks will emerge that
need to be addressed. Securing a vSphere environment really boils down to
two areas: authentication and authorization. Authentication focuses on proving
you are who you say you are, and we look at the ways this is done in vSphere.
Authorization focuses on allowing or not allowing a user or group access to an
object. In this chapter, we examine a lot of features that control both authenti-
cation and authorization.
section for review. If you are in doubt, read the entire chapter. Table 8-1 outlines
the major headings in this chapter and the corresponding Do I Know This
Already? quiz questions. You can find the answers in Appendix A, Answers to the
Do I Know This Already? Quizzes and Troubleshooting Scenarios.
c. A number used as the last character counts toward the number of charac-
ter classes.
d. A number used as the last character does not count toward the number
of character classes.
Foundation Topics
Figure 8-1 shows a vSphere Client logged directly in to an ESXi host. Selecting the
Local Users & Groups tab displays the local users on the host.
Using the mouse, you can right-click the open space on the page and select Add.
This opens the Add New User window (see Figure 8-2), which you can use to
populate users directly on an ESXi host. Each user will have a unique UID, login,
and username. You will also need to add a password and assign the user to a group,
if applicable.
A user starts with no privileges. To perform actions on inventory objects, a user
must be assigned a role containing the necessary privileges. Roles are used in
vSphere to give privileges to non-root users. A role created on a vCenter Server ap-
plies privileges to users on objects in the vCenter Server inventory only and does
not apply to ESXi users or inventory objects not managed by vCenter Server. The
various types of roles available include default system roles, sample roles, and cus-
tom roles.
The three default system roles can be assigned to ESXi users and/or vCenter Server
Key
users; these are as follows: Topic
No accessNo abilities are given.
Read-onlyThe user can view but not modify objects.
AdministratorCan do everything. By default, root, dcui, and vpxuser have
this role on an ESXi host.
318 VCAP5-DCA Official Cert Guide
Figure 8-2 The Add New User window enables you to add a local user to an ESXi host.
vCenter Server has six additional premade sample roles that can be used as is, or you
can take a sample role and modify it. Ideally you would take the sample role, make a
copy of it, and then modify it. To modify the sample role, you will need a user with
Administrator privileges, such as one of these:
Virtual machine power user
Virtual machine user
Resource pool administrator
VMware Consolidated Backup user
Datastore consumer
Network consumer
The only user that is defined by default on an ESXi host is the root user. The initial
root password is typically set using the Direct Console User Interface (DCUI). It
can be changed afterward using the vSphere client. Whether adding more users to
vCenter Server or ESXi, these non-root users begin with no permissions and then
roles are assigned to these users to give them appropriate privileges on selected
objects. The roles assigned can be the default or sample roles, but in some cases a
custom role might be needed, which can be generated only by a user with the Ad-
ministrator role. Figure 8-3 displays an example of the current roles for a vCenter
Server. As you highlight each role, the users who have been assigned the particular
role are shown on the right side of the window.
Chapter 8: Security and Firewall 319
Figure 8-3 To display a current list of roles, select Home > Administration > Roles.
can range from 0 seconds, which is equivalent to no timeout value and is the default,
to a maximum of 86,400 seconds depending on what you deem to be an appropriate
value. Do the following:
Step 1. Select ESXi host > Configuration > Software > Advanced Settings.
Step 2. Highlight UserVars > UserVars.ESXiShellTimeOut.
Figure 8-5 displays Advanced Settings for an ESXi host. On the left side, all the dif-
ferent categories are shown. Below the category UserVars is highlighted, and in the
left window the variable UserVars.ESXiShellTimeOut is shown with the current
value of 0.
NOTE Use commercially signed certificates for systems that are exposed to the
Internet.
NOTE If the rui.crt and rui.key files do not exist then you do not need to back them
up; you can just go to the next step.
Chapter 8: Security and Firewall 323
NOTE When replacing the default certificate of the ESXi host, if the vCenter
Server stops managing the host, check whether the ESXi host has Verify Certificates
enabled. If this is the case, reconnect the ESXi host to the vCenter Server using the
vSphere Client.
Step 3. Go to the location where the new authenticated certificate rui.crt and
key file rui.key are located; copy the CA-signed certificate files to the di-
rectory /etc/vmware/ssl.
Step 4. Either restart the services using
# services.sh restart
Lockdown mode is available only when an ESXi host is being managed by a vCenter
Server. The following four tools can be used to enable or disable lockdown mode:
The vSphere client
The ESXi shell (using the vim-cmd command)
The Direct Console User Interface
PowerCLI
Chapter 8: Security and Firewall 325
Figure 8-7 Enabling and disabling lockdown mode using the CLI.
Enabling lockdown mode can help secure access to an ESXi host. The following
PowerCLI cmdlet enables lockdown mode. In Figure 8-9 the first and last cmdlets
list the status of lockdown mode. The middle cmdlet modifies the lockdown status
as shown here:
Powercli> (Get-VMHost <hostname> | get-view).EnterLockdownMode() |
Get-VMHost | select Name,@{N="LockDown";E={$_.Extensiondata.Config.
adminDisabled}} | ft -auto Name LockDown
This cmdlet is used to enable lockdown mode. Notice in Figure 8-9 that the status
of lockdown mode changes to True after running the cmdlet:
In Figure 8-10 notice that when the initial PowerCLI cmdlet is run that displays the
status of lockdown mode, it shows that the status is set to true. Then the PowerCLI
cmdlet is run that modifies the status to false and is executed on the command line.
So, after the PowerCLI cmdlet that modifies the status of lockdown mode is run,
the PowerCLI cmdlet that displays the status of lockdown mode is again run and
shows the new status of false or disabled.
328 VCAP5-DCA Official Cert Guide
Now that we have looked at the process of how an SSL connection works, we need
to define two of the timeout values that can affect SSL connections. After an SSL
connection becomes idle, two SSL timeouts can be configured for ESXi. By default,
the SSL connection between the server and client does not timeout; however, if a
timeout value is set, it will be in milliseconds. The two timeout settings that affect
SSL are
Chapter 8: Security and Firewall 329
Read Timeout
Handshake Timeout
The Read Timeout setting applies to connections that have completed the SSL
handshake process using port 443 of the ESXi host.
The Handshake Timeout setting applies to connections that have not completed the
SSL handshake process with port 443 of ESXi.
After adding the two lines to the config.xml file, save the file. Now that the file has
been modified to include the two timeout values, the vmware-hostd process needs
to be restarted:
# service mgmt-vmware restart
NOTE By default, ESXi must authenticate the vSphere Authentication Proxy server
when using it to join a domain. Make sure that this authentication functionality is
enabled at all times. If you must disable authentication, you can use the Advanced
Settings dialog box to set the UserVars.ActiveDirectoryVerifyCAMCertificate at-
tribute to 0.
330 VCAP5-DCA Official Cert Guide
To configure the vSphere Authentication Proxy service in the vSphere client follow
Key
Topic these steps:
Step 1. Highlight the ESXi host.
Step 2. Click on the Configuration tab.
Step 3. Under Software select Authentication Services and then select
Properties.
The Directory Services Configuration window is displayed, showing the domain
settings (see Figure 8-11). Change the Select Directory Service Type from Local
Authentication to Active Directory. The Use vSphere Authentication Proxy
option is now no longer grayed out. Check the Use vSphere Authentication
Proxy check box, and enter the Domain Name and the IP address of the proxy
server.
Pluggable Authentication Module (PAM). By default, the ESXi host checks for pass-
word compliance using the pam_passwdqc.so PAM. If the password is not compli-
ant, the following error appears:
A general system error occurred: passwd: Authentication token
manipulation error.
The pam_passwdqc plug-in is inserted into the PAM stack so that when a user
creates a password, pam_passwdqc enforces rules on the password chosen for his
account on the ESXi host. The plug-in enables you to determine the password re-
quirements that all local non-root user passwords must meet.
Key
To modify the non-root user password complexity, edit the /etc/pam.d/passwd file Topic
by finding the line that looks like this:
password requisite /lib/security/$ISA/pam_passwdqc.so retry=4
min=8,7,6,5,9
The last five numbers control the complexity of the password and refer to the four
character classes (numbers, lowercase letters, uppercase letters, and special charac-
ters). Thus, the password requirements would be as follows:
retry=4A user is allowed four attempts to enter a strong password.
N0=8Passwords containing characters from at least one character class must
be at least eight characters long.
N1=7Passwords containing characters from at least two character classes
must be at least seven characters long.
N2=6Passphrases. ESXi requires three words for the SSL certificate pass-
phrase. Each word in the passphrase must be between 8 and 40 characters long.
N3=5Passwords containing characters from at least three character classes
must be at least five characters long.
N4=9Passwords containing characters from all four character classes must
be at least nine characters long.
NOTE The pam_passwdqc plug-in does not count uppercase letters used as the first
character in the password and numbers used as the last character of a password when
the number of character classes is being counted.
332 VCAP5-DCA Official Cert Guide
Next, run a command such as ls to see the files in the VMs encapsulated directory
(see Figure 8-12).
Now using command-line tools such as the vi editor, you can modify the VMs .vmx
config file. You can also use the vSphere Client to make additions or modifications
to the VMs configuration. You must restart the VM for most changes to take effect
when you modify VM settings using this method.
Chapter 8: Security and Firewall 333
In the vSphere Client, highlight the VM, right-click, and select Edit Settings >
Options > General > Configuration Parameters (see Figure 8-13).
NOTE You can direct log files to be written to a different directory by modifying the
log.fileName value:
log.filename="/vmfs/volumes/SAN1/newVMDir/VM.log"
while logging in directly to an ESXi host using the vSphere Clientyou can enter
the username and password of a user in the domain to which the host is joined. The
advantage of this model is that you can now manage user accounts using Active Di-
rectory, thus creating the ability to manage all the users from one centralized server.
Even after AD integration, the only user defined on the ESXi host locally is the root
user for the host, and the root user will not be mapped to Active Directory.
Configure Active Directory using the vSphere Client by doing the following:
Key
Step 1. Select an ESXi host in the vSphere Client, and click the Configuration Topic
tab.
Step 2. Under the Software section, select Authentication Services.
Step 3. In the Authentication Services Settings, select Properties. The
Directory Services Configuration dialog box appears.
Step 4. In the Directory Services Configuration dialog box, select the Active
Directory service from the drop-down menu.
Step 5. In the Domain Settings, enter a domain or enter Active Directory OU
information.
Step 6. Click Join Domain.
Step 7. Enter the username and password of an Active Directory user that
has permissions to join the host to the domain, and click OK (see
Figure 8-15).
used for management purposes. The ESXi firewall protects the management inter-
face of the ESXi host, but no protection is given to the individual VM.
902Host access and heartbeat for incoming and outgoing TCP and outgo-
ing UDP
1234 and 1235vSphere replication for outgoing TCP
5988CIM transactions over HTTP for incoming TCP
5989CIM XML transactions over HTTPS for incoming and outgoing TCP
8000vMotion requests for incoming and outgoing TCP
8100 and 8200Fault-tolerance traffic for incoming and outgoing TCP and
UDP
CIMHttpServer true
CIMHttpsServer true
CIMSLP true
iSCSI false
vpxHeartbeats true
In addition, more information about the firewall rulesets, such as the port type and
protocol, can be displayed by adding the option rule to the esxcli command. The
following esxcli command provides a lot of detailed output about the various rule-
sets (see Example 8-2). The inclusion of the firewall port number and whether the
rule is for incoming sessions or outgoing sessions can be useful information. Each
ruleset can be either an incoming connection or an outgoing connection of the fire-
wall:
# esxcli network firewall ruleset rule list
Figure 8-17 The Services Properties window showing whether each service is running or
stopped.
Firewall settings can be modified by clicking the Firewall tab at the bottom right on
the Remote Services page. The Allowed IP Addresses setting has a couple of op-
tions available. If the top radio button, Allow connections from any IP Address,
is enabled, the firewall performs exactly as the name indicates (see Figure 8-20). The
bottom radio button limits which hosts or networks have access to a particular ser-
vice.
Chapter 8: Security and Firewall 345
Figure 8-20 This shows which IP addresses are allowed for a particular firewall service.
Table 8-3 Examples of esxcli Commands and the Actions They Perform
Command Description
esxcli network firewall get Displays the status of the firewall, enabled or
disabled.
esxcli network firewall set Updates default actions of the firewall.
-defaultaction
esxcli network firewall set Enables or disables the ESXi firewall. If --enabled
-enabled false, then the ESXi firewall is disabled.
esxcli network firewall load Loads the firewall module and ruleset configuration
files.
esxcli network firewall refresh If you edit a custom service, you will need to
refresh the firewall. This command reloads the
firewall configuration by reading the ruleset files.
esxcli network firewall unload Destroys filters and unloads the firewall module.
esxcli network firewall ruleset Lists the rulesets in the firewall and state of
list enabled or disabled.
esxcli network firewall ruleset Lists the rules of each ruleset in the firewall.
rule list
346 VCAP5-DCA Official Cert Guide
Command Description
esxcli network firewall ruleset Sets the allowedall flag.
set -allowedall
esxcli network firewall ruleset Enables the ruleset.
set -enabled
esxcli network firewall ruleset Lists the allowed IP addresses for the rulesets.
allowedip list
esxcli network firewall ruleset Adds the allowed IP address or range to the ruleset.
allowedip add
esxcli network firewall ruleset Removes the allowed IP address or range from the
allowedip remove ruleset.
Information on firewall services running on an ESXi host can also be attained using
the Get-VmHostFirewallException, a PowerCLI cmdlet. In Figure 8-22 a cmdlet
is used to return all the enabled firewall services and to show which incoming and
outgoing port each service is using:
Powercli> Get-VmHost esxi01.vclass.local |
Get-vmhostfirewallException | Where{$_.Enabled}
Chapter 8: Security and Firewall 347
Figure 8-22 Using PowerCLI to show more details on the enabled firewall services.
Step 2. Next, create an XML file containing the custom service using a text edi-
tor such as the vi editor. The service file will contain rules and needs to
be located in the /etc/vmware/firewall directory. Each rule will open a
port, with a direction of either inbound or outbound, and the port num-
ber for the service. Following is a sample of what the XML file needs to
resemble:
# more testserv.xml
<!-- Firewall configuration information for testservice -->
<ConfigRoot>
<service>
<id>testyserv</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>2345</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
</ConfigRoot>
Step 4. Finally, now that the firewall service is loaded into memory, verify
that the new service is running using either the esxcli command or the
vSphere Client. Following is an example of the esxcli command:
# esxcli network firewall ruleset list
# esxcli network firewall ruleset rule list | grep testyserv
Or you can use the vSphere Client to check whether the firewall service has been
loaded into memory. Highlight the ESXi host > Configuration tab > Software >
Security Profile. Then use the mouse to click Refresh for either the Services or
the Firewall, as shown in Figure 8-26.
Figure 8-26 Use the mouse to click the Refresh option to restart the firewall and services.
If you change the firewall configuration to open the firewall ports, you essentially
move in between the High Security and Medium Security levels on the ESXi host.
The security levels differ in the following ways:
1. High SecurityThis is the default. The firewall is configured to block all in-
coming and outgoing traffic, except for ports 22, 123, 427, 443, 902, 5989, and
5988. These ports are used for basic ESXi communication.
2. Medium SecurityAll incoming traffic is blocked, except on the default
ports and any ports you specifically open. Outgoing traffic is not blocked.
3. Low SecurityNo ports are blocked on either incoming or outgoing traffic.
This setting is equivalent to removing the firewall.
Summary
This module describes how to secure a vSphere environment. One of the first places
to begin hardening vSphere is with users, groups, and roles. Authentication and au-
thorization of users and groups within vSphere are important features that will en-
able a secure system. We also addressed features such as SSL; SSH; and certificates
that help protect the user, including changing the password and password aging.
There are also certain steps you will need to perform if you plan on hardening your
VM. In addition, a built-in ESXi firewall can be configured using the esxcli com-
mand. Depending on the changes you make, you can influence the firewall security
level of the ESXi host. The firewall services can be enabled or disabled using several
methods within this chapter. Ports can be opened or closed in the firewall, and a few
methods for performing the appropriate action were detailed.
Key Terms
Define the following key terms from this chapter, and check your answers in the
glossary.
Default System Roles, ESXi Lockdown Mode, vSphere Authentication Proxy,
VMCI, Firewall Ruleset, Firewall Services.
Review Tasks
These Review Tasks enable you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a set
of tasks is provided instead of a set of questions. You should now attempt to perform
each of these tasks without looking at previous sections in this chapter or at other
materials, unless necessary. The steps for each task are located within the chapter.
1. Enable SSH for an ESXi host.
7. Change the number of default log files for a virtual machine to 10.
The material in this chapter pertains to the VCAP-DCA Exam objectives 9.1,
9.2, and 5.2.
CHAPTER 9
Auto Deploy
1. Which tool defines (creates) the image profiles used with Auto Deploy?
a. The vSphere Client via the Image Profiles Management plug-in
b. The vSphere Image Builder CLI cmdlet
c. The vSphere CLI esxcli image add command
d. The vSphere Client via Host Profiles
2. Which installation method installs the ESXi image directly into host memory?
a. Scripted ESXi installation
b. Interactive ESXi installation
c. VMware Update Manager
d. vSphere Auto Deploy ESXi installation option
4. What are two attributes that can be used by the rules engine to match a target?
(Select two.)
a. MAC address
b. Inventory tag
c. FQDN
d. BIOS UUID
Chapter 9: Auto Deploy 359
5. Auto Deploy uses which method to boot an ESXi host to deploy an image
from a software depot?
a. ISO
b. PXE
c. Altiris
d. TFTP
Auto Deploy
PowerCLI
Host Profiles
Host Profile Image Builder Image
and Host Rules Engine
UI PowerCLI Profiles
Customization
Auto Deploy
Server
(Web Server)
Figure 9-1 The Auto Deploy server helps to build the ESXi image.
The host profiles and answer files, which are created and maintained using the
Host Profile UI
The ESXi host, which is deployed using a combination of host profiles and
image profiles in accordance with the active ruleset
The components work to create the parts that make up the ESXi image. The main
components are discussed in more detail in the upcoming sections. After all the
components are set up, the Auto Deploy uses a defined workflow to deploy or rede-
ploy ESXi hosts. We are going to concentrate on how the physical host deploys for
the first time. An example of the workflow is detailed in Figure 9-2.
Physical Host
Give me an IP.
VMware
Auto Deploy
DHCP Server
IP and TFTP
ESXI Assigned
to vCenter
Host Profile
Applied
to place the host in a folder or cluster on a vCenter Server. For example, to create
a simple rule named newrule1 that associates the host 192.168.10.10 to the host
profile hostprofile1, the following PowerCLI cmdlet can be used to accomplish this
task:
Powercli> New-DeployRule Name "newrule1" Item hostprofile1 Pattern
"ipv4=192.168.10.5"
For a rule to be utilized, it must be added to a ruleset. Rulesets are used to evaluate
requests from ESXi hosts attempting to boot using Auto Deploy. Two rules sets are
used with Auto Deploy: the active ruleset and the working ruleset. The active ru-
leset contains the current set of rules used to deploy new ESXi hosts. The working
ruleset can be used to test changes to rules before they are made active. By default,
when a rule is created, it is added to the working ruleset and becomes part of the
active ruleset. A rule can be added only to the working ruleset by using the
NoActivate parameter in the PowerCLI cmdlet. The following example shows a
new rule being added to both the working and active rulesets:
Powercli> Add-DeployRule newrule1
In addition to writing rules that match particular hosts, you also can write a rule to
match any host that communicates and queries the Auto Deploy server for a match.
The PowerCLI cmdlet and option that are used are the NewDeployRule cmdlet
and the Allhosts option:
Powercli> New-DeployRule Name "newrule2" Item hostprofile2
-AllHosts
The rules engine combines an ESXi image and a host profile. The Image Builder is
not needed if you plan to use a standard ESXi image. However, if you need to cus-
tomize the ESXi image, then you will need to create an image profile.
vendors drivers were provided on a single image. To remedy this issue, VMware
created a utility for third-party hardware vendors called the Image Builder. An ex-
ample of the Image Builder architecture is shown in Figure 9-3.
Depot
Image
Image
VIB VIB Profile
Profile
2
1
The Image Builder cmdlet is an extension of PowerCLI that can be used for creat-
ing custom images. So, you can download the original ESXi image from VMware,
which will be a Zip file. After downloading the Zip file, you should create a new
image by adding the hardware vendors drivers using a VIB to create one big image
that can be burned onto a DVD. This process allows third-party hardware vendors
to generate a single DVD with the ESXi image, the vendors CIM providers, and
their device drivers, which could then be presented to the customer.
The idea is to deliver an image that the customer can easily install and that the soft-
ware vendor can easily deliver. This is instead of delivering one CD-ROM or DVD
with the ESXi software and one CD-ROM or DVD with the third-party vendors
drivers. If the third-party vendor could add its drivers to the CD-ROM or DVD, it
would appear more professional to the customer. The Image Builder is one process
that makes this possible. This same process can be used to create an online PXE im-
age that Auto Deploy can use to push out to Auto Deploy clients.
NOTE Using Image Builder for customization is required only if you have to add or
remove VIBs.
Chapter 9: Auto Deploy 365
Next, you use the PowerCLI cmdlet Get-EsxImageProfile to verify that the image
depot has been imported. This cmdlet retrieves a list of all published image profiles
in the software depot. Figure 9-5 demonstrates running the Get-EsxImageProfile
cmdlet, which shows two image profiles, ESXi 5.0 (no vmware tools) and ESXi
(standard):
Powercli> Get-EsxImageProfile
So now you have a new image profile called myprofile. You can add any more VIBs
by using the Add-EsxSoftwareDepot cmdlet. After you have all the VIBs added to
the software depot that are going to be used to build the ESXi Image, you should
generate an ESXi image. The Export-EsxImageProfile cmdlet can be used to cre-
ate an installable image from the image profile in one of two possible formats. You
can either generate a Zip file that vSphere Update Manager can utilize to remediate
ESXi hosts or generate an ISO image that Auto Deploy can use to PXE boot physi-
cal hosts and deploy the new image. An example of using the cmdlet to create an
ISO image follows:
Powercli> export-esximageprofile imageprofile myprofile exporttoiso
filepath c:\depot\myprofile.iso
environment, the Auto Deploy Server, and vCenter Server with host profiles. These
four components interact to create the ability to install ESXi hosts.
PowerCLI
Key
When you install PowerCLI, you are installing a snap-in to Microsoft Windows Topic
PowerShell that hooks in through an SDK. Originally Microsoft wrote PowerShell
for system administrators (sysadmins) in a way in which the sysadmin would not
have to spend a lot of time learning to write code. The snap-in provides a series of
cmdlets created to ease the management and automation of vSphere. PowerCLI is
completely object oriented and is built on Microsofts PowerShell, which is built on
Microsofts .NET. The cmdlets that enable you to manage the complete lifecycle of
an object, including new, get, set, move, and remove, are the most common types
of cmdlets in vSphere PowerCLI. You can locate the PowerCLI installation either
on the same system as vCenter Server or on a separate Windows machine.
The first step in installing PowerCLI is to verify that a supported version of the
Microsoft .NET Framework is installed, and if it is not, install it from Microsofts
website. The next prerequisite is to have a supported version of Microsoft Power-
Shell installed or install it from Microsofts website. The final piece to install is the
vSphere PowerCLI package, which adds the vSphere snap-ins to Windows Power-
Shell. One of the snap-ins is named VMware.ImageBuilder, which provides the
cmdlets for managing software depots, image profiles, and VIBs. After PowerCLI is
installed, double-click the VMware vSphere PowerCLI icon to begin the process of
logging in to PowerCLI, as shown in Figure 9-7.
TFTP servers will come from third parties, so their setups will vary from vendor
to vendor. The DHCP server has two options that need to be set up in the DHCP
scope. The first option is the IP address of the TFTP server, which directs the ESXi
host to the TFTP server. In the scope options, option 066 specifies the IP address of
the TFTP server. The other option that is set in the DHCP scope options is option
067, which is the name of the Preboot eXecution Environment (PXE) file that is
downloaded from the TFTP server during the PXE boot process. Depending on the
third-party software you are using, open the scope on your DHCP server and add
the following options:
Scope Options
066 Boot Server Host Name 172.3.2.1 Add the IP address of the
DHCP/TFTP Server.
067 Bootfile Name undionly.kpxe.vmw-hardwired
How the scope options are set up depends on which TFTP server you are using.
Regardless of which implementation you use, the information still needs to be added
using the appropriate method. The previous information, including the IP address
of the TFTP server and the name of the bootfile, are the important pieces of in-
formation that help the ESXi host image to acquire the proper IP address and help
load the proper image.
Trivial File Transfer Protocol (TFTP) is a simple protocol that uses UPD port 69
to transfer files. The protocol is implemented using the client-server model, and
Auto Deploy requires the server component. The TFTP server does not come with
the vSphere software, so you will need to download and install a third-party TFTP
server. Fortunately, a number of viable options exist. WinAgents TFTP server has
a 30-day trial. Another popular choice is to download and install the freeware Solar-
winds TFTP server; the installation is easy. After download, all you should need to
do is start the TFTP Service and create a directory for the files.
To set up the TFTP server, add a boot image to your TFTP server root directory.
In the vSphere client, from the home view, click the Auto Deploy plug-in to get to
the Auto Deploy configuration screen. Then select the action Download TFTP
Boot Zip, which is used to download the TFTP boot Zip file and unzip it to your
TFTP servers root directory. The Auto Deploy configuration screen is shown in
Figure 9-8.
Chapter 9: Auto Deploy 369
vCenter Server
Image Image
Image Image
Profile
Image Profile
Profile Host Profile
Profile
Profile
Rules Engine
ESXI
VIBs Image Profile
Host Profile
Cache
Driver
VIBs
Walter
Step 6. Configure the Auto Deploy and TFTP environment. Download a TFTP
boot Zip file from the Auto Deploy server.
Step 7. Prepare the ESXi software depot. Add an image profile that includes all
the VIBs that will be deployed to the host. If you want to customize the
download image, use the Image Builder cmdlet.
Step 8. Use the New-DeployRule cmdlet to write a rule that assigns an image
profile to a host, multiple hosts, or all the hosts:
NewDeployRule -Name "newrule5" -Item "newimageprofile5"
AllHosts
Step 9. Boot the host to have Auto Deploy provision the host with the specified
image profile.
Step 10. Set up the new host as a reference host to provision other hosts.
Step 11. Create a host profile from the referenced host.
Step 12. Power on the hosts you want to provision using Auto Deploy.
hosts configuration to be saved and provides an excellent way to redeploy that host
by reimaging the host with the same network, storage, and configuration settings.
Creating a host profile for any host is done by creating a reference host or golden
image that can be used to provide the same ESXi configuration to any physical ESXi
host during deployment. In environments with a large number of hosts, this can save
a lot of time and help manage the host configuration.
Auto Deploy stores the information for the ESXi hosts to be provisioned in differ-
ent locations. Information about the locations of image profiles and host profiles
is initially specified in the rules that map machines. When a host boots for the first
time using Auto Deploy, the vCenter server system creates a corresponding host ob-
ject and stores the information in the database.
Host profiles can be used to set up an ESXi host by populating the host with many
potential configuration settings. The configuration parameters and values include
CPU
DNS and routing
Licensing
Memory
Networking
Storage
The host profiles feature can be used in conjunction with Auto Deploy to supply the
configuration data after Auto Deploy has imaged the ESXi host. By using a profile
of configuration settings, the new host will be quickly set up to match the properties
of the other hosts in a vSphere implementation.
Host profiles can also be used to ensure that all ESXi hosts in a cluster have the
same configuration. This is done by running a compliance check on the hosts in
the cluster. The compliance check detects whether any hosts in the cluster are not
compliant with the reference or golden host. A periodic check of the configuration
settings can be useful in large environments where changes can occur from many
different sources.
The four parts mentioned here are important, but there are other parts that can
optionally exist as well. To serve up the information the ESXi host needs to be in-
corporated into a vSphere environment, the Auto Deploy environment has several
pieces that make up the infrastructure that provisions the hosts. The various parts
of the infrastructure have to be set up, but not all the pieces are needed with every
implementation. For example, a basic ESXi server installation can be performed by
Auto Deploy without ever using Image Builder.
372 VCAP5-DCA Official Cert Guide
Figure 9-10 Install the Auto Deploy server from the vCenter Server Installer.
The vCenter Server Installer steps you through the installation process. When the
installation process is finished, the Auto Deploy Waiter service starts. The Auto
Deploy Waiter service runs as a process on the host. If you installed the Auto De-
ploy server on a Windows server, you can search through Windows Services to find
the Auto Deploy Waiter process.
NOTE Check that the Windows Service Auto Deploy Waiter is started; this is an
excellent method to reaffirm that the Auto Deploy process is installed and running on
this machine.
If the service has not started, you will need to start or restart this service. Figure 9-
11 shows the Auto Deploy Waiter process on a Windows server.
Chapter 9: Auto Deploy 373
The next step after installing the Auto Deploy server is to install the Auto Deploy
client plug-in in your vSphere client. The plug-in is used for configuration of the
Auto Deploy server. You can perform tasks such as associating the Auto Deploy
server with a TFTP boot server. If you go to the main Home tab on the vSphere
Client, you will see the Auto Deploy icon, as shown in Figure 9-12. If you do not
see the Auto Deploy icon, click Plug-ins and then select Manage Plug-ins. Find
the Auto Deploy Plug-in and enable it, or disable and then enable it.
Bulk Licensing
There is no option built in to Auto Deploy or host profiles to attach a license to an
ESXi host that is built using Auto Deploy. Because one of the main ideas behind us-
ing Auto Deploy is to automate the installation process of an ESXi host, manually
adding a license key to an Auto Deployed host would be considered a problem. To
get around this issue, you can configure bulk licensing to use predefined license keys
to automatically be added to an ESXi host that is Auto Deployed. There are two
ways to assign license keys to an ESXi host. The first method is using the vSphere
client; the second method is using PowerCLI.
Method #1
You can use the vSphere client to attach an individual license key to an ESXi host.
This is the standard method for licensing: you assign a license key to a specific host
when you add the host to the vCenter server. The issue is that this is not an auto-
mated process.
Method #2
Bulk licensing uses PowerCLI to add predefined license keys to ESXi Auto De-
ployed hosts, so that a license key is automatically assigned to the hostor if the
host reconnects to the vCenter server, it is assigned a license. A license key assigned
using PowerCLI is treated as a default license. If an unlicensed host is added or re-
connected to vCenter server, it is assigned the default license key. LicenseDataMan-
ager makes it possible to retrieve, add, remove, and modify the association between
the license data and the ESXi host. The LicenseDataManager associates the license
data with the ESXi hosts. The license data pairs up the license type ID with a license
key and keeps track of that information. The presence of the license data makes it
possible to support automatic licensing when hosts are added to a vCenter server.
This is important because you do not want to have to manually add a license. The
automation of the LicenseDataManager is important to making the Auto Deploy
process as hands-off as possible.
Here is the procedure for bulk licensing:
Step 1. Add CPU ESXi licenses to the vCenter server, or check that licenses are
available.
Step 2. Connect to vCenter server using PowerCLI to configure bulk licensing:
Powercli> Connect-Viserver Server vcenterAddress
User root Password passw
Chapter 9: Auto Deploy 375
Step 4. Bind the variable $dataCenter to the datacenter where the ESXi hosts
that will be licensed are located:
Powercli> $dataCenter = Get-DataCenter Name
dataCenterNameX
Step 5. Create a new licenseData object and then a new licenseKeyEntry, with
associated type ID and license key:
Powercli> $licenseData = New-Object VMware.VimAutomation.
License.Types.LicenseData
Powercli> $licenseKeyEntry = New-Object Vmware.
VimAutomation.License.Types.LicenseKeyEntry
Powercli> $licenseKeyEntry.TypeId = "vmware-vsphere"
Powercli> $licenseKeyEntry.LicenseKey = "XXXXX-XXXXX-XXXXX-
XXXXX-XXXXX"
Step 7. Update the license data for the datacenter with the LicenseData object:
Powercli> $licenseDataManager.UpdateAssociatedLicenseData
($hostContainer.Uid, $licenseData)
Step 8. Verify that the license is associated with the host container:
Powercli> $licenseDataManager.QueryAssociatedLicenseData
($hostContainer.Uid)
Deploy process loads the ESXi image into the physical servers memory. This is
done when the physical host that is going to become an ESXi host begins to power
on. During the boot process, the image profile, the host profile, and any software
configuration add-on pieces are loaded into RAM. The host then proceeds to finish
booting and starts regular processing.
Because the entire ESXi host is loaded into memory, a power-off of the ESXi host
causes the image to be lost, and the ESXi host has to PXE boot again to re-
provision an ESXi image. If the ESXi host reboots, it PXE bootsor it can boot
from cache using its same image and host profile. If you want to use a different
image profile, then you need to change the rule that the rules engine supports.
Point the rule to the new image profile and/or host profile.
The true test of the Auto Deploy process is to PXE boot the physical host. As the
physical host establishes communication with the Auto Deploy server, during the
boot process you should see an IP address being assigned. Then the PXE boot finds
a TFTP boot image and starts to load the image profile and any host profile into
memory. Then Auto Deploy assigns the host to the appropriate vCenter server.
There is also an option on this screen to create a host profile as well. NewProfile1
is an example of a host profile that contains the standard collection of configuration
settings that will be applied to new ESXi hosts deployed with Auto Deploy. After
378 VCAP5-DCA Official Cert Guide
you have this golden image, you can attach the host profile to hosts/clusters to
ensure that they contain the correct configuration data. Figure 9-15 shows that the
host profile NewProfile1 is being attached to the host esxi01.vclass.local.
Now that the host profile is attached to the host, you can check for compliance.
This compliance check can be used to maintain configuration consistency through-
out the datacenter. So when a discrepancy is discovered, the system administrator
can fix the issue by applying the host profile to the noncompliant host. Because
network changes for the host might be necessary as part of the remediation, the host
must be put into maintenance mode before the host profile can be applied.
The same namespace can be used to modify VMkernel options. Keep in mind you
can cause serious problems if you make mistakes when you change VMkernel set-
tings because you are modifying the kernel. To make a change, you need to add
the set command to the namespace, along with the proper name for the VMkernel
setting and the value to which you want to change the setting. Several VMkernel
settings can be changed, such as the setting maxPCPUS, which is the maximum
number of physical CPUs the VMkernel should use. Another example is fsCheck,
which is a Boolean value that determines whether to run the filesystem check on the
system partitions. An example of using the set command to set the maximum num-
ber of physical CPUs to 2 is shown in Figure 9-19.
Another method to modify VMkernel options is to use the vSphere client. First, se-
lect an ESXi host in the hierarchical view. Next, select the Configuration tab, and
then in the Software box select the Advanced Settings option. The left column
lists a number of parameters that can be modified, such as settings for the processor,
memory, and SCSI. Although several changes can affect the vSphere environment,
Chapter 9: Auto Deploy 381
any changes made to the VMkernel.Boot parameter will not take effect until after a
reboot of the ESXi host. An example of using the vSphere client to view the VMker-
nel boot advanced settings is shown in Figure 9-20.
Figure 9-20 Using Advanced Settings option to view and modify VMkernel settings.
Summary
This module describes how to set up and utilize an Auto Deploy environment.
There are standard steps that need to be done to use Auto Deploy, and there are
optional methods and steps that can be performed as well. The reasons to use Auto
Deploy include the ability to rapidly automate the provisioning of new ESXi hosts
and reimaging an existing host. In this chapter, you learned about Image Builder,
which can be used to modify a standard ESXi image. Auto Deploy can then use the
image built by Image Builder to deploy ESXi hosts. You also learned about add-
ing and removing custom drivers as well as how to use advanced boot options. We
reviewed how host profiles can be added to the deployment process. Host profiles
382 VCAP5-DCA Official Cert Guide
enable settings from a reference host to be used in conjunction with Auto Deploy
to deploy ESXi hosts with the same configuration information and base ESXi im-
age. The host profile and the ESXi image can be combined within the Auto Deploy
server using the rules engine. The rules engine is used to determine which image
and host profile an ESXi host will receive when it attempts to PXE boot.
Key Terms
Define the following key terms from this chapter, and check your answers in the
glossary.
Auto Deploy, Auto Deploy Rules Engine, VIB, CIM, Image Builder, Image
Profile, Host Profile, Software Depot, PowerCLI, TFTP Server, PXE
Chapter 9: Auto Deploy 383
Review Tasks
These Review Tasks allow you to assess how well you grasped the materials in this
chapter. Because of the advanced and hands-on nature of this particular exam, a set
of tasks is provided instead of a set of questions. You should now attempt to perform
each of these tasks without looking at previous sections in this chapter or at other
materials, unless necessary. The steps for each task are located within the chapter.
1. Install an Auto Deploy environment.
Scenarios
This chapter is intended to challenge you to apply your skills to address multi-
ple scenarios that call for advanced vSphere administration. It provides one sce-
nario for each major objective identified in the VCAP5-DCA Exam Blueprint.
In each scenario, assume you are the assigned vSphere Administrator, review
the brief overview and objectives, and address the specific requirements.
This chapter is intended to help you assess your ability to address scenarios
that might be similar to scenarios in the VCAP5-DCA exam involving con-
figuration, troubleshooting, and management tasks. As you read each scenario,
attempt to address each requirement and perform the necessary tasks without
looking at the provided possible solution. Take time to practice the steps that
are provided until you are confident that you can perform such tasks rather
quickly and without any assistance. Some steps involve using the vSphere Cli-
ent. Others involve using the vCLI and PowerCLI.
386 VCAP5-DCA Official Cert Guide
Foundation Topics
Objectives: You want to add iSCSI storage to the host using the software iSCSI
adapter, but you first need to configure the vmkernel ports. You want the solu-
tion to allow for storage multipathing.
Specific Requirements: Configure the two vmkernel ports, and configure
an iSCSI software adapter to bind to the vmkernel ports per VMware best
practices.
Specific Requirements: Disable checking for the PSP and SATP configura-
tion for NMP devices, PSA device configuration, and Software iSCSI Ini-
tiator Configuration items.
Scenario 10-15Configure UMDS and a Shared Repository
Overview: Your vSphere environment resides in a network where you must
comply with strict, company-imposed network security policies. One policy re-
quires the network to prevent any servers in the local area network (LAN) from
connecting to any external servers, including via firewalls.
Objectives: Implement Update Manager Download Service (UMDS) in a VM
residing in the demilitarized zone (DMZ), and use it to download updates to a
shared folder in the network. Configure the VMware Update Manager (VUM)
server in the network to use the shared folder to obtain updates.
Specific Requirements: Install UMDS server in a VM that runs in the DMZ.
Export downloaded updates to a specific server location (e:\UMDS\repository),
and configure VUM to use a shared repository (z:\UMDS\repository).
automatically fix themselves, and sometimes you have to manually fix the con-
nections.
Objectives: You need to gain familiarity with symptoms of and possible causes
for lost connections between ESXi hosts and vCenter Server. To do so, you
plan to use a test environment to deliberately break connections in various ways
and examine the symptoms, alarms, and logs.
Specific Requirements: Perform each of the following breaks. After per-
forming each break, attempt to use the vSphere client and the web client to log
in to vCenter Server and examine the Hardware Status of the host. Pay atten-
tion to any errors, warnings, alarms, or other signs of connectivity issues. Exam-
ine the log files on the ESXi host and vCenter Server, and pay attention to any
related entries. Undo each break before moving on to the next break:
Stop the vCenter Server agent on the ESXi host.
Disallow vCenter Server agent traffic through the host firewall.
Allow vCenter Server agent traffic through the host firewall, but only
from a range of IP addresses that do not include the vCenter Server.
Change the permissions of the local vpxuser account to Read Only.
need to create a custom DNS service on port 53 over TCP in the ESXi firewall
on each host.
assess your knowledge and skills that are covered in Objectives 9.1 and 9.2 in the
VCAP5-DCA Blueprint. These skills include installing ESXi hosts with custom set-
tings and using Auto Deploy.
Scenario 10-25Use Image Builder to Add a Custom Driver
Overview: The host hardware on which you need to install includes an OCZ
Technology Z-Drive R4 Solid State Drive (SSD). The standard ESXi installer
contains all the drivers you need, except the best driver for the SSD.
Objectives: Use Image Builder to build a custom ESXi installer where the stan-
dard ESXi Installer is merged with the custom OCZ Z-Drive R4 C Series and R
Series SSD driver.
Specific Requirements: Use Image Builder to use a depot file named
VMware-ESXi-5.1.0-799733-depot.zip that contains the standard ESXi
profile and a depot file named ocz10xx-1.0.0-751505.zip that contains the
custom SSD driver. Create a new image profile that merges the driver with the
standard profile. Export the ISO file to a file named Custom-ESXi.iso.
Scenario 10-26Auto Deploy
Overview: Your vSphere environment is quickly growing. Deploying new ESXi
hosts and updating ESXi hosts is taking a lot of your time.
Objectives: Simplify the process for deploying and updating ESXi servers by
implementing Auto Deploy, importing the standard image profile, and creating
appropriate rules.
Specific Requirements: Enable Auto Deploy on a vCenter Server Appliance.
Use PowerCLI to
Add a software repository file named update-from-esxi5.1-5.1_
update01.zip as an offline software depot.
List the image profiles in the repository, and verify one is named
ESXi-5.1.0-20130402001-standard.
Create a rule that assigns the ESXi-5.1.0-20130402001-standard
profile to all ESXi hosts.
Create a rule that assigns all hosts to a cluster named Cluster-01.
Add both rules to the current working rule set.
List the rules in the current working rule set.
Chapter 10: Scenarios 397
Summary
You should now have had an opportunity to practice the skills needed to successfully
tackle various scenarios directly related to objectives covered by the VCAP5-DCA
exam, including scenarios around vSphere configuration and troubleshooting. Be
sure to take time to practice the steps that are provided in this section until you are
confident that you can perform such tasks rather quickly and without any assistance.
APPENDIX A
Chapter 2
1. c
2. b
3. c
4. b
5. d
6. a
7. c
8. b
Chapter 3
1. d
2. b, c
3. a, c
4. a
5. b, d
400 VCAP5-DCA Official Cert Guide
Chapter 4
1. c
2. c
3. a
4. d
5. d
6. b
7. b
Chapter 5
1. a
2. a
3. a
4. d
5. c
6. c
Chapter 6
1. d
2. a
3. c
4. d
5. a
6. b
7. b
Chapter 7
1. a
2. d
3. b
4. b, d
5. a, d
Appendix A: Answers to the Do I Know This Already? Quizzes 401
Chapter 8
1. c
2. a
3. a, c
4. d
5. b, d
6. d
7. b
Chapter 9
1. b
2. d
3. d
4. a, d
5. b
6. c
7. d
APPENDIX B
Hands-On Solutions to
Chapter 10 Scenarios
The hands-on solutions in this appendix apply to the scenarios presented in
Chapter 10, Scenarios.
esxcfg-mpath -b -d naa.600601604550250018ea2d38073cdf11
2. Examine the results. For this example, assume the paths are vm-
hba33:0:0:0, vmhba33:0:1:0, vmhba33:0:2:0, and vmhba33:0:3:0.
3. Execute this command to display the current claim rules:
4. Examine the results. For this example, assume the rule numbers 192195
are unused and the rule that currently claims the LUN has a number
greater than 195.
5. Execute these commands to add claim rules (to assign each of the LUNs
paths to the MASK_PATH plug-in):
esxcli storage core claimrule add --rule 192 -t location -A
vmhba33 -C 0 -T 0 -L 0 -P MASK_PATH
esxcli storage core claimrule add --rule 193 -t location -A
vmhba33 -C 0 -T 1 -L 0 -P MASK_PATH
esxcli storage core claimrule add --rule 194 -t location -A
vmhba33 -C 0 -T 2 -L 0 -P MASK_PATH
esxcli storage core claimrule add --rule 195 -t location -A
vmhba33 -C 0 -T 3 -L 0 -P MASK_PATH
404 VCAP5-DCA Official Cert Guide
7. Execute these commands to unclaim all the LUNs paths from the currently
assigned plug-in and reclaim the paths on the newly assigned plug-in.
esxcli storage core claiming reclaim -d naa.600601604550250018ea
2d38073cdf11
esxcli storage core claiming unclaim -d naa.600601604550250018ea
2d38073cdf11 -t location
esxcli storage core claimrule run
5. Select Properties. On the Network Binding tab, use the Add button to add
each of the two vmkernel ports.
Appendix B: Hands-On Solutions to Chapter 10 Scenarios 405
On the NIC Teaming tab for the Management Network vmkernel port, set
vminic0 as an Active uplink and vmnic3 as Standby.
On the NIC Teaming tab for the VMotion vmkernel port, set vminic3 as an
Active uplink and vmnic0 as Standby.
Use a tool such as WinSCP to copy the results.csv file from the vMA to the
Windows desktop.
On the Windows desktop, launch Perfmon. Use the Source tab of its Proper-
ties page to change the source to the results.csv file.
Use the Data tab to change the counters to include just the CPU Ready Time.
SATP configuration for NMP devices check box (where XX refers to the
appropriate vmhba device number assigned to the software iSCSI initiator).
In the vSphere Client, select Home > Solutions > Update Manager.
Select Configuration tab > Download Settings.
Select Use a shared repository, and set the folder path to z:\UMDS\
repository.
Click Validate URL and click Apply.
Click Download Now to test the configuration.
Examine the memory usage of the VM. If it is consistently near 80% or more
or if it frequently spikes to 90% or more, it might benefit from additional
vRAM.
mv rui.crt orig.rui.crt
mv rui.key orig.rui.key
/sbin/generate-certificates
Add-ESXSoftwareDepot d:\depot\ocz10xx-1.0.0-offline_
bundle-751505.zip
Add-ESXSoftwareDepot d:\depot\VMware-ESXi-5.1.0-799733-depot.zip
Get-ESXImageProfile
Get-ESXSoftwarePackage
Appendix B: Hands-On Solutions to Chapter 10 Scenarios 415
DPM Distributed Power Management (DPM) is a DRS cluster feature that can be
enabled and used to save electrical power and cooling costs by automatically shut-
ting down some ESXi hosts during periods of low workload.
DRS Distributed Resource Scheduler (DRS) is a vSphere feature that provides au-
tomatic balancing of CPU and memory workloads across a cluster of ESXi hosts. It
achieves the balancing by placing new VMs on hosts and by migrating running VMs
with vMotion as needed.
DRS affinity rule A rule that forces DRS to keep two or more VMs running on
the same host in the cluster.
Dump Collector A vCenter Server support tool used to dump the vmkernel
memory to a network server, rather than to disk.
esxcli A modern namespace utility for managing ESXi hosts via the command line
from within ESXi Shell and the vSphere Management Assistant (vMA).
ESXi Lockdown Mode Affects how users access an ESXi host using DCUI, SSH,
and ESXi Shell.
ESXi Shell A command-line interface available directly on the ESXi host.
EtherChannel A link aggregation protocol developed by Cisco that treats mul-
tiple physical links as a single logical link to provide fault tolerance and increased
bandwidth.
EVC Enhanced vMotion Compatibility (EVC) is a cluster feature that is useful in
scenarios where not all the hosts in the cluster are compatible with each other for
vMotion, but they are from the same vendor.
extension A set of related vSphere Installation Bundles (VIBs) that add an op-
tional feature or component to an ESXi host.
firewall ruleset Defines whether a service is allowed or disallowed on the ESXi
host.
firewall services These are processes that access the management network and
pass through the firewall if enabled.
guest latency Storage I/O latency from the VMs point of view. The VMkernel
latency plus the device latency.
gzip This command originated as a replacement for the compress program in
Unix and was created for the GNU Project to compress and uncompress files.
HA Admission Control A mechanism aimed at ensuring sufficient resources are
available in case of VM failover. It is applied as VMs attempt to power on to prevent
the action if it would violate the Admission Control Policy, which can be based on
reservations, dedicated failover hosts, or slot size calculation.
Glossary 419
NPIV N-Port ID Virtualization, which is used when you want a virtual machine
to be assigned a World Wide Port Name (WWPN) with the SAN fabric.
offline bundle A Zip file containing patches, extensions, and upgrades. It can be
imported into VMware Update Manager (VUM).
patch A set of related VIBs that addresses a particular vulnerability, issue, or en-
hancement.
performance graphs Customizable graphs provided in the vSphere Client for re-
porting resource usage and performance metrics for VMs and ESXi hosts.
PowerCLI A command-line interface used to manage all of vSphere, including
vCenter and applications requiring vCenter, like VMware DRS.
promiscuous mode A feature of a vSwitch port group that permits the port group
to receive all network packets that are sent to and from all other ports in a port
group or on the vSwitch.
PSA Pluggable Storage Architecture is an architecture that defines how multipath-
ing works within vSphere.
PSP Path Selection Plug-in performs the task of selecting which physical path to
send I/O requests.
PuTTY A free and open-source terminal emulator. It is commonly used to sup-
port SCP and SSH protocols.
PXE Also known as the Preboot eXecution Environment, a file is downloaded
from the TFTP server during the PXE boot process.
RDM Raw Device Map, which allows storage to directly be accessed to and from
the ESXi host.
SATP Storage Array Type Plug-in is a driver for a storage array that monitors the
health of each physical path on the array, and can handle path failover.
SDRS intra-VM anti-affinity rule A rule that forces SDRS to keep two or more
virtual disks belonging to the same VM running on separate hosts in the cluster.
shared repository A shared folder or website from which VUM can download
updates with the WAN.
SNMP Simple Network Management Protocol, which is a protocol used by moni-
toring systems to query managed objects for status information. It is also used by
managed systems to automatically notify monitoring systems of status changes and
events. It is commonly used to detect faults, unauthorized access, and usage of net-
work devices and servers.
Glossary 421
software depot Stores ESXi images and additional VIBs. The Image Builder
groups the necessary VIBs to form an ESXi image to be deployed. It can be either
online or offline.
Standard vSwitch (vSS) A vSwitch that is controlled by a specific ESXi host.
Storage DRS Storage DRS (SDRS) is a vSphere feature that provides automatic
balancing of disk space usage and disk I/O latency across a cluster of data stores.
storage replica A copy of a LUN to another LUN that is created by the storage
system.
storage snapshot A point-in-time capture of the data in a LUN that is created by
the storage system.
syslog Developed by Eric Allman as a standard for Unix logging.
Syslog Collector A vCenter Server support tool that allows for the combining of
system log files to a single server for syslog processing.
system log bundle VMware Technical Support might request log files and con-
figuration files during a support call. When you create a system log bundle, you are
forming one file to upload to VMware Support.
tar This command originated in Unix and is short for tape archive. The command
itself is being used to combine multiple files in a single file. There is also an option
to untar or uncombine them into multiple files.
TFTP server A third-party server that serves the boot images that Auto Deploy
provides.
traffic shaping A method for limiting some network traffic to effectively improve
the performance of other network traffic. In vSwitches, traffic shaping can be used
to configure limits on the average and peak traffic per virtual switch port group.
UUID Universal Unique Identifier, which is used to match a LUN to a specific
Virtual Machine File System (VMFS) datastore.
VAAI vStorage API for Array Integration is a set of APIs and SCSI commands
used to offload certain functions that are performed more efficiently on the storage
array.
VASA VMware vSphere vStorage APIs for Storage Awareness, which is a set of
APIs that a storage vendor can provide to advertise information about the storage
array.
vCLI A command-line interface for managing ESXi hosts from a remote Linux or
Windows machine. It provides the esxcli and vicfg commands.
422 VCAP5-DCA Official Cert Guide
VIB Also known as a vSphere Installation Bundle, its a collection of files packaged
into a single Zip or tar archive. VMware and its partners package the ESXi base im-
age, drivers, CIM providers, and vendor plug-ins.
VLAN Virtual LAN, which is a logical network partition of a physical network.
VLANs are used to segment traffic and isolate broadcast domains.
VLAN Trunking VLAN Trunking Protocol (VTP) is a protocol that allows a
network port to transfer packets for multiple VLANs. VTP is commonly configured
on ports used to connect two switches.
vLockStep The play/replay technology in Fault Tolerance (FT) that is used to
keep the secondary VM in sync with the primary VM, such that each instruction
that executes in the primary immediately executes in the secondary.
vMA The vSphere Management Assistant is a virtual appliance used to remotely
manage vSphere. It provides vCLI and fastpass.
VMCI The Virtual Machine Communication Interface allows direct communica-
tion between one virtual machine to another virtual machine.
VMFS The Virtual Machine File System is a block-based file system that is only
used with local disk or LUNs.
VMkernel latency The amount of time a storage operation is processed by the
VMkernel, including queuing and driver processing time.
VMkernel log The VMkernel.log file on the ESXi host.
vmkfstools A command utility to manage VMFS datastores and virtual disks from
within ESXi Shell and the vMA.
vm-support A command-line utility that produces a gzipped tarball system log
bundle.
VMware FT VMware FT is a vSphere feature that provides fault tolerance for a
VM even if the host it is running on fails.
VMware HA VMware HA is a vSphere cluster feature that provides automatic
high availability for VMs and applications.
vscsiStats A utility in the ESXi Shell that collects storage metrics and produces
histograms. Metrics include latency, seek distance, I/O size, and inter arrival time.
vSphere Authentication Proxy This service is also referred to as the CAM ser-
vice and enables an ESXi host to join an Active Directory domain without using Ac-
tive Directory credentials.
vSphere Client A C#-based graphical user interface to manage vSphere.
Glossary 423
vSphere Installation Bundle (VIB) The smallest software package that can be
installed on an ESXi host.
VUM Utility A tool that can be used to view and change settings that were made
during the VUM installation.
FREE
Online Edition
Your purchase of VCAP5-DCA Official Cert Guide includes access to a free online edition for
45 days through the Safari Books Online subscription service. Nearly every VMware Press book
is available online through Safari Books Online, along with thousands of books and videos from
publishers such as Addison-Wesley Professional, Cisco Press, Exam Cram, IBM Press, OReilly
Media, Prentice Hall, Que, and Sams.
Safari Books Online is a digital library providing searchable, on-demand access to thousands
of technology, digital media, and professional development books and videos from leading
publishers. With one monthly or yearly subscription price, you get unlimited access to learning
tools and information on topics including mobile app and software development, tips and tricks
on using your favorite gadgets, networking, project management, graphic design, and much more.