Like the last several posts, this one hails from the storage section of the Enterprise Admin Blueprint. The Enterprise Admin exam is one of the several requirements to becoming a VCDX. As I go down this path, I hope to share with you some of my exam prep in the hope that it will help you as well.
Seems this is becoming part of a series. Like the last few posts, this one was also produced from objective 1.1 of the VCDX Blueprint, and is part of my exam prep.
[root@ProfessionalVMware root]# esxcfg-module Usage: esxcfg-module <options> <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.
In this case I’ve only included the relevant output.
Seems this is becoming part of a series. Like the last few posts, this one was also produced from objective 1.1 of the VCDX Blueprint, and is part of my exam prep.
Task:
Manage VMFS file systems using command line tools.
Solution:
[root@ProfessionalVMware root]# vmkfstools No valid command specified
[root@ProfessionalVMware root]# vmkfstools -P /vmfs/volumes/storage1/ VMFS-3.31 file system spanning 1 partitions. File system label (if any): storage1 Mode: public Capacity 34628173824 (33024 file blocks * 1048576), 34158411776 (32576 blocks) avail UUID: 4b6ac385-66ac6b08-056e-000c29a47f2f Partitions spanned (on "lvm"): vmhba0:0:0:3
While the content may seem obvious to some, this post is here to help those that still have their exams to prep for, or find themselves wandering about aimlessly on the CLI trying to configure NFS. Thanks for tuning in.
Like the last post, this one also hails from objective 1.1 of the VCDX Blueprint, and is part of my exam prep.
Task:
Configure an NFS Datastore using command line tools.
Solution:
[root@ProfessionalVMware root]# esxcfg-nas esxcfg-nas <options> [<label>] -a|–add Add a new NASc filesystem to /vmfs volumes. Requires –host and –share options. Use –readonly option only for readonly access. -o|–host <host> Set the host name or ip address for a NAS mount. -s|–share <share> Set the name of the NAS share on the remote system. -y|–readonly Add the new NAS filesystem with readonly access. -d|–delete Unmount and delete a filesystem. -l|–list List the currently mounted NAS file systems. -r|–restore Restore all NAS mounts from the configuration file. (FOR INTERNAL USE ONLY). -h|–help Show this message.
More specifically:
[root@ProfessionalVMware root]# esxcfg-nas –add –host 192.168.15.252 –share /storage/iso ISO Connecting to NAS volume: ISO ISO created and connected.
Result:
[root@ProfessionalVMware root]# esxcfg-nas –list ISO is /storage/iso from 192.168.15.252 mounted
While the content may seem obvious to some, this post is here to help those that still have their exams to prep for, or find themselves wandering about aimlessly on the CLI trying to configure NFS. Thanks for tuning in.
After logging into the host via SSH, and getting to root, this can be done with the “esxcfg-mpath” command. Let’s take a look at this command:
[root@ProfessionalVMware root]# esxcfg-mpath esxcfg-mpath <options> [--lun=<LUN>] [--path=<path>] -l|–list List all LUNs and their paths. -p|–policy <type> Set the policy for a specific LUN. Requires a –lun flag. Type must be one of mru, rr, fixed or custom. -H|–custom-hba-policy Set the custom HBA policy value. Must be one of mru, preferred, any, minq. -T|–custom-target-policy Set the custom target policy value. Must be one of mru, preferred, any -C|–custom-max-commands Set the custom policy value for max commands -B|–custom-max-blocks Set the custom policy value for max blocks -s|–state <on|off> Set the state for a specific LUN Path. Requires both –lun and –path flags. -f|–preferred Set the given path to be preferred for the given LUN. Requires both –path and –lun flags. -q|–query Query the information on a specific LUN. Requires a –lun flag. -P|–path=vmhbaX:X:X Used to specify a path for setting the path state or preferred path. Uses the VMkernel internal path name. -L|–lun=vmhbaX:X:X Indicate which LUN to operate on. This can be either the internal VMkernel vmhba name for this LUN (vmhbaX:X:X) or the vml name as found in /vmfs/devices/disks. -v|–verbose Show all information about the LUNs and paths, otherwise a minimal set of data is displayed to conserve space. -b|–bulk Bulk path listing suitable for parsing. -a|–hbas List HBAs on the system with a unique ID if one is available. -h|–help Show this message. -r|–restore Restore path setting to configured values on system start. (INTERNAL USE ONLY)
Quite the command, isn’t it? And that is but half the output. The particular switches we are interested in are –p or –policy to which we’ll feed the “rr” or round robin switch. We’ll follow that up with the –L or –lun to specify which lun we’re operating on. Here’s an example:
In all practical terms, on my lab box that didn’t accomplish much, as there is only one actual path to the disk, however, we can still see the changes in the VI Client:
Note: esxcfg-mpath is not actually listed in the tools section for this objective, but is indeed the way to accomplish this.
While this actually requires no special settings, I figure it’s worth noting, if for nothing more than to state that in VMware Fusion 3, ESX 3.5 requires no additional settings to be operational. Basically it works as follows:
Following up on the interest from our last post, Tom Howarth and I will be running the first of what should become a series of VCDX Enterprise Admin Brown Bag sessions. The topic this week will be the CLI.
We’re going to give this a shot with DimDim, and can accept a total of 25 folks. In other words, please sign up only if you have been accepted into the VCDX process, or have already taken and passed your Enterprise Admin Exam. Also note, the time below is in CST.
Questions? Hit me up on Twitter or in the comments. Look forward to seeing you there!
Some folks in the community have expressed an interest in expanding my quazi regular VCP brown bags into some additional brown bags to support those seeking their VCDX, starting with the Enterprise Admin exam. This post then, is to serve two functions:
1) Is there interest? – Basically, If I built it, would y’all come?
2) Content – What specific areas would you like to see covered?
Feel free to drop a line in the comments or on twitter with your answers to the above, and anything else you may want to add. (I’m @cody_bunch) on Twitter. And thanks again for helping!
This came up recently on the VMware Virtualization group on LinkedIn. The question was essentially: “In the event of a host hardware issue, can I VMotion my VMs off the host and send a notification?” The answer is: “Most Certainly!” This can be done by setting up a vSphere vCenter Alarm and corresponding action. Let’s explore:
Fire up the vCenter client. Select the level you want to be alerted from then select “Alarms”:
Note, there are quite a few default alarms, one of them may work for you:
For ours, we want something a bit more generic, so right click somewhere in the empty space, and choose “New Alert”:
Fill in the details with something that makes sense for your environment. I went with “Generic Host Health Alert”. Make sure to select “Hosts” and the second radio button. Done? Then we’re ready to move on to the “Triggers” tab.
Select Add, then “Hardware Health Changed”, then change the “Status”. I went with “Alert”, like this:
Got that so far? Awesome! Next we move onto the actions:
For this you will configure the “Send a notification email” to an address of your choice. Then you’ll add “Enter maintenance mode”
And with that, select “OK”. You’ve now configured your vSphere vCenter to notify you of a hardware failure, and to migrate your VMs to another host. Note: This will only work if you have clustered hosts, and then only within the capacity of the cluster. Further, depending on the hardware issue, VMotion may not be an option, and you are then dependant on VMware HA. If this was helpful or you have any questions, drop us a line in the comments.
Perhaps they’re not new, exactly. They are new to me, however. They’re also good enough that you should be reading them as well! With that said, onto the blogs!
VMDEV.info – http://www.vmdev.info/ This is put together by Keshav Attrey, a software dev with VMware. The blog concentrates on the vSphere APIs and automation around virtual desktops. My kinda blog!
B3rg.nl – http://www.b3rg.nl/index.php This was a more than awesome find that came up during the last VCP4 Brown Bag. Not sure how I missed it in fact. Matthijs van den Berg covers esxtop, VCP prep, VCDX Prep and more. Good stuff.
Double Cloud – http://www.doublecloud.org/ This is put together by Steve Jin. The author of the vSphere Java SDK, and the book: VMware VI and vSphere SDK: http://bit.ly/5I10nn (Affiliate Link). Basically, if you are going to do vSphere API work, this is the place to start.
When was the last time you found yourself configuring VMware tools on Linux? Did having to incessantly press enter accepting the defaults drive you nuts too? I think I might be the last one to the game on this, but today I was stumbling through configuring VMware tools on a few Linux VMs. Stumbling, over a terminal services session, over VPN, over some rural interwebs carrier.
A less than ideal sort of situation. The solution… other than get better internets, was to execute both “~/vmware-tools-distrib/vmware-install.pl” and “/usr/bin/vmware-config-tools.pl” with the “–default” (two dashes, then default) option. Like this:
What this does, is instead of making you hit enter for each of the options (because, ya know… you change them all that often), and accepts the defaults, making the entire install that much easier.
Most Recent Comments