For many years I have been an infrastructure guy. I really liked how the cables, and processors and Memory and blinking lights worked. Applications were often the necessary evil tolerated so that I can play with cool technology. During my own journey toward learning about the cloud it becomes increasingly important to consider the function of the application. Six years ago me would totally punch me in the face right now. Traitor. J
1 – Don’t get your App messed up in my resource buckets of awesomeness
So the reality check to the Infrastructure geek in me is this: The application teams really think of what you do as the network. That is why when anything is ever wrong it is always “the network’s” fault. What we love to do is getting abstracted more and more. I will still contend that is very important and very hard to do. Whether you are building reference architectures or deploying a converged infrastructure appliance almost no one but us cares. They just want the data to do their jobs. So while we have really great discussions about speeds and feeds, the guy in the picture below just wants the app. From the hypervisor down we need to design with the application in mind or we will risk becoming like that goth dude locked in the server room on IT Crowd.
2 Honey badger don’t care about FCoE
My next post will get into what I have been researching regarding what is out there and hopefully help us (infra. peeps) understand our App/Dev brothers better.
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.
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.
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.
Supply this command with a vm hba and it will rescan for new LUNs.
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.
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.
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.
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
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
esxcfg-linuxnet Converts vswif to eth when booting ESX Server into service-console-only mode rather than into ESX mode. This command is used for the bootstrap process and is intended for VMware Technical Support use only. You should not issue this command unless instructed to do so by a VMware Technical Support representative. There is no VI Client equivalent for this command.
Wow I should have saved all these for one post called stuff you don’t use unless someone smart tells you to.
Don’t worry though I checked ahead esxcfg-module has more too it. I actually slightly looked at it when I covered esxcfg-boot.
[root@esx1 root]# esxcfg-init -h Usage: esxcfg-init This program is used to initialize device names and advanced configuration options for the VMkernel on system boot.It is NOT intended for use outside of initialization scripts. [root@esx1 root]#
I decided to google the command to see if anyone had insight. Not much more than what I give here. The help command then nothing. So for real I might get 2 blog posts in one day since this is so short.
This is a great command to give you a whole bunch of information. Sort of like trying to drink from a fire hose. Go ahead and type esxcfg-info as root from your console. Wasn’t that fun? You can follow this article and redirect the output to a file to make it a little easier. If there is a specific area that you need information about you can check the help and use a handy switch t print just the info you need. Which in all honesty may still be more than you can handle.
[root@esxlab1 root]# esxcfg-info -h Usage: esxcfg-info mode -a, –all Print all information -w, –hardware Print hardware information -r, –resource Print resource information -s, –storage Print storage information -n, –network Print network information -y, –system Print system information -o, –advopt Print advanced options -u, –hwuuid Print hardware uuid -b, –bootuuid Print boot partition uuid -e, –boottype Print boot type -c, –cmdline Print vmkernel command line -F, –format Print the information in the given format Valid values are “xml” and “perl” -h, –help Print this message.
A sample from doing esxcfg-info -r (this is just a snippet of output)
Next in the order of commands is esxcfg-hwiscsi. This command according to the iSCSI SAN configuration guide will let you set certain settings as required by your SAN on your hardware iSCSI HBA.
esxcfg-hwiscsi -h – this is the help. Not a ton there but enough.
esxcfg-hwiscsi -l – lists the current settings.
esxcfg-hwiscsi -a – allow arp redirection on the HW iSCSI HBA. This is used be some sans to move traffic between ports.
esxcfg-hwiscsi -j – Will enable a jumbo frame (MTU 9000 bytes) when it is disabled the frame is 1500 bytes.
I will bet if these settings are required you till be directed to use them be the SAN vendor or HBA vendor. IF something bizarre is happening on your iSCSI SAN with hardware HBA’s one of these might not match the SAN.
I have really forgot to keep up on my VCDX study path. So today a quick tidbit on the esxcfg-firewall command. Many of us today will use the vCenter Client to change firewall ports on the ESX. One instance where I exclusively mess with the firewall from the command line using esxcfg-firewall is when I install Dell OpenManage. I am already in the console to install the agents so I might as well open the firewall from the console too. This really applies to any kind of agent or software you add to your ESX installation. So if you find yourself already in the console why not save a step and do it from the cli?