Posts

Showing posts with the label ESXCLI

Using ESXCLI V2 to Configure Storage Multipathing

A customer recently came to me with the need to use ESXCLI to configure a bunch of storage settings on all of their ESXi hosts.  He had been planning on connecting to the local console of each host and then executing the command, but wanted to know if there was a better way.  Of course there is!  We could use plink to run a script on his workstation that would establish SSH connections to his servers and then execute the ESXCLI commands... or we can do it all through PowerCLI! I actually tackled this same problem 5 years ago using get-esxcli.  At that point, I did it with the normal V1 version of the cmdlet, which required carefully spaced lists of parameters, leading to ugly lines like this:  $esxcli.storage.core.device.set($thisLUN.CanonicalName,$null,$null,$queueFullSample,$queueFullThreshold,$null) No more!  Now, we have access to get-esxcli -v2 , which is much easier to use!  Instead of needing to put a bunch of $nulls into the .set() method ...

PSODs and the iovDisableIR Setting

One of my customers recently came across an issue where their ESXi hosts were randomly crashing with a PSOD.  They had recently applied the latest SPP from HP and the latest ESXi 6.0 patches, and were now occasionally seeing these crashes with messages like "LINT1/NMI (motherboard nonmaskable interrupt), undiagnosed.  This may be a hardware problem..." As the PSOD implied, they had called HP support for help, but weren't making much progress.  I did some googling and found a really interesting blog post from Jason Whitelock about a recent ESXi update causing HP servers to PSOD .  He had come across the exact same issue and had tracked it down to the value of the iovDisableIR setting, which had changed in this latest ESXi update.  When he set it back to its original setting, the PSOD issue went away. As VMware explains it, Interrupt Remapping (the technology that's affected by this setting) enables more efficient IRQ routing and thus improves performance...

PowerCLI Scripting to set Queue Full Threshold and Queue Full Sample Size

If you've ever dug into the guts of an ESXi host configuration, you've probably found that there are some settings that you just can't configure without the command line.  An example that I came across recently was for a customer with 3Par storage.  As per the VMware and 3Par Best Practices Guide , you should configure 3 settings on a per LUN basis: the Multipathing Policy, the Queue Full Threshold and the Queue Full Sample Size. The Multipathing Policy is easy to set through the GUI, at least if you really like clicking your mouse.  The Queue Full settings don't exist in the GUI though; to get at them, you must use the command line.  The 3Par guide helpfully provides the ESXCLI command that you need in order to configure those LUNs: esxcli storage core device set --device <canonical name> --queue-full-sample-size 32 --queue-full-threshold 4 So, just run that command on every LUN, from the command line on every Host in your environment.  Yeah, ri...