Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 214415

Re: vCenter and vCloud Director package integration?

$
0
0

Based upon this I added three parameters to my script: vcenter of type VC:SdkConnection (set to my vcenter) , newvm of type VC:VirtualMachine (unset)  and vcloudvm of type vCloud:VM (unset) and modified it as such but I am getting the following error:

 

[2013-07-24 07:22:59.858] [I] Vim Object Reference Not Found (Dynamic Script Module name : getVCenterVm#2)

 

 

 

for each (var vcloudvm in ArrayOfVms) {

Server.log("Name:"+vcloudvm.name);

System.log("Name:"+vcloudvm.name);

Server.log("Status:"+vcloudvm.status);

System.log("Status:"+vcloudvm.status);

Server.log("Href:"+vcloudvm.href);

System.log("Href:"+vcloudvm.href);

Server.log("StatusDesc:"+vcloudvm.vmStatusDescription);

System.log("StatusDesc:"+vcloudvm.vmStatusDescription);

 

newvm = System.getModule("com.vmware.pso.library.vcd").getVCenterVm(vcloudvm,vcenter) ;

 

var host = actionResult.sdkConnection;

var guestOperationsManager = host.guestOperationsManager;

var guestAuth = new VcNamePasswordAuthentication();

 

snipped

 

guestAuth.interactiveSession = true;

 

 

var guestProgramSpec = new VcGuestProgramSpec();

guestProgramSpec.programPath = "C:\Users\Administrator\Downloads\.bat";

guestProgramSpec.arguments = arguments;

guestProgramSpec.workingDirectory = "C:\Users\Administrator\Downloads";

guestProgramSpec.envVariables = environment;

 

var processManager = guestOperationsManager.processManager;

result = processManager.startProgramInGuest(vm , guestAuth , guestProgramSpec);

 

System.log("Ran workflow on" + vm.name);

}

 

schema:


Viewing all articles
Browse latest Browse all 214415

Trending Articles



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