Sample Scripts

Even though the VI3 Perl Toolkit comes with a set of great examples, we feel that you can never have enough of them. This page will host a number of samples that we have either created ourselves or that we have found somewhere. All scripts listed on this page, require the VI Perl Toolkit to be installed. More information on how to obtain and instal the VI Perl Toolkit can be found here.

List all VM’s in a Cluster
This program lists all VM’s in a specific Cluster. It will report the name of Host and the VM in a formatted table. At the bottom of the table, it shows the amount of VM’s and Hosts found in the Cluster.

Discover and Disconnect CD-Rom and Floppy Devices
This program searches for connected Floppy and CD-Rom devices on a specific Host. It then disconnects the devices so that you can put the ESX host in Maintenance Mode without having to worry about any more connected Devices that may cause a migration of a VM to fail.