VMware {code} Community
shaka
Enthusiast
Enthusiast

Newbie: trying to learn PERL and VC SDK. Need help starting off

Looking for help writing a script that will connect to VC list the hosts, the vm folder name, vm host name, vmdk datastore location. Even if you can just help me get started would be greatly appreciated.

Reply
0 Kudos
3 Replies
ssurana
VMware Employee
VMware Employee

Hi Javed,

To start with you can have a look at the sample scripts that are shipped with the Perl toolkit.

I am attaching the sample script that can perform the operations you are interested in.

Syntax to execute the script: perl dsbrowse.pl --url https://

~ Sidharth

Reply
0 Kudos
shaka
Enthusiast
Enthusiast

Thanks for the script. I am getting an error when I run the script....

line 13.

BEGIN failed--compilation aborted at C:\Program Files\VMware\VMware VI Remote CLI\Perl\samples\Test\dsbrowse.pl line 13.

Line 13 is use AppUtil::HostUtil;; Did I not load the libraries correctly or do I have an older version of the toolkit? I have the HostUtil.pm file load so I am not sure what the problem is?

Reply
0 Kudos
hrobinson
VMware Employee
VMware Employee

Look at this thread. The final script should give you much of what you want.

Note: Did you solve your original problem?

H