NAME

vminfo.pl - List the properties of the virtual machines.


SYNOPSIS

 vminfo.pl [options]


DESCRIPTION

This VI Perl command-line utility provides an interface for displaying the specified attributes of the virtual machine(s). If none are specified then the predefined parameters are displayed.


OPTIONS

GENERAL OPTIONS

vmname

Optional. The name of the virtual machine. It will be used to select the virtual machine.

guestos

Name of the operating system running on the virtual machine. For example, if you specify Windows, all virtual machines running Windows are displayed.

ipaddress

Optional. ipaddress of the virtual machine.

datacenter

Optional. Name of the datacenter for the virtual machine(s). Parameters of the all the virtual machine(s) in a particular datacenter will be displayed

pool

Optional. Name of the resource pool of the virtual machine(s). Parameters of the all the virtual machine(s) in the given pool will be displayed.

folder

Optional. Name of the folder which contains the virtual machines

powerstatus

Optional. Powerstatus of the virtual machine. If e.g. poweron is given parameters of all the virtual machines which are powered on will be displayed

host

Optional. Hostname for selecting the virtual machines. Parameters of all the virtual machines in a particular host will be displayed.

fields

Optional. Name of the fields whose value is to be displayed. The fields are name, numCpu, guestFullName, guestId, hostName, ipAddress, toolsStatus, memorysize, hostMemoryUsage, guestMemoryUsage, overallCpuUsage, vmPathName. If the fields option is not specified then all the properties will be displayed.

out

Optional. Filename in which output is to be displayed. If the file option is not given then output will be displayed on the console.


EXAMPLES

Displays all the attributes the virtual machine myVM:

 vminfo.pl --url https://<ipaddress>:<port>/sdk/webService
           --username myuser --password mypassword --vmname myVM

Displays all the attributes of all the virtual machines in folder myFolder:

 vminfo.pl --url https://<ipaddress>:<port>/sdk/webService
           --username myuser --password mypassword --folder myFolder

Displays specified attributes of all them virtual machines in pool myPool:

 vminfo.pl --url https://<ipaddress>:<port>/sdk/webService --username myuser --password mypassword --pool myPool
           --fields vmname,numCpu,guestFullName,hostName,ipAddress,toolsStatus,memorysize,hostMemoryUsage,guestMemoryUsage

Send the output in a file

 vminfo.pl --url https://<ipaddress>:<port>/sdk/webService --username myuser
           --password mypassword  --host myHost --out output.xml

Sample Output

 Name:                    007
 No. of CPU(s):           1
 Memory Size:             784
 virtualdisks:            0
 template:                0
 vmPathName:              [storage1] 007/007.vmx
 Guest OS:                Microsoft Windows XP Professional
 Host name:               VM10.abc.info
 IP Address:              127.0.0.1
 VMware Tools:            VMware Tools is running and the version is current
 Host memory usage:       161 MB
 Guest memory usage:      23 MB
 Cpu usage:               45 MHz


SUPPORTED PLATFORMS

All operations work with VMware VirtualCenter 2.0.1 and VMware ESX server 3.0.1