You can create and manage customization specifications for Windows and Linux guest operating systems. Customization specifications are XML files that contain guest operating system settings for virtual machines.
When you apply a specification to the guest operating system during virtual machine cloning or deployment, you prevent conflicts that might occur if you deploy virtual machines with identical settings, such as duplicate computer names.
vCenter Server saves the customized configuration parameters in the vCenter Server database. If the customization settings are saved, the administrator and domain administrator passwords are stored in encrypted format in the database. Because the certificate used to encrypt the passwords is unique to each vCenter Server system, if you reinstall vCenter Server or attach a new instance of the server to the database, the encrypted passwords become invalid. You must reenter the passwords before you can use them.
To learn how you can create and manage customization specifications in the vSphere Client, watch the following video.
Create a Customization Specification for Linux
Save the system settings for a Linux guest operating system in a customization specification, which you can apply when cloning virtual machines or deploying virtual machines from templates. You can use the cloud-init utility as a standardized way to initialize a virtual machine when you deploy it in a cloud environment.
Prerequisites
- Verify that all requirements for customization are met. See Guest Operating System Customization Requirements.
- To run the customization script:
- Verify that VMware Tools version 10.1.0 or later is installed. The customization fails if VMware Tools is version earlier than 10.1.0 and you attempt to run the customization script.
- In the VMware Tools configuration, the
enable-custom-scripts
option is deactivated by default for security reasons. When you attempt to run the customization script with a deactivatedenable-custom-scripts
option, the customization fails with a customization error.For example, to enable theenable-custom-scripts
option, you must runvmware-toolbox-cmd
as a root user with theconfig
command:vmware-toolbox-cmd config set deployPkg enable-custom-scripts true cat /etc/vmware-tools/tools.conf [deployPkg] enable-custom-scripts = true
To verify that you set the option correctly, you can run the following command:vmware-toolbox-cmd config get deployPkg enable-custom-scripts [deployPkg] enable-custom-scripts = true
For more information, see the VMware Tools User Guide.
- To customize the guest operating system of a virtual machine with cloud-init metadata and user data:
- Verify that VMware Tools version 11.3.0 or later is installed.
- Verify that cloud-init version 21.1 or later is installed.
Procedure
Results
The customization specification that you created is listed in the Customization Specification Manager. You can use the specification to customize virtual machine guest operating systems.
Create a Customization Specification for Windows
Save specific Windows guest operating system settings in a customization specification, which you can apply when cloning virtual machines or deploying from templates.
Starting with vSphere 8.0 Update 2, you can specify an organizational unit (OU) for your remote desktops. An OU is a subdivision in Active Directory that contains users, groups, computers, or other OUs.
Prerequisites
Ensure that all requirements for customization are met. See Guest Operating System Customization Requirements.
Procedure
Results
The customization specification that you created is listed in the Customization Specification Manager. You can use the specification to customize virtual machine guest operating systems.
Create a Customization Specification for Windows Using a Custom Sysprep Answer File
A custom sysprep answer file is a file that stores various customization settings such as computer name, licensing information, and workgroup or domain settings. You can supply a custom sysprep answer file as an alternative to specifying many of the settings in the Guest Customization wizard.
Windows Server 2003 and Windows XP use a text file called sysprep.inf. Windows Server 2008, Windows Vista, and Windows 7 use an XML file called sysprep.xml. You can create these files using a text editor, or use the Microsoft Setup Manager utility to generate them. For more information about how to create a custom sysprep answer file, see the documentation for the relevant operating system.
You can prevent Windows from assigning new virtual machines or templates with the same Security IDs (SIDs) as the original virtual machine. Duplicate SIDs do not cause problems when the computers are part of a domain and only domain user accounts are used. However, if the computers are part of a Workgroup or local user accounts are used, duplicate SIDs can compromise file access controls. For more information, see the documentation for your Microsoft Windows operating system.
Prerequisites
Ensure that all requirements for customization are met. See Guest Operating System Customization Requirements.
Procedure
Results
The customization specification that you created is listed in the Customization Specification Manager. You can use the specification to customize virtual machine guest operating systems.
Manage Customization Specifications
You can edit, duplicate, export, or delete existing specifications.
Procedure
- In the vSphere Client, select and click VM Customization Specifications.
- Select a customization specification and select your task.
Option Description Edit customization spec You can make changes to the customization spec, such as changing the networking configuration. Click Edit and make the necessary changes. Duplicate customization spec If you need a customization specification that is only slightly different from an existing specification, you can use the Customization Specification Manager to create a copy of the existing specification and modify it. For example, you might need to change the IP address or the administrator password. Export customization spec You can export customization specifications and save them as .xml files. To apply an exported specification to a virtual machine, import the .xml file using the Import button. Delete specification spec You can remove customization specifications to free up storage.
Import a Customization Specification
You can import an existing specification and use the specification to customize the guest operating system of a virtual machine.
Prerequisites
Procedure
- In the vSphere Client, select and click VM Customization Specifications.
- Click the Import icon.
- Browse to the .xml file to import, specify a name and optional description, and click OK.