Home Perl Print list of powered on / powered off VMs
Print list of powered on / powered off VMs PDF Print E-mail
Written by Siva   
Friday, 19 November 2010 04:46

Requirement:

  • vSphere SDK for Perl - 32-bit Linux Installer


#!/usr/bin/perl
use strict;
use warnings;
use VMware::VIRuntime;

 

foreach my $vm (@$vm_views) {
if ($vm->runtime->powerState->val eq 'poweredOn')

{
print "Virtual machine " . $vm->name . " is powered on.\n";
}
else

{
print "Virtual machine " . $vm->name . " is not powered on.\n";
}

Last Updated on Friday, 19 November 2010 04:47
 
 

Advertisement

Featured Links:
HREmail.com
Looking for job? Try HREmail.com
Want to have CMS based Websites?
Try siliconwebcreators.com to CMS based websites.
VM Solutions Inc
For best VM solutions..
Digital Procedure Inc.
Looking for Oracle /SAP /Weblogic Consulting services? visit digitalprocedure.com