3

When deploying a Windows 2008 R2 VM in ESXi 4.1, why does the hostname always end up the same as the original VM that was converted into the template in the first place?

How can this be rectified so that every deployed VM has a unique hostname?

update

When I try to deploy with the custom spec manually, I get some funky issues:

"Windows could not parse or process the unattend answer file for pass [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup]"

warren
  • 18,369
  • 23
  • 84
  • 135
  • Do you mean the virtual machine name or the Windows computer name? – joeqwerty Mar 06 '12 at 22:08
  • @joeqwerty - the windows hostname – warren Mar 06 '12 at 22:14
  • 1
    Have you run sysprep on the template machine? If not, then the Windows computer name is going to be the same. – joeqwerty Mar 06 '12 at 22:16
  • Are you running customization on the template's clone during the deployment (which runs a sysprep, as Joe mentioned)? Or are you just directly cloning? – Shane Madden Mar 06 '12 at 22:46
  • this seems to stump a lot of people the act of creating a template does not run sysprep appling a customization does. So if for some odd reason you don't want customization you'll need to sysprep prior to converting to template. – tony roth Mar 07 '12 at 01:39
  • @tony roth - I'm not familiar with `sysprep` – warren Mar 07 '12 at 12:54
  • 1
    ouch not understanding sysprep will cause you long term issues if you will be deploying lots of windows servers. You don't have to know it but you should, vmware masks the issue mostly but as you've found there are times that you'll need to run sysprep. With that said what you are doing deploying from template with customization should be utilizing sysprep thus you should not have the issue of duplicate names. – tony roth Mar 07 '12 at 19:22

3 Answers3

2

You need to use the customization + deploy from template feature. Don't simply clone the VM unless you've already syspreped the VM you're cloning.

The customization bit is super simple. Check out this quick how-to as a primer: http://www.vmadmin.co.uk/vmware/36-virtualcenter/114-sysprepdeploytemplate

In your customization, make sure you set "use machine name" and it will always use the name of your VM for the Windows name.

Check this out as well, I'd be curious as to what some of your logs look like. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006842

Eric C. Singer
  • 2,329
  • 16
  • 17
  • that's actually a step I had found elsewhere - and we're using it already with the same results :\ – warren Mar 07 '12 at 12:54
  • hmm.. then my guess would be that the customazation isn't running. Next time you deploy a VM, open up the console and watch. Typically it can take five to ten minutes before the customazation process begins. If you don't see it doing anyting after that. Now you'll know that you need to troubleshoot why the customazation isn't working. If the customazation does kick off, then it might be an issue in your specific customazation file. – Eric C. Singer Mar 08 '12 at 14:42
1

In this case, the issue was related to using an MSDN license key versus a "real" one.

Switching to a non-MSDN key solved our deploy-from-template problem.

warren
  • 18,369
  • 23
  • 84
  • 135
0

Does the vm have vmware tools installed in it. I think customization will only work if a current version of vmware tools is installed. Also check sysprep is present on the source templated machine, its there by default on 2K8 but maybe somebody has removed it. We are deploying 2K8R2 using template>customization and it works like a dream.

Brett

Brett
  • 1
  • VMware tools is shown as installed, but guest operations are limited/non-functional - I can make a change there and see if it helps – warren Mar 08 '12 at 16:34