Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 207710

Undefined subroutine error for InstallHostPatchV2_Task()

$
0
0

Hello, I am trying to patch a host using InstallHostPatchV2_Task() API .. Here is the code snippet

 

 

...
$conn = Vim->new(service_url=>"https://$vc_server/sdk");
$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

Viewing all articles
Browse latest Browse all 207710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>