PRINT

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 datacenterlisting.pl (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:
    /usr/local/share/doc/viperltoolkit/samples

  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/datacenterlisting.pl --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 datacenterlisting.pl --server 'servername' --datacenter 'datacenter_name'

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

perl discovery/datacenterlisting.pl --server 10.17.152.252 --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/datacenterlisting.pl --server 10.17.152.252 --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