VMware Cloud Community
admin
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

Reply
0 Kudos
25 Replies
sbeaver
Leadership
Leadership

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 - 2020
VMware NSX vExpert - 2019 - 2020
====
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.**
Reply
0 Kudos
admin
Immortal
Immortal

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

Reply
0 Kudos
sbeaver
Leadership
Leadership

Actually it could be used for documenting your server

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
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.**
Reply
0 Kudos
oreeh
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.

Reply
0 Kudos
admin
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"?

Reply
0 Kudos
oreeh
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.

Reply
0 Kudos
sbeaver
Leadership
Leadership

Agreed!!

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
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.**
Reply
0 Kudos
admin
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?

Reply
0 Kudos
oreeh
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*

Reply
0 Kudos
esiebert7625
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.

Reply
0 Kudos
admin
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

Reply
0 Kudos
admin
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.

Reply
0 Kudos
sbeaver
Leadership
Leadership

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 - 2020
VMware NSX vExpert - 2019 - 2020
====
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.**
Reply
0 Kudos
admin
Immortal
Immortal

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

Reply
0 Kudos
sbeaver
Leadership
Leadership

Yes that could be nice.

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
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.**
Reply
0 Kudos
admin
Immortal
Immortal

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

Reply
0 Kudos
oreeh
Immortal
Immortal

Yes that would be very useful.

Reply
0 Kudos
admin
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.

Reply
0 Kudos
oreeh
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

Reply
0 Kudos