Hello, I am trying to patch a host using InstallHostPatchV2_Task() API .. Here is the code snippet
...
$conn->login(user_name=>$vc_username,password=>$vc_password);
my $host_view = $conn->find_entity_view(view_type => 'HostSystem', filter => {'name' => $esxHost});
eval {
$host_view->configManager->patchManager->InstallHostPatchV2_Task(metaUrls => '', bundleUrls => '', vibUrls => '<location of the VIB>');
};
if ($@) {
print "Error: " . $@ . "\n\n";
}
This returns "Error: Undefined subroutine &ManagedObjectReference::InstallHostPatchV2_Task called at /bin/Install_Task.pl line 66 "
I referred http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/index.html and provided the path accordingly. Is that not right?
OR Am i missing any runtime libs which is required for this method? I've used the below currently
use Data::Dumper;
use VMware::VILib;
use VMware::VIRuntime;
use Getopt::Long;
Thanks for the help,
Krishnaprasad