I'd like to leverage the canned "Copy file from vCO to Guest" workflow on VMs running in vCloud Director. The issue is that this workflow needs the vCenter VM Name. Is there a way in Orchestrator to get a vCloud VM and then get the corresponding VM name in vSphere?
Any help would be greatly appreciated.
Thanks
To anyone else who finds this, you have to connect the the system organization and not a child organization in order to access the getVMVimRef() method.
Message was edited by: jgreenback
Hi,
Check this post from Christophe Decanini demonstrating how to get VC:VirtualMachine object from vCloud:VM - https://communities.vmware.com/docs/DOC-24307
Here is the scripting code; inputs are 'vm' of type vCloudVM (vCloud virtual machine) and 'vcServer' of type SdkConnection (vCenter connection):
var managedObject = new VcManagedObjectReference();
managedObject.type = "VirtualMachine";
managedObject.value = vm.getVMVimRef().moRef;
return VcPlugin.convertToVimManagedObject(vcServer , managedObject); // returns VC:VirtualMachine object
Hi,
Check this post from Christophe Decanini demonstrating how to get VC:VirtualMachine object from vCloud:VM - https://communities.vmware.com/docs/DOC-24307
Here is the scripting code; inputs are 'vm' of type vCloudVM (vCloud virtual machine) and 'vcServer' of type SdkConnection (vCenter connection):
var managedObject = new VcManagedObjectReference();
managedObject.type = "VirtualMachine";
managedObject.value = vm.getVMVimRef().moRef;
return VcPlugin.convertToVimManagedObject(vcServer , managedObject); // returns VC:VirtualMachine object
Thanks, that worked great!!
To anyone else who finds this, you have to connect the the system organization and not a child organization in order to access the getVMVimRef() method.