I think this may depend on the customization spec although I don't know exactly what goes into this process. If the system local language can be set programmatically after the system has been deployed (rather than being based upon a specific Windows image), then yes, there are multiple ways to go about that in vRA.
We can do it from customization spec, however that will set that language for all machines deployed using that spec. However, what we want is that user should get an option to select the region they belong to and based on that region after the deployment system language should get changed based on selected region.
I think we may have to invoke some vRO workflow with required logic that will run to modify the system language. I am new to vRA/vRO, so would like some help on how to setup that if possible.
As I said, I don't know about changing the locale once a system has been cloned, so there are a couple of ways you could go about doing this.
The first is to use vRO logic to switch to the appropriate customization spec based on the inputs. If a user selects they're in the USA it could apply that one to the clone (obviously, these customization specs would have to pre-exist); and if they're in Germany it could apply that one. Although, yes, you could write your own vRO code, but it's entirely custom which means you write it, debug it, fix it when it breaks, and manage it going forward. What I use (and see most often) is the SovLabs Property Toolkit that would allow you to do all this but from within vRA so there's no vRO code necessary.
One solution is to use a vRO workflow (using EventBroker) to dynamically create the CustomSpec File before you deploy the VM.
Or if you do not want to create the CustomSpecFile dynamically you can manually create all of them and just change the name before deployment.
You need to have a workflow running during Administrations/Events/Subscriptions (in vRA GUI).
You can run in under:
"Data->LifeCycle-State phase" = "PRE" and
"Data->LifeCycle->LifeCycle state name" = "VMPSMasterWorkflow32.Requested"
This workflow needs to have an OUTPUT called "virtualMachineAddOrUpdateProperties". Notice the name here is important! The output type is "Properties". Futher more you need to have an INPUT with the type of "Properties" aswell. (usually called payload).
Note: Be aware that you must put a value into the __clonespec. vRO can handle null values. vRA cannot (crashes).
var machine = payload.get("machine") ;
virtualMachineAddOrUpdateProperties = machine.get("properties") ;
virtualMachineAddOrUpdateProperties.put('__clonespec',"Name of File");
Thanks. I am very new to vRO and does not yet know how it works at backend, so apologies if did not understand your suggestion. However, what I have done is created powershell script that could be invoked after the machine is deployed so that based on user's choice it would set the required settings.
Now I just need to know how to pass some variables (Specially servername and region name) to powershell script so that vRO will execute that script.
Will check if it works or may be I need to first sharpen my vRO skills before asking questions
How do you execute your powershell script?
There is several options here, witch all needs different ways to send parameters.
I can atleast think of:
- RunOnce using CustomSpecFile
- VIX (Vmware Guest Operations)
- Remote PS Host (vRO)
- Guest Agent (Software install) using vRA
We use remote PS host.
If you are using remote ps via vRO, there is good examples on how to do it in vRO.
Look under "Library->Powershell->Samples"
"invoke an external script" is a good example with parameters.
Was it helpful? Let us know by completing this short survey here.
We have managed to run the script and working as expecting. Thanks for your support