See below. I have not used this property myself, but perhaps it would do the trick. Let me know how it goes.
Table 3-14 in vRA 7.2 Custom Properties Reference
VMware.VirtualCenter.OperatingSystem - Specifies the vCenter Server guest operating system version (VirtualMachineGuestOsIdentifier) with which vCenter Server creates the machine. This operating system version must match the operating system version to be installed on the provisioned machine. Administrators can create property groups using one of several property sets, or example, VMware[OS_Version]Properties, that are predefined to include the correct VMware.VirtualCenter.OperatingSystem values. This property is for virtual provisioning. When this property as a non-Windows value, the Connect Using RDP user interface option is disabled. The property can be used in a virtual, cloud or physical blueprint. For related information, see the enumeration type VirtualMachineGuestOsIdentifier in vSphere API/SDK Documentation. For a list of currently accepted values, see the vCenter Server documentation.
This definitely appears to be the property I need, but I've deployed several more VM's, and cant get it to apply. It doesn't seem to want to work for some reason. I'll keep working on it.
1 person found this helpful
Sorry for the delayed response. I am currently using "System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity()" to apply the properties that my business requires in a custom vRO workflow. Perhaps this method will work in your case as well. I am using the Event Broker to call the workflow during "Machine Provisioning" with the conditions below:
Run based on conditions - All of the following
Data > Lifecycle State > Lifecycle state name - Equals - VMPSMasterWorkflow32.Requested
Data > Lifecycle State > State phase - Equals - EVENT
I would be happy to share my code if you think it may help.
Alternatively, there are several blog posts that may assist as well. The link below is a bit older but seems to be applying the property you seek to use. Please take a look and let me know if you are successful. Thanks and good luck!
Also, be sure that the data input into the property is accurate and CASE correct. See the link below for the list of OS.
Some code would be helpful. I have gotten a workflow to fire off, using the event conditions that you have provided, but I still cannot get the OS to update using the 'Create/Update Property on vCAC VM' workflow.
1 person found this helpful
I have attached the workflow that I use at the event described in my previous post. You can ignore the 3rd and 4th elements in the workflow as they are inconsequential.
The first element is borrowed from a blog post I had found a few weeks ago. (Unfortunately, I cannot recall where I found it. I will update this post if I find it.) This element gathers all of the properties of the new VM from the payload provided to vRO from vRA. It also logs all of the properties so you can see all the information vRA is providing.
The second element is selecting specific properties and making a decision based on the values. For instance, backup retention or T-Shirt sizing.
The final element is applying the updated properties back to the VCACENTITY before the machine is deployed.
This may not be the most elegant workflow, but it is getting the job done and doing so quickly. Let me know if you have additional questions. Thanks.
I had code very similar to yours pieced together, and additionally modified yours to set the 'VMware.VirtualCenter.OperatingSystem' property. The workflow runs with out error, and says it successfully updated the property. Unfortunately, the property does not change on the VM. Im not sure why its not working.
In the meantime, I was able to workaround my issue by setting my workflow to run after provisioning is complete. It powers off the VM and changes the Guest OS. I have attached that workflow for anyone who is curious. Thank you for your help on this issue!
Linux Provision.workflow.zip 23.3 K
Glad you got it working!