Created
January 6, 2022 07:25
-
-
Save YagmurOzden/9d703140cc490aae0f0658d40ca30a0b to your computer and use it in GitHub Desktop.
VMware vRO action, vSphere, Virtual Machine, get virtual machine's cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VMware vRealize Orchestrator action sample | |
// vRA 8.4 | |
//action input type: vm (VC:VirtualMachine) | |
//action return type: VC:ClusterComputeResource | |
var parent = vm.runtime.host; | |
while (parent !== null && ! (parent instanceof VcClusterComputeResource)) { | |
parent = parent.parent; | |
} | |
System.log("VC:VirtualMachine Name: " + vm.name); | |
System.log("VcClusterComputeResource of VM: " + parent.name); | |
return parent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment