VMware

vcenter win template w new SID and admin account?

i have a vcenter 6.5u3 setup with 3x hosts and i’ve been trying to make a new ESXi template of windows 2012 r2 (and eventually a template of win 2016 server) with these items covered:

– a new/unique windows SID (on each vm creation from template)
– new windows computer name (ie “WIN-GEVW232WED” – although I realize I can manually change this one after deploy)
– using the windows admin or administrator account and keeping all of my template’s apps, desktop items and settings (ie i install bginfo which shows stats on the desktop background)

I understand really the only/proper way to create a template where on each new deploy there will be a new/unique Windows SID, is to run sysprep as the final step of my template creation, before i send the template to my vcenter content library.

however sysprep essentially resets my administrator account, so I lose all of my apps settings and other items I set up in the original template (for example Bginfo is gone).

i made another template, and didn’t run sysprep at the final step, and of course all of my administrator account settings/apps were *not* wiped, however the windows SID and computer name are exact duplicates of the templates/other clones.

The only solution I have read/come across, but have not tested is (during my template creation) to create a new Windows account, for example “Bob”, set it as administrator, then apply all of my apps/settings, and run sysprep at the final step.

so i have 2x questions, please:

1-do I lose any win privileges or functionality by using an account like Bob set as admin, versus using the built-in admin/administrator account?  (I know security best practices is to disable the win administrator account, but these are mostly tests/lab VM‘s)

2- what is the best way to create this template such that all of my apps/settings aren’t wiped on each deploy (but i still achieve the 3x requirements i have at the top of this post)?

thanks


View Reddit by jimmy58743View Source

Related Articles

4 Comments

  1. You don’t make the changes to your template, you use the customization wizard to do that. When you deploy from template, select Customize this VM. This will essentially run a sysprep, changing the SID, setting the admin password you want, join the domain etc…

  2. So I have been using ansible to deploy my vms. Basically you set up your Windows Template VM how you want it (install apps, configure apps, etc…). Note: no need to sysprep, ansible will do the heavy lifting. When it comes time to deploy you run the ansible script with the all of the customization options you want. Ansible will go through all the tasks of cloning the Template to a New VM and boot it. When the customization phase is complete the VM will reboot and you will have a new SID. Windows VM is ready to join the domain.

    I haven’t had any issues using Ansible to deploy VMs with new SIDs.

    There is much information about ansible and deploying templates here ([https://docs.ansible.com/ansible/latest/modules/vmware_guest_module.html](https://docs.ansible.com/ansible/latest/modules/vmware_guest_module.html)) and you could reach out to the folks at /r/ansible

  3. I do my deployments with just good old fashioned PowerCLI.

    Look into OSCustomizationSpec, it will have all the info you need.

  4. Use the VM Customization Specifications that is embedded on vCenter. You can define several settings to Windows guest

Leave a Reply

Close