I may be an audience of one in this regard, but I recently decided to upgrade and try the vSphere Perl SDK on Mac OSX. Typically I just copy the VMware modules from the Linux install into my /System/Library/Perl/5.8.8/ path and CPAN any dependencies.
However, the new VICredStore.pm module is giving me problems. The fix is pretty simple (the error is also likely an oversight). When doing the get_os() subroutine call in the get_default_path() subroutine, OSX is actually being detected as WINDOWS. :smileywink:
Turns out in the get_os() subroutine the case insensitive regex /Win/i is matching 'darwin' which is the string returned by $^O. :smileysad:
# ------------------------------------------------------------------------------
# Description: Query the OS name.
# Input: Subroutine style: VICredStore::get_os
# Output: String containing name of OS.
# ------------------------------------------------------------------------------
sub get_os
{
my $os = $^O;
if ($os =~ /Win/i) { $os = 'WINDOWS'; }
elsif ($os =~ /vms/i) { $os = 'VMS'; }
elsif ($os =~ /^MacOS$/i) { $os = 'MACINTOSH'; }
elsif ($os =~ /os2/i) { $os = 'OS2'; }
else { $os = 'UNIX'; }
return ($os);
}
I patched it manually to get around the issue, I included the patch file if it might benefit anyone.
cp VICredStore.pm VICresStore.pm-distrib
patch VICredStore.pm < VICredStore-OSXFix.patch
Obviously not supported by VMware. However this does seem to proceed past the new credential store feature successfully.
Now I'm looking into Error: Server version unavailable at 'https://<esx host>/sdk/vimService.wsdl' complaints when running my scripts.
I thought this might be of assistance to someone.