Over the weekend Duncan Epping released a new whitepaper called VMware ESXi 4.1 Operations Guide which documents some of the operational tasks for managing/configuring an ESXi environment. Not only is this a really cool document, but I also found that I was referenced in the whitepaper. This was really neat as it is probably my first reference ever in a whitepaper 🙂
While looking through the other links, I noticed there was another whitepaper written by Duncan's colleague, Kyle and it referenced a host configuration worksheet. When I opened up the document, it was basically a plain PDF form requiring users to manually input some of the important configurations of an ESX host prior to upgrading to ESXi. I thought this would be fine if you only had a few hosts to upgrade, but what if you had several dozens or hundreds of hosts? Manually editing the non-editable PDF document meant you had to use a PDF tool or worse printing it out and writing in the information by hand.
I thought, why not automate it? I decided create a very simple vSphere SDK for Perl script called generateHostConfigurationWorksheet.pl that would allow a user to connect to either a standalone ESX host or to a vCenter server. The script also allows you to specify a list of ESX hosts to extract the information when connecting to vCenter, else by default it will collect information for all your ESX hosts. You also have the option of selecting either an html or csv output.
To run this script, you will need a system that has the vCLI installed or you can use VMware vMA. You will also need to download the script from here. Make sure you set the script to be executable
The script accepts two paraemters:
--output [html|csv] (required)
--hostlist [file-containing-esx-hosts] (optional)
Here is an example of connecting directly to an ESX host:
[vi-admin@tancredi ~]$ ./generateHostConfigurationWorksheet.pl --server vesx41-1.primp-industries.com --username root --output html
Enter password:
Processing vesx41-1.primp-industries.com
Generating vesx41-1.primp-industries.com.html ...
Here is an example of connecting to vCenter and specifying a list of ESX hosts to collect information on:
[vi-admin@tancredi ~]$ ./generateHostConfigurationWorksheet.pl --server reflex.primp-industries.com --username primp --output csv --hostlist hostlist
Enter password:
Processing vesx41-1.primp-industries.com
Generating vesx41-1.primp-industries.com.csv ...
Note: If you like to select the ESX hosts you want to report on, just create a file that has the displayname of your ESX host seperated by a newline
Here is sample report that you can view
You will notice that syslog section is left blank, this is done intentionally as with ESX, syslog configuration is not exposed through the vSphere API like ESXi. This will be something you will need to fill in manually.
I think this worksheet will be useful, but if you are interested in a more extensive report prior to upgrading, I would highly recommend you check out the popular vSphere Health Check script and here is what one of those reports can look like.
niall says
Hi Thanks for the script- v useful, what must I do however to run the script on an ESXi host?
William says
@niall,
As the post mentions, you will need a system that has the vCLI installed or use VMware vMA
Hilton Dagge says
Same problem for me, vCLI downloaded from your vmware website link will not accept the script against the non classic hosts.
William says
@Hilton,
This script is for migration from ESX -> ESXi, if you're on ESXi, you shouldn't need to run this script 😉
Hilton Dagge says
Thanks William I realise that, I was using it as a convienent way to gather info on my ESXi hosts, if you can't do it- no prob
William says
@Hilton
For that type of reporting, take a look at the vSphere Health Check script - http://communities.vmware.com/docs/DOC-9842
Scott says
William,
this is a great script. Is there a companion script that we can run to take the results from the original ESX host and use them to configure the replacement ESXi host?