VMware Cloud Community
edgartan
Contributor
Contributor

Static hostname on custom specification

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.

0 Kudos
4 Replies
daphnissov
Immortal
Immortal

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?

0 Kudos
edgartan
Contributor
Contributor

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.

0 Kudos
daphnissov
Immortal
Immortal

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.

0 Kudos
edgartan
Contributor
Contributor

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.

0 Kudos