Does anyone know how I can set the name of the vRA VM from vRO? I thought that setting the Hostname property in the Building VM workflow would do the job but it appears that the VM name has already been decided. I want to do this entirely from Orchestrator but am having no luck.
Thanks,
Carl L.
So are you trying to use the VirtualMachine.Admin.Name custom property to set the name during the build step?
I haven't tried yet but fundamentally you could try to use the Update Entity workflow to assign the name to VirtualMachine.Admin.Name.
Hostname is only determined through vRA but you can use properties and vRO to create more dynamic ones. Take a look at this plugin for custom host naming tasks. http://dailyhypervisor.com/vcloud-automation-center-vcac-5-2-custom-hostnaming-extension/
I saw that one and, yes, it would solve the problem if I just want a pattern (as opposed to accessing external data to determine the VM name). The vRA Hostname property is supposed to set the name of the VM but setting it in the building sequence from Orchestrator does not do the job.
This link
shows how to do it via vRA Designer. I just want to do it via Orchestrator. If I can do it in designer, it seems I should be able to do it from vRO. I just don't like Designer and definitely don't want to learn VB.
Thanks,
Carl L.
So are you trying to use the VirtualMachine.Admin.Name custom property to set the name during the build step?
I haven't tried yet but fundamentally you could try to use the Update Entity workflow to assign the name to VirtualMachine.Admin.Name.
Ahhh, that was the correct property. I was setting the Hostname property instead. VirtualMachine.Admin.Name was the one that needed to be changed instead.
Thanks so much!
Carl L.
OK, It was going so well . vCAC provisions the VM with the correct name in vCenter. However, the name is still the VM Prefix name in the vCAC item list. Also, after the next data collection, vCAC shows the VM as missing. So, what else do I need to set to make things right?
Thanks,
Carl L.
Hi,
I used the Hostname property during the Building stub to modify it via vRO and this done the job to me. Cause I currently have no working environment, I have only a untested sample but this could do the job for you:
// Set hostname
var propertyName = "Hostname";
var propertyValue = <newHostname>;
System.debug( "Set VM property " + propertyName + " to '" + propertyValue + "'" );
System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(<vCACHost>,<virtualMachineEntity>,propertyName,propertyValue,false,false,false,true) ;
Cheers,
Chris