Created
March 30, 2017 20:42
-
-
Save trisharia/9520ad519aacd383e8c1b78c5544915e to your computer and use it in GitHub Desktop.
Rename a vRA IaaS virtual machine
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 | |
// | |
// Rename a vRA IaaS VM | |
// | |
// For vRO/VRA 6.0+ | |
// | |
// Action Inputs: | |
// vm - vCAC:VirtualMachine - vRA IaaS VM | |
// vmName - New name of VM | |
// | |
// Return type: void | |
var properties = new Properties(); | |
properties.put("VirtualMachineName", vmName); | |
var vmEntity = vm.getEntity(); | |
vCACEntityManager.updateModelEntityBySerializedKey(vmEntity.hostId, vmEntity.modelName, vmEntity.entitySetName, vmEntity.keyString, properties, null); | |
System.log("VM successfully renamed to '" + vmName + "'"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment