EsxCli Advanced Settings
I recently wanted to know what the default setting was for a few of the ESXi advanced settings. Since there’s no telling what has been changed on many of my hosts, I was preparing to install a new virtual/nested instance of ESXi to check the defaults when I stumbled across this VMware vSphere Blog article on Identifying Non-Default Advanced & Kernel Settings Using ESXCLI. To my suprise, esxcli has shown this info since version 5.1 and even has a ‘-delta’ switch to show you exactly which settings have been changed!
The esxcli list command shows additional information not available in vSphere Web Client or newer HTML5 Client, such as the default value for each setting and the min/max values for settings that take integers:
The min/max values used to be shown in the old C# client, but I haven’t seen this information in the web clients. Appending the ‘–delta’ switch (or abbreviated ‘-d’) will list only the ESXi advanced settings that have been changed from their system defaults:
You can also check specific settings by name:
If you’re a fan of PowerCLI like me, you can use Get-EsxCli in a similar manner. This will list all the settings for the host:
And this will list only the deltas:
The first argument to the list method above is a boolean (true/false) indicating whether you only want the deltas. The second argument can be used to get a specific setting:
This is the same as using the ‘–option’ or ‘-o’ switch with esxcli. Lastly, it also accepts a third argument to get only the settings under a particular tree. This is the same as using the ‘–tree’ or ‘-t’ switch with esxcli:
In summary, esxcli might be a lot more versatile than you think. The delta switch is handy for auditing your configuration or just spotting settings that have been changed from the defaults, and can be especially useful if you have a lot of hosts and are trying to identify configuration drift.
Comments