Highlighted
Immortal
Immortal

esxcfg-info question

Would anyone care to share what they are using this command for?

I'm assuming many of you are parsing its output for various reasons, if you don't mind what info are you grabbing and what language are you using to parse the output?

Update: I suppose I should expound a bit. Originally esxcfg-info was just a debug tool to make sure that we were getting all the info from the VMkernel/Service Console. However it seems in the wild its being used for quite a bit more. I'm trying to get an idea of what people are using it for to see if there is anything I can do to facilitate those uses.

Message was edited by:

kkress

0 Kudos
25 Replies
Highlighted
User Moderator
User Moderator

If you pipe it to a file you now have a reference with all the settings and configuration

Steve Beaver VMware Communities User Moderator VMware vExpert 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 ==== Co-Author of "VMware ESX Essentials in the Virtual Data Center" (ISBN:1420070274) from Auerbach Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/] Come follow me on twitter http://www.twitter.com/sbeaver **The Cloud is a journey, not a project.**
0 Kudos
Highlighted
Immortal
Immortal

Do you just save it off and keep a library of them to refer to later?

0 Kudos
Highlighted
User Moderator
User Moderator

Actually it could be used for documenting your server

Steve Beaver VMware Communities User Moderator VMware vExpert 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 ==== Co-Author of "VMware ESX Essentials in the Virtual Data Center" (ISBN:1420070274) from Auerbach Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/] Come follow me on twitter http://www.twitter.com/sbeaver **The Cloud is a journey, not a project.**
0 Kudos
Highlighted
Immortal
Immortal

As a reference of the settings (as Steve already mentioned).

This combined with a recent vm-support tar file is a nice configuration backup and documentation of the ESX host.

0 Kudos
Highlighted
Immortal
Immortal

Do you mean for IT dept audit purposes or more like something you give to a customer to say "here is how I setup your ESX box"?

0 Kudos
Highlighted
Immortal
Immortal

I won't give this to the customer (except the techies maybe) - the customer probably doesn't know how to deal with it Smiley Wink

But it is a good starting point for a "customer compatible" full blown documentation.

0 Kudos
Highlighted
User Moderator
User Moderator

Agreed!!

Steve Beaver VMware Communities User Moderator VMware vExpert 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 ==== Co-Author of "VMware ESX Essentials in the Virtual Data Center" (ISBN:1420070274) from Auerbach Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/] Come follow me on twitter http://www.twitter.com/sbeaver **The Cloud is a journey, not a project.**
0 Kudos
Highlighted
Immortal
Immortal

I think I see sort of like a datasource to something like crystal reports. Then do you have a script that parses the output to generate parts of the report or are you filling those in by hand?

0 Kudos
Highlighted
Immortal
Immortal

I think I see sort of like a datasource to something like crystal reports

Datasource to my favorite editor describes it better Smiley Wink

Then do you have a script that parses the output to generate parts of the report or are you filling those in by hand?

Unfortunately this is a manual work (for now).

I always wanted to automate this but didn't had the time (or maybe the desire) to actually write the script - shame on me.

I've looked at your profile - are you asking because you might want to do this in esxinfo-cfg itself? \*hint*

It would be great if esxcfg-info would be capable of exporting the info to a CSV file. Then you could easily import it into your favorite editor (or any other application). \*hint*

0 Kudos
Highlighted
Immortal
Immortal

Here's one thing I use it for...

How can I display what VLAN tags are configured on a physical switch that my ESX server connects to?

• You can see this in the VI client by clicking on the Configuration tab, and then Network Adapters. If you hover the mouse over the "Networks" field of any row in the table and your upstream switch is configured with VLAN tags you will see a whole list of VLAN tags that have been sniffed off of the network.

• A better more accurate way to do this via the Service Console is with the esxcfg-info command. The Vlans and networks are listed under the network hint for each adapter. You can type esxcfg-info -n | grep -E -i "_name|Hint" to see a list of all of the network hints for each adapter.

• If you want to display what is configured on the ESX vSwitch side you can type esxcfg-vswitch –l to display this.

0 Kudos
Highlighted
Immortal
Immortal

I use it to obtain information about the host a script is running on, parse it through grep and awk and you can get loads of useful info for scripting. I use Perl but you could do it equally as well with shell.

Here's an example of where I've used it.

http://www.vmware.com/community/message.jspa?messageID=681474#681474

0 Kudos
Highlighted
Immortal
Immortal

I'm working on some changes to esxcfg-info and I wanted to see if while I'm at it I can augment the output in some useful way. I can't make any feature promises, but I am looking for input.

0 Kudos
Highlighted
User Moderator
User Moderator

If you could set up different switches to just get the info about certain thing like "esxcfg-info -n" for say networking information ect

Steve Beaver VMware Communities User Moderator VMware vExpert 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 ==== Co-Author of "VMware ESX Essentials in the Virtual Data Center" (ISBN:1420070274) from Auerbach Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/] Come follow me on twitter http://www.twitter.com/sbeaver **The Cloud is a journey, not a project.**
0 Kudos
Highlighted
Immortal
Immortal

Are you asking for addition more fine grained flags on esxcfg-info?

0 Kudos
Highlighted
User Moderator
User Moderator

Yes that could be nice.

Steve Beaver VMware Communities User Moderator VMware vExpert 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 ==== Co-Author of "VMware ESX Essentials in the Virtual Data Center" (ISBN:1420070274) from Auerbach Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/] Come follow me on twitter http://www.twitter.com/sbeaver **The Cloud is a journey, not a project.**
0 Kudos
Highlighted
Immortal
Immortal

I'll second that request, would be nice to be able to retrieve only a sub-set of the information as required.

0 Kudos
Highlighted
Immortal
Immortal

Yes that would be very useful.

0 Kudos
Highlighted
Immortal
Immortal

Just wanted to bump this thread and let you all know that 3.5 has some of the improvements to esxcfg-info.

Specifically:

*) More information about the system has been added.

*) The -F xml and -F perl output formats (sorry no CSV, didn't fit well with the data model). have been added. This may help out those of you trying to parse esxcfg-info. Just note that format is not set in stone and could change release to release.

0 Kudos
Highlighted
Immortal
Immortal

Thanks for the info Kevin.

-F perl output formats (sorry no CSV, didn't fit well with the data model)

XML and Perl should be sufficient to get a CSV Smiley Wink

0 Kudos