VMware Cloud Community
pbalderos
Enthusiast
Enthusiast
Jump to solution

Creating a New Virtual Machine From A Template Post Deployment Tasks

Hello Community Friends!

I am creating 3 VMs from a template that I created in vCenter 6.0. I am wondering, since its been a while since I did this is are there any post clean up tasks? Like running sysprep or anything along that line? I will be creating 3-4 VMs from this same template.

Thanks in advance!

Phillip Balderos VCP6-DCV
1 Solution

Accepted Solutions
daphnissov
Immortal
Immortal
Jump to solution

When I say customization spec I mean you need to have a customization specification pre-created in vCenter.

pastedImage_1.png

Specifically set the "Use Virtual Machine name" option you see down there.

And when you go to deploy a new VM from that template, check the box to use that customization spec.

pastedImage_2.png

pastedImage_3.png

View solution in original post

0 Kudos
12 Replies
daphnissov
Immortal
Immortal
Jump to solution

That really depends on how you built the template and other factors. If it's a Windows template, when you deploy new VMs from it there's no need to manually run sysprep as vCenter will trigger this automatically when it comes up. You should also be using a customization spec for both Linux and Windows which will set many system parameters for you. So if you don't have customization specs, go create some before deploying those VMs. It'll make your life a lot easier.

0 Kudos
pbalderos
Enthusiast
Enthusiast
Jump to solution

Thanks!

I started up both VMs and they have the same default computer name. Is this ok?

template builds.png

Phillip Balderos VCP6-DCV
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Then you probably didn't use a customization spec which prompts for the VM name, or you didn't configure that option in your customization spec. I'd set that because it eliminates a reboot you'll now have to do in order to join those VMs to a domain. Even if you don't, you obviously don't want the same host name.

0 Kudos
pbalderos
Enthusiast
Enthusiast
Jump to solution

When you say customization spec do you mean this in the screen shot when deploying from template? Or, should I have just ran sysprep at the end of creating the VM that was to be used as the "master template"? Sorry if I am being a bobble head about it I am just trying to understand the proper step I am missing. I found this link also - https://vloreblog.com/2014/10/30/manually-using-sysprep-in-windows-2012-vms-and-templates/

Custom-Deploy Template.png

Customize Template Specs.png

Phillip Balderos VCP6-DCV
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

When I say customization spec I mean you need to have a customization specification pre-created in vCenter.

pastedImage_1.png

Specifically set the "Use Virtual Machine name" option you see down there.

And when you go to deploy a new VM from that template, check the box to use that customization spec.

pastedImage_2.png

pastedImage_3.png

0 Kudos
pbalderos
Enthusiast
Enthusiast
Jump to solution

Ah ok thanks I will have to set that up then. Well I deployed 4 vms from that template without any custom spec. They are will be used in production so is there anything I can do to be able to join them to the domain and make usable? If I have to scrap them and start over by pre creating a customization spec first I will do that. I was just hoping to keep moving forward in the interest of time.

Phillip Balderos VCP6-DCV
0 Kudos
pbalderos
Enthusiast
Enthusiast
Jump to solution

Ok I'll just start creating the custom spec now. I want to make sure this is done right

Phillip Balderos VCP6-DCV
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

One of the things the customization spec will do is generate a new SID. So, you'l have to be the judge. Is it faster for you to change all the SIDs maybe through sysprep and then the hostnames and then join each of the 4 to the domain than it is for you to create a customization spec and re-deploy from template? Don't know. If it were me, I'd delete and re-deploy with a customization spec. It's less work for you.

0 Kudos
pbalderos
Enthusiast
Enthusiast
Jump to solution

Ok thanks! I opted for creating the spec and starting from scratch. One feature I can use yet is the domain join because our server vlan does not use DHCP as we manually grab an IP and enter it. I am going to work on a solution for that. I feel like such a noob for never using the customization spec considering I started my career on desktop imaging computers using answer files. *facepalm

Custom Spec Created.png

Phillip Balderos VCP6-DCV
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

There's a solution for that even without DHCP. When you create your customization spec, create one for each VLAN (port group) where deployments will occur. Edit the customization spec and choose the option to manually select custom settings.

pastedImage_0.png

Edit the option.

Select "prompt the user". Fill out the mask and gateway.

pastedImage_1.png

Now, when you deploy using this customization spec, so long as the gateway and mask are valid, you provide a destination port group and it prompts for the IP. All this is slipstreamed into the deployed VM. If you have proper connectivity and NetBIOS resolution within that VLAN, your machine will get the static IP you specified at deployment time and be able to join the domain.

0 Kudos
pbalderos
Enthusiast
Enthusiast
Jump to solution

hmmm so I got scared because I noticed it didn't have the IP settings I assigned in the custom spec and when I logged into the server. I went to manually enter them then the server rebooted. Well that happened 3 times. The second time is asked me to change the password  then the 3rd time it gave me this message at reboot "vmware customization image in progress" So I figured that was sysprep so let it do it's thing. I just logged in and the static IP settings are there. Smiley Happy This is great and you were very helpful! Thanks for the knowledge drop I am going to go deeper with this to standardize VM builds at all of our global sites now.

Phillip Balderos VCP6-DCV
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Windows VMs always have a delay between the initial boot and when it does a first reboot to apply the customizations. Let it sit until after that second reboot happens. When it comes up once again, it should have the complete settings described in the customization spec.