VMware Cloud Community
jonesliu
Contributor
Contributor

the error will occur when run the script "upsVIShutdown.pl" on the VMA4.1

I have installed VMware ESXi 4.1 server as host OS, import the VMA 4.1 as virtual machine

target the host by the command "sudo vifp addserver ** ", edit the script "upsVIShutdown.pl", add the target

but when I run "upsVIShutdown.pl", the error will occurs:

use of inherited autoload for non-method vifplib_perl::CreateVIUserInfo() is deprecated at upsVIShutdown.pl line 70

undefined subroutine &vifplib_perl::CreateVIUserInfo called at upsVIShutdown.pl line 70

strangely ,if I import the VMA 4.0 as virtul machine, then run the script "upsVIShutdown.pl", the host and guest OS will be shutdown gracefully

expect your help,,,the script as post

0 Kudos
2 Replies
lamw
Community Manager
Community Manager

First off, for any questions regarding my scripts, you should post in the appropriate VMTN documents from where you downloaded the scripts.

Secondly, has been deprecated for sometime, this script is no longer supported and you should be using the latest version:

The issue that you are seeing has to do with the vi-fastpass Perl modules that were changed and undocumented by VMware in the latest release of vMA 4.1. Scripts that utilized the old functions would run into this problem and I'm aware of the problem but have not had the cycles to remediate this problem in the ghettoUPS.pl script.

Thanks

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
jonesliu
Contributor
Contributor

hi william:

thanks , I have download the new script ghettoUPSHostShutdown.pl

1. run the script on the VMA 4.0(ESXi 4.0 as host) by the commandas following:

perl ghettoUPSHostShutdown.pl --host_operation autoquery --vm_operation auto --timeout 10 --ups_vm vMA-UPS-MONITOR

I got the exact time amount is 2 minutes, then run the commands:

perl ghettoUPSHostShutdown.pl --host_operation shutdown --vm_operation shutdown --timeout 2 --ups_vm vMA-UPS-MONITOR

The info will show: info: Found host: 172.18.127.11

172.18.127.11 is my host IP, as the same words, the taget server can be found

despondently, the vm can be shutdown gracefully, but he host cannot be shutdown

2. In the same way, I run the script on the VMA 4.1(ESXi 4.1 as host)

The error will occur:

Use of inherited AUTOLOAD for non-method vifplib_perl::CreateVIUserInfo() is deprecated at ./ghettoUPSHostShutdown.pl line 110.

Undefined subroutine &vifplib_perl::CreateVIUserInfo called at ./ghettoUPSHostShutdown.pl line 110

can you give some advise about how to verify the two issues??

0 Kudos