VMware

executeCommandUsingFastPass.pl

VERSION 1 Published

Created on: Sep 12, 2009 11:15 AM by lamw - Last Modified:  Sep 12, 2009 11:18 AM by lamw

Execute vCLI/vSphere SDK for Perl scripts utilizing VMware vMA/VIMA vi-fastpass without user interaction or issuing vifpinit

Requirements:

Setup:
Here is the input file which contains the list of ESX(i) hosts that are being managed by VIMA/vMA
[vi-admin@scofield ~]$ cat hostlist
lazarus.primp-industries.com
kang.primp-industries.com



Here is just a dummy conf that is read in because of the default parsing/validation that is required for some of the perl modules that are written by default
[vi-admin@scofield ~]$ cat DUMMY_CONF
VI_USERNAME=dummy
VI_PASSWORD=dummy



Sample Execution:

Execute a vSphere SDK for Perl utility called viversion.pl across set of hosts:

[vi-admin@scofield ~]$ ./executeCommandUsingFastPass.pl --hostlist hostlist --config DUMMY_CONF
Executing viversion.pl on Server: lazarus.primp-industries.com 
================ RESULTS ================

This is  HostAgent 4.0

This is VMware ESX 4.0.0 build-164009 running on x86 ESX Server microkernel
The product Line ID is a unique identifier for a product line. This is VMware ESX Server product.

Short form of the product name is VMware ESX having version 4.0.0

System is running on x86 ESX Server microkernel


Executing viversion.pl on Server: kang.primp-industries.com
================ RESULTS ================

This is  HostAgent 2.5u2

This is VMware ESX Server 3i 3.5.0 build-110271 running on x86 ESX Server microkernel
The product Line ID is a unique identifier for a product line. product line id is embeddedEsx
Short form of the product name is VMware ESX Server 3i having version 3.5.0

System is running on x86 ESX Server microkernel



You can easily modify the script to execute additional commands or even write directly to the vSphere SDK for Perl and use the fastpass credentials to connect to your hosts.
Attachments:
Average User Rating
(0 ratings)




Comments

There are no comments on this document

 

Developer Social Media

Communities