VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts)
20 Replies Last post: Apr 2, 2009 8:49 AM by mikefoley   Go to original post 1 2 Previous Next

Re: Basic Perl VIC Plugin help

16. Mar 31, 2009 12:44 PM in response to: krobe
Click to view stumpr's profile Expert 470 posts since
Sep 26, 2007
Great, I'll tweak it for my setup and see if I can hit the snag you've hit.

Re: Basic Perl VIC Plugin help

17. Mar 31, 2009 2:07 PM in response to: krobe
Click to view stumpr's profile Expert 470 posts since
Sep 26, 2007
Krobe,

I took your code unmodified (I only changed the Url in the configuration file for my environment for the most part).

I'm getting a valid session returned (I uncommented get_params).

I included a screen shot.
Attachments:

Re: Basic Perl VIC Plugin help

19. Mar 31, 2009 1:56 PM in response to: krobe
Click to view stumpr's profile Expert 470 posts since
Sep 26, 2007
I'm using the Linux VI Perl Toolkit on a Linux 2.6 kernel system running apache. assetinfo.pl is on this Linux web server as well as the assetinfo.xml. My VC is on a standard Windows 2003 server. I used the RegisterPlugin script you linked from the DOCs from the forums here. My command is almost the same as yours except I used my credentials and VC Server IP of course.

I guess its possible there could be a bug with the cookie module on Windows...seems unlikely though, but always possible.

To handle the ManagedObjectReference I had to use a bit of code :
my ($mo_type, $mo_value) = split(/:/, param('moref'));
my $vm_moref = new ManagedObjectReference( value => $mo_value, type => $mo_type);
my $vm_view = Vim::get_view( mo_ref => $vm_moref );

print "
VM Name: " . $vm_view->name . "\n"; print "
VM Annotation: " . $vm_view->summary->config->annotation . "\n"; undef $vm_moref;


My VMs are in an ugly state after toying around in my environment, so ignore the Unknown names :)
Attachments:

Re: Basic Perl VIC Plugin help

20. Apr 2, 2009 8:49 AM in response to: mikefoley
Click to view mikefoley's profile Expert vExpert 376 posts since
Nov 23, 2004

http://communities.vmware.com/thread/202882

The script has been released. Enjoy,

mike foley
VCP/vExpert
RSA, the Security Division of EMC

Developer Social Media

Communities