Hello all,
I have downloaded and compiled the VMware Infrastructure (VI) Perl Toolkit Packages (Latest Version: 1.5.0 | 1/17/2008 | Build: 67153).
I am trying to use the "vmcontrol.pl" as fencing script but it has limitations. Below are all the possible power states of a VM and wanted action/results.
State Action/Results
1. If VM is powered on Hard power off the VM
2. If VM is powered off Dont error out, return VM is already off
3. If VM is suspend mode Dont error out, Hard power off the VM
As of now the below happens:
1. virtual machine 'TEST1_VM' under host X.X.X.X powered off
2. VM 'TEST1_VM' can't be powered off. The attempted operation cannot be performed in the current state (Powered Off) at /usr/lib/perl5/5.8.5/VMware/VIM2Runtime.pm line 1412
3. VM 'TEST1_VM' can't be powered off. The attempted operation cannot be performed in the current state (Suspended) at /usr/lib/perl5/5.8.5/VMware/VIM2Runtime.pm line 1412
#./vmcontrol.pl --username XXXXXX --password XXXXXX --url https://1.1.1.1:443/sdk/webService --vmname TEST1_VM --operation poweroff
Thanks in advance!