4 Replies Latest reply on Jul 12, 2019 10:32 AM by edgartan

    Static hostname on custom specification

    edgartan Novice

      Hello all,

       

      I'm bumping on an issue with custom specification, I'm setting the computer name to be static. When the VM gets deployed in vra, the computer name is initially set to the static value but goes back to a Windows default value, e.g. WIN-3B64PEIQFJL.

       

      I've done some customization on the OS, sysprep doesn't seem to like this. Doing the same without the customization works fine.

       

      I tried using Hostname property along with EBS, this would result with a VM name with UUID and a static hostname. The problem doing this is we can only deploy a blueprint with the same static hostname one at a time until data collection is done.

       

      Ideally what I want to achieve are these:

      1. Have a Windows machine prepared for automation(e.g. Autologin, IE settings, shared folders, some applicaitons installed etc).

      2. Have a static DNS name when deploying in vRA

       

      Appreciate all the help i can get.

        • 1. Re: Static hostname on custom specification
          daphnissov Guru
          Community WarriorsvExpert

          I'm kind of confused in reading your post as there seems to be several things going on which don't make a whole lot of sense. Rather than dissecting each one, let me address your questions at the bottom directly.

           

          1. Have a Windows machine prepared for automation(e.g. Autologin, IE settings, shared folders, some applicaitons installed etc).

          Fine, you'd do this in your Windows template and vCenter customization spec. Keep in mind whatever applications you have installed need to be generic and not have any sort of unique identity owing to the fact this is going to get cloned. In many cases, those applications cannot be pre-installed but must be done through automation, and there are various ways to go about that.

           

          2. Have a static DNS name when deploying in vRA

          You can set the Hostname custom property on the machine object for this, but you will nee to ensure you only ever have one that exists at a time. Otherwise, why are you asking for this? What is your use case?

          • 2. Re: Static hostname on custom specification
            edgartan Novice

            We are coming from a vCloud Director environment and moving to vRA and it's a struggle.

             

            1. Have a Windows machine prepared for automation(e.g. Autologin, IE settings, shared folders, some applicaitons installed etc).

            Fine, you'd do this in your Windows template and vCenter customization spec. Keep in mind whatever applications you have installed need to be generic and not have any sort of unique identity owing to the fact this is going to get cloned. In many cases, those applications cannot be pre-installed but must be done through automation, and there are various ways to go about that.

             

            Yes we're learning this the hardway, sysprep is breaking a lot of our pre-configuration intended for automation.Right now we simply clone in vcenter to avoid running sysprep. On published blueprints, we know some areas of the guest OS are broken, we're dealing with it as we find them.

             

            2. Have a static DNS name when deploying in vRA

            You can set the Hostname custom property on the machine object for this, but you will nee to ensure you only ever have one that exists at a time. Otherwise, why are you asking for this? What is your use case?

            We've solved this by letting vra give the machine a dynamic vm-name and running a rename script on the Windows guest OS.

            • 3. Re: Static hostname on custom specification
              daphnissov Guru
              vExpertCommunity Warriors

              Yes we're learning this the hardway, sysprep is breaking a lot of our pre-configuration intended for automation.Right now we simply clone in vcenter to avoid running sysprep. On published blueprints, we know some areas of the guest OS are broken, we're dealing with it as we find them.

              If you're using vRA, there's really no need to run sysprep manually, or even prepare the template for sysprep before shutting it down.

               

              We've solved this by letting vra give the machine a dynamic vm-name and running a rename script on the Windows guest OS.

              But...why? Why are you making your life more difficult? There are countless ways in vRA to go about setting the VM name and having that automatically set as the host name.

              • 4. Re: Static hostname on custom specification
                edgartan Novice

                We moved away entirely from sysprep, it's just breaking so much stuff in the template. I thought the only way to get networking on the vRA VMs is through sysprep, now we configure networking on EBS and everything is fine. We got all we need without the headaches: static hostname, static internal IP and pristine templates.