25 Jun 2009

esxcfg-advcfg

The CLI command line tool esxcfg-advcfg can be used to query and modify advanced options for a wide variety of different aspects of the ESX 3/4 VMkernel, such as resources, networking, storage and global settings. Note that this page is written for ESX 4 and not all commands may work with ESX 3.

 

Options

Option

Alternative Option

Description

-g --get Get the value of a specified configuration item
-s --set Set the value of a specific configuration item. This may fail silently, if the value given is constrained by other options or VMkernel settings.
-d --default Set the value of a specified configuration item to the default value defined by the VMkernel.
-q --quiet Perform any of the other options but don’t print the output to stdout
-k --set-kernel Set a VMkernel boot parameter
-j --get-kernel  Get the value of a VMkernel boot parameter
-h --help Print a command usage message
-r  --restore Read the contents of the configuration file, and perform a set for each of the advanced options in the file
-c --get-config  Get the value of a specific line in esx.conf
-m --set-message  Set DCUI welcome message
-u --uuid  Ensure the VMkernel system UUID is set and print it
-U --user-var The name of the user variable to use for:
--get-user-var, --set-user-var, and --del-user-var
-G --get-user-var  Get the value of a user specified generic value. Requires the --user-var option
-S --set-user-var  Set the value of a user specified generic value. Requires the --user-var option
-D --del-user-var  Delete the value of a user specified generic value. Requires the --user-var option
-A --add-option <name> This adds and advanced variable to /UserVars tree of the Advanced Options.
This is different to the --user-var options, which do not show in the VCUI and only contain simple user vars for use at boot time.
An advanced option requires the --add-type, --add-desc, --add-default, --add-name and --add-min, --add-max if type in int.
-T --add-type The type of user advanced option to add, must be either string or int
-E --add-desc  The description of the user advanced option to add
-F --add-default  The default value of the user advanced option to add
-N --add-min  The min value of the user advanced option to add (int only)
-M --add-max The max value of the user advanced option to add (int only)
-H --add-hidden <value> The hidden value of the user advanced option to add. Must be either true or false. Default = false
-L --del-option <name> Delete a UserVars advanced option added with the -A command
-V --has-option <name> Return 0 from the command if the option exists return 1 otherwise

 


Examples:
Get the VMkernel System UUID:

esxcfg-advcfg -u

List the VMkernel NIC currently selected to use with VMotion:

esxcfg-advcfg -g /Migrate/vmknic

Set the VMkernel NIC to be used for VMotion to vmk0:

esxcfg-advcfg -s vmk0 /Migrate/vmknic

 

*To list all configured VMkernel NICs available for VMotion, use esxcfg-vmknic -l (Lowercase L)

Written by  0 comment
Last modified on Tuesday, 09 December 2014 15:11
Rate this item
(0 votes)

Related items

Comments (0)

There are no comments posted here yet

Leave your comments

Posting comment as a guest. Sign up or login to your account.
0 Characters
Attachments (0 / 3)
Share Your Location

@adaptiveoptics I think I'll be ok next week, but I'll be back in the UK for only a week after Denver, then off to… https://t.co/mJXmbRf9R5
Follow Rynardt Spies on Twitter