9 Replies Latest reply on Oct 23, 2019 6:28 AM by sc2317

    Set System Local Language for Machines Deployed via vRA

    sc2317 Novice

      Hi,

       

      I would like to know if its possible in vRA to set the system local language for windows machines getting deployed via vRA. We have users from different parts of the world and we need to make sure that when user deploy machine then they should get option to select system local language according to the region they belong to. For example - User requesting machine from Spain could get option to set local language as Spanish or User from Japan could select Japanese etc.

       

      Is it possible to configure this via vRA ?

        • 1. Re: Set System Local Language for Machines Deployed via vRA
          daphnissov Guru
          Community WarriorsvExpert

          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.

          • 2. Re: Set System Local Language for Machines Deployed via vRA
            sc2317 Novice

            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.

            • 3. Re: Set System Local Language for Machines Deployed via vRA
              daphnissov Guru
              vExpertCommunity Warriors

              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.

              • 4. Re: Set System Local Language for Machines Deployed via vRA
                GeiAll Novice

                Hi s2317.

                 

                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.

                In short:
                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).

                EG:


                var machine = payload.get("machine") ;
                if (machine)
                {
                    virtualMachineAddOrUpdateProperties = machine.get("properties") ;
                    virtualMachineAddOrUpdateProperties.put('__clonespec',"Name of File");
                }


                Regards

                • 5. Re: Set System Local Language for Machines Deployed via vRA
                  sc2317 Novice

                  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

                  • 6. Re: Set System Local Language for Machines Deployed via vRA
                    GeiAll Novice

                    Hi sc2317.

                    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

                    • 7. Re: Set System Local Language for Machines Deployed via vRA
                      sc2317 Novice

                      Hi,

                      We use remote PS host.

                      • 8. Re: Set System Local Language for Machines Deployed via vRA
                        GeiAll Novice

                        Hi.

                         

                         

                         

                        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.

                        • 9. Re: Set System Local Language for Machines Deployed via vRA
                          sc2317 Novice

                          We have managed to run the script and working as expecting. Thanks for your support