Validating the VI Perl Toolkit Installation

You can confirm successful VI Perl Toolkit installation by running any one of the Utility Applications, or by running one of the sample scripts.

Running a Sample Script

To navigate to the samples sub-directory

In the samples sub-directory, you’ll find several other sub-directories, including:

  • discovery
  • host
  • performance
  • vm

The (in the \samples\discovery folder), is a good place to start. It’s a basic discovery utility that obtains a list of hosts and virtual machines running at the specified server. You must pass to the script (as a parameter) the name of the ESX Server host or VirtualCenter Management Server host system.

To run the script:

  1. Navigate to the /samples sub-directory:

  2. Enter perl and the precise name of the script (capitalization must match), including the path within the /samples directory, passing any required parameters. For example, for the datacenterlisting script, you would enter:

    perl discovery/ --host 'servername_or_ip_address' --datacenter 'datacenter_name'

    Or simply navigate to the /discovery durectory before running the script, saving yourself from typing the directory name:

    cd discovery
    perl --server 'servername' --datacenter 'datacenter_name'

For example, running against a VirtualCenter Management Server might be as follows:

perl discovery/ --server --datacenter Primary_Datacenter --username Administrator --password password

If you are testing your setup against an ESX Server host, you must pass an empty string to the datacenter parameter, as in:

perl discovery/ --server --datacenter ' ' --username root --password password

Copyright © 2007 VMware, Inc. All rights reserved.

VI Perl Toolkit 1.0 | Released 30-Aug-2007 | Last updated 28-August-2007 7:00 pm