The issue occurs when performing Windows guest customization using the CustomizeVM_Task() API with the password parameter unset. For Windows VMs, we observe the following behavior when executing any guest customization tasks:
Example:
When modifying or updating the guest networks and setting the password parameter to match the guest credentials, the network is configured successfully.
However, when the password parameter is unset, the guest networks are still configured successfully, but the Windows VM administrator password is erased, effectively removing the password requirement for guest login.
For Linux VMs, there is no need to set the password parameter, as guest customization works whether or not a password is provided.
VMware vCenter Server 8.x
VMware vCenter Server 7.x
VMware ESXi Server 8.x
VMware ESXi Server 7.x
Behavior of the Guest Customization API CustomizeVM_Task():
Guest customization does not require guest credentials for either Windows or Linux VMs.
In the Windows guest customization specification, the "password" parameter refers to the new administrator password for the guest. If this field is left blank, the customization process will set the administrator password to no password. For more information, please refer to here.
To summarize, the guest customization behavior is as follows:
For Linux:
Guest customization does not support modifying the root password, so no password-related configuration needs to be specified in the customization spec. As a result, the password will remain unchanged.
For Windows:
Guest customization requires specifying a new administrator password.
a. If you provide a password, guest customization will reset the Administrator password to the specified value.
b. If you leave the "password" parameter blank, guest customization will reset the Administrator password to blank (no password).
Currently, the user must choose either a or b, as we do not support customization that leaves the Administrator password unchanged. However, the user can retain the old password by setting the password to the same value as the current one using option a.
We would like to emphasize that the "password" parameter is not intended for the guest credentials but rather for setting a new password for the Windows administrator account. Therefore, for Windows guest customization, the customer has only two options: a or b as outlined above. We do not offer an option to "keep the original password unchanged" without setting a new one.
API Reference: CustomizeVM_Task()