VCAP-DCA Study

I found over the years that I don’t really know something until I can teach it to someone else.

I plan on writing some new posts inspired by the VCAP-DCA blue print.

Here is some good resources based on the VCAP-DCA

Most of my old VCDX study notes are based on the VCDX3 path.

http://www.simonlong.co.uk/blog/vcdx-study-notes/

http://professionalvmware.com/brownbags/

http://www.seancrookston.com/2011/02/02/the-vcap-dca-study-guide-lives-on/

http://www.seancrookston.com/vcap-dca/ (more links here)

 

Any resources I am missing?

My Fun with the VMware Enterprise Administration and Design Exams

Sorry I have been missing for a few weeks. I know many were quite worried why I hadn’t blogged for a couple weeks (not really).

Back in February I sat for the Enterprise Administration Exam at PEX in Las Vegas. It was scheduled the day after the Super Bowl, what a bunch of distractions. Thankfully I passed and I want to give my experience so as to not violate any rules or anything I agreed to. This was a technical test. A lot of settings and configurations and information like that. Still multiple choice so at least you know the right answer is on the screen (hopefully, I did have one I thought none of these are right). The lab section was actually as fun as test taking could be. I wish there was more lab practical type things when it comes to these kinds of tests. Overall there is more intricate settings and config questions then you will find on the VCP exam.

At the end of April I took the Design Exam. This was a much different experience. I had a extremely hard time finding a study list of things that would help. Know the Exam Blueprint is all I would say. Also, this I think is where VMware can start finding out who does Architecture work and who may be an Administrator. I could say you could read every PDF on VMware.com and still not know how to pass this test unless you work with the solutions multiple times. The design drawing was a challenge, I wasted too much time reading the requirements document and ran of time, but I feel I was able to get a good portion of what I needed up on the page. Technically the interface was kind of quirky.

I felt both exams were challenging and but were fair to the Exam Blueprints. Nothing on there made me scream, “they didn’t say they would test on THAT!” The design exam needs some technical improvement (matching questions were buggy).

Now begins the harder and more involved process. The Design submission and hopefully an invitation to a defense.

ESX Commands: esxcfg-vswif

The esxcfg-vswif command allows you to create and modify Service Console ports and their IP information. Many times I have to change stuff after the install process is complete and the only place is via the direct service console because network communication is not possible. This usually happens when the network team changes a vlan in the middle of the install or they change a subnet. Not to disparage network teams many times I am the network team and the virtualization team.
Create a new vswif:
#first add a port group with esxcfg-vswitch
esxcfg-vswitch -A "Service Console Test" vSwitch-Test
#then use esxcfg-vswif to create a new vswif
esxcfg-vswif -a -i 172.16.50.40 -n 255.255.255.0 -p "Service Console Test" vswif1
#List your vswifs
esxcfg-vswif - l
#Example:
[root@esx3 root]# esxcfg-vswif -l
Name Port Group IP Address Netmask Broadcast Enabled DHCP
vswif0 Service Console 172.16.50.50 255.255.255.0 172.16.50.255 true false
vswif1 Service Console Test172.16.50.40 255.255.255.0 172.16.50.255 true false

Modify your Service Console network information:
esxcfg-vswif -i 172.16.50.41 -n 255.255.255.0 vswif1
#example
[root@esx3 root]# esxcfg-vswif -i 172.16.50.41 -n 255.255.255.0 vswif1
Setting IP config
Nothing to flush.
[root@esx3 root]# esxcfg-vswif -l
Name Port Group IP Address Netmask Broadcast Enabled DHCP
vswif0 Service Console 172.16.50.50 255.255.255.0 172.16.50.255 true false
vswif1 Service Console Test172.16.50.41 255.255.255.0 172.16.50.255 true false

ESX Commands: esxcfg-vmknic

You need to have VMkernel ports to do VMotion, Software iSCSI and Fault Tolerance. These ports can be easy to create and manage from the command line. I generally can be found adding them for vSphere iSCSI. I especially use the cli for tasks that are repeated over and over. Creating multiple ports per ESX host is time consuming and tends to introduce typing errors. So it is always a good idea to get them all done in a script file to reduce the chance for error.

List out all the VMkernel Nics:
esxcfg-vmknic -l

Create a new portgroup first with esxcfg-vswitch then create a vmk port with esxcfg-vmknic, example:
esxcfg-vswitch -a VMkport vSwitch1
esxcfg-vmknic -a -i -n VMkport

In VI3 you can only have one Vmkernel port per vswitch, in vSphere this is changed. It is especially usefully setting up iSCSI multipathing. As the software iSCSI initiator will initiate IO from each iSCSI enabled vmkernel port when using Round Robin as your path selection policy.

ESX Commands: esxcfg-vswitch

This is a command I use the most often. It is big when I configure Equalogic and MPIO in vSphere. Additionally, many times I show up on site and the network is not configured prior to my arrival. Even if I sent all the configs ahead of time. People like to wait until the last minute. When building the ESX environment then I may build it with the Service Console in the default vlan or in which ever one it is plugged into in the physical network. So oftern the network guy catches up and sets the dot1q trunk and I lose connectivity and I have to go to the console and set the vlans correctly. Like this:
esxcfg-vswitch -v 8 -p "Service Console" vSwitch0
Speaking of iSCSI you will also set your jumbo frames on the vSwitch from this command
esxcfg-vswitch -m 9000 vSwitch1
esxcfg-vswitch
Of course there is a ton more you can do from this command. Here is some man page action for you:

esxcfg-vswitch(8) VMware ESX Manual esxcfg-vswitch(8)

NAME
esxcfg-vswitch - VMware ESX Virtual Switch Configuration tool

SYNOPSIS
esxcfg-vswitch OPTIONS [VSWITCH]

DESCRIPTION
esxcfg-vswitch provides an interface for adding, removing, and modifying virtual switches and their settings. By default,
there is a single virtual switch called vSwitch0.

OPTIONS
-a --add
Add a new virtual switch to the system. It requires a virtual switch name to be provided.

-d --delete
Delete a virtual switch. This will fail if any ports on the virtual switch are still in use by VMkernel networks,
vswifs, or VMs.

-l --list
List all virtual switches and their portgroups.

-L --link
Add an uplink to a virtual switch. This will attach a new unused physical NIC to a virtual switch.

-U --unlink
Remove an uplink from a virtual switch. This will remove a NIC from the uplink list of a virtual switch. If it is
the last uplink, physical network connectivity for that switch will be lost.

-R --restore-uplinks
Restore uplinks for all virtual switches from config file. This will restore all uplinks for each virtual switch from
configurtion file. INTERNAL USE ONLY.

-M --add-pg-uplink
Add an uplink to the list of uplinks for a portgroup

-N --del-pg-uplink
Delete an uplink from the list of uplinks for a portgroup

-P --add-dvp-uplink
Add an uplink to a DVPort on a DVSwitch. Must specify --dvp in the same commnad.

-Q --del-dvp-uplink
Delete an uplink from a DVPort on a DVSwitch. Must specify --dvp in the same commnad.

-p --pg
Provide the name of the portgroup. For the â--vlanâ option, "ALL" can be specified to operate on all portgroups of a
virtual switch.

-V --dvp
Provide the DVPort ID of a DVSwitch.
-v --vlan
Set the VLAN ID for a specific portgroup of a virtuals switch Using the option "0" will disable VLAN for this port-
group. Requires that the --pg option is also specified.

-c --check
Check to see if a virtual switch exists. The program prints a "1" if it exists; otherwise it prints "0".

-A --add-pg
Add a new portgroup to a virtual switch with the given name.

-D --del-pg
Delete a portgroup. This operation will fail if the portgroup is in use.

-C --check-pg
Check whether the specified name is in use for a portgroup. Prints "1" if the name is in use, prints "0" otherwise.

-B --set-cdp
Set the CDP status for a given virtual switch. To set pass one of "down", "listen", "advertise", "both".

-b --get-cdp
Print the current CDP setting for this switch.

-X --set-maxactive
Set the max active uplinks for the virtual switch.

-x --get-maxactive
Get the max active uplinks for the virtual switch.

-m --mtu
Set the MTU for the vswitch. This affects all the NICs attached to the vswitch.

-r --restore
Used at system startup to restore configuration. INTERNAL USE ONLY.

-h --help
Print a simple help message.

EXAMPLES
Add a Virtual Switch:

esxcfg-vswitch --add vSwitch1

Add a Portgroup to vSwitch0:

esxcfg-vswitch --add-pg="New Portgroup" vSwitch0

COPYRIGHT
VMware ESX is Copyright 1998-2009 VMware, Inc. All rights reserved.

VMware ESX 4.0 November 22, 2009 VMware ESX 4.0

ESX Commands: esxcfg-pciid,rescan,resgrp,swiscsi,upgrade, vmhbadevs

I have been writing on ESX command line stuff for far too long now. I just need to finish it before ESX 5 comes out with no command line support and my year long series is rendered obsolete before it is finished.

Here is a few more commands from ESX 3.5u4. They are pretty short and sweet. So enjoy.
esxcfg-pciid
Used to read the xml files under /etc/vmware/pciid/ – from what I can tell it is used in the process of getting unsupported hardware to work.

esxcfg-rescan
Supply this command with a vm hba and it will rescan for new LUNs.

esxcfg-resgrp
Do a esxcfg-resgrp -l and get a ton of information try following it with a “| more”: esxcfg-resgrp -l | more
It does include options to add remove and restore resource groups. Here is a place on the interwebs with information on how to use it.

esxcfg-swiscsi
Used to enable and disable the Software iSCSI Initiator. esxcfg-swiscsi -q will give you the list of the status.
Make sure to create a vmkernel port first.

esxcfg-upgrade
According to the ESX Configuration Guide this command is not for general use but is used to upgrade VMFS2 to VMFS3. Would be very smart to have moved all VM’s off of the VMFS2 before messing with this command.

esxcfg-vmhbadevs
Use the -m tag to list all vmfs volumes. Typical output will look like this:
vmhba0:0:0:3 /dev/sda3 4afc26df-ddbe3ee5-2037-000c29acbc0a

ESX Commands – esxcfg-nas

esxcfg-nas

Standard use of this command is to add or list your NFS mounts.

List: esxcfg-nas –l

Add: esxcfg-nas –a –o <host> -s <share> <name>

Not much more I can say. A little more detail here:

http://b2v.co.uk/b2vguide2vmware3.htm

A thread in the communities about a problem someone had where the nfsclient wasn’t loaded:
http://communities.vmware.com/message/864559

So go out and add some NFS datastores!

ESX Commands – esxcfg-mpath

It has been almost 1 year since I started looking at the esxcfg-* commands. It initially came as a look at the first part of the Enterprise Administration Exam’s Blueprint very first bullet point. In that post I talked about using esxcfg-mpath to identify which luns are fiber, iSCSI, NFS or local.

Today lets look a little bit deeper at the command and how it can be used to help you day to day.

esxcfg-mpath-picWe can always use esxcfg-mpath -l to list all of the luns and their paths. A good thing to check here is that you have the same number of paths to each datastore that comes from the SAN. You may have a zoning issue if a certain lun can only be seen from 1 path rather than all of them. In general each hba will see the lun through each controller in an active active type fiber channel SAN. So hba A should see the lun from Controller A and B. Likewise, hba B should see Controller A and B for a total of 4 paths. If you are using fixed or MRU as the pathing policy only one will be active but esxcfg-mpath -l will show four paths.

Of course if you have more hbas and controllers you will have more paths.

You can follow the examples given by the esxcfg-mpath -h to get help. One useful tool is to create a crude script using esxcfg-mpath –policy with the –lun tag to change the policy from say MRU to Fixed. I am not a perl scripter and I sure someone already has a real shell or perl script to set the policy but I do like to prepare multiple command in notepad then paste them into the cli.

esxcfg-mpath –policy=fixed –lun=vmhba0:0:1
esxcfg-mpath –policy=fixed –lun=vmhba0:0:2
and so on…

Then try to feel really smart by alternating the paths so every fourth lun will use different paths.

esxcfg-mpath –path=vmhba1:0:1 –lun=vmhba0:0:1 –state=on
esxcfg-mpath –path=vmhba2:0:1 –lun=vmhba0:0:2 –state=on
esxcfg-mpath –preferred –path=vmhba1:0:1 –lun=vmhba0:0:1
esxcfg-mpath –preferred –path=vmhba2:0:1 –lun=vmhba0:0:2

The first two lines set the path for the respective luns to different hbas. The last two lines set the preferred path to that same port on the hba. So when there is failover the path will fail back to your set config when all is well.

Rescan All Hba’s Where are you?

So I was updating some of my blog posts on the esxcfg-* commands with any changes in ESX 4. I wrote earlier I did not know much about the esxcfg-advcfg command. Since writing that post at the end of 2008, I found Duncan Epping used esxcfg-advcfg in 3.5 to set the option rescan all the Hba’s. I thought this was a great shortcut and decided to try it out in vSphere but:

[root@esx4 ~]# esxcfg-advcfg -s 1 /Scsi/ScsiRescanAllHbas
Exception occured: Unable to find option ScsiRescanAllHbas

So I looked through vCenter 4 and did not find the option under Scsi I looked around some in the other Advanced Options and it is no where to be found.

Has this been removed or moved somewhere else? If you know hit me up on twitter @2vcps

ESX Commands – esxcfg-module

After the last two entries being somewhat boring and not useful at least in my opinion. I am glad this command has a little more to it.

[root@esx1 root]# esxcfg-module -h
Usage: esxcfg-module
-g–get-options Get the options for a given module and whether it is loaded on boot.
-s–set-options Set the options for a given module. WARNING this may be overwritten by per device options.
-e–enable Enable a given module, indicating it should be loaded on boot.
-d–disable Disable a given module, indicating it should not be loaded on boot.
-q–query Query enabled modules options.
-l–list List all modules and whether they are enabled.
-h–help Show this message.
[root@esx1 root]# esxcfg-module -l
Device Driver Modules
Module Enabled Loaded
vmklinux true true
cciss true true
tg3 true true
qla4022 true true
e1000 true true
qla2300_707_vmwtrue truel
vmdriver true true
vmfs3 true true
etherswitch true true
shaper true true
tcpip true true
cosShadow true true
migration true true
nfsclient true true
deltadisk true true
vmfs2 true true
iscsi_mod true true
[root@esx1 root]#

So a common use I have seen with this command is to turn off unused modules. Go ahead and free up some resources turn off vmfs2! You don’t use it.
Another use is to change HBA options.

/usr/sbin/esxcfg-module -s ql2xmaxqdepth=64 qla2300_707_vmw
Remember to follow it with:
/usr/sbin/esxcfg-boot -b

Check out VCDX Master Ninja/Jedi Duncan Epping using this command combo in a scripted install.