I have need for allowing end users to designate the name of their requested server when submitting a request through VCAC. I do this by using VirtualMachine.Admin.Name in my blueprint's custom properties and setting it to prompt user. I also have some scripts that run with the Build Provisioned stub after the server is built that require me to grab the VC:VirtualMachine object for that server by the server's name. It does this by looping through an array of all the VC:VirtualMachines gathered from my VCenter server and finding a match on the name with an xpath expression. The server's name is gathered from inside the advanced designer using getVirtualMachineName activity. This activity is built in to the designer and is intended to do exactly what it says. It then hands the name to the VCO workflow. No big deal, really. I've used this method a lot in the past with VCAC.
Problem:
Recently I started running this script on a new installation of VCO (5.5.1) and new VCAC instance (Build 6.0-1720522) and I'm seeing some very strange behavior. When I gather the name in the advanced designer with the getVirtualMachineName activity, the name comes back as the name that WOULD have been assigned had I relied on VCAC to auto-generate the name for me using a machine prefix profile. Remember that you must associate a default machine prefix on your business group. It is this prefix that is being used to generate the name and associate it to the server in VCAC despite the fact that I am specifically overriding that auto-generated name with the custom property VirtualMachine.Admin.Name in my blueprint's custom properties.
The weird thing is that the server is named correctly in the VSphere console and inside the guest OS. In other words, the name the user puts into the VirtualMachine.Admin.Name field is what you get in the VSphere console and the OS. So that part is working. So why is it not being properly named in the VCAC VirtualMachine object?
This misnaming is causing my workflow to fail. I can get around this problem in the workflow, but I'm concerned there will be further problems down the road if the wrong name is associated with the server inside VCAC itself.
Again I have done this with earlier versions of VCAC and VCO and not had this problem. Anyone else seeing this? Am I doing something wrong here?