Cannot deploy virtual machines by using the Guest OS customization option and VM template that has a computer name longer than 15 characters
search cancel

Cannot deploy virtual machines by using the Guest OS customization option and VM template that has a computer name longer than 15 characters

book

Article ID: 318945

calendar_today

Updated On: 03-25-2025

Products

VMware vCenter Server

Issue/Introduction

To be able to deploy the VMs.

Symptoms:

  • You cannot deploy virtual machines by using a VM template after an upgrade to vCenter version 6.5 U3k,6.7 U3j  or vCenter Server 7.0.0b or later versions.
  • VM template has a computer name longer than 15 characters.
  • The VMs, NICs shows disconnected.
  • In the vCenter vpxd.log you will see similar entries.


YYYY-MM-DDTHH:MM:SS info vpxd[08396] [Originator@6876 sub=VmProv opID=kdtz7aj8-520539-auto-b5ng-h5:70108018-13-02] Created VM vim.VirtualMachine:vm-3998 (ds:///vmfs/volumes/########-######ef/vmname/vmname.vmx) on host [vim.HostSystem:host-555,hostname] (hostname)
 } to VM ds:///vmfs/volumes/########-######ef/vmname/vmname.vmx on host <IP>
YYYY-MM-DDTHH:MM:SS warning vpxd[42562] [Originator@6876 sub=InvtVmDb opID=HB-host-549@235344-3f385f7b] Skipping update of NIC settings for unknown device; key=-1, VM id=1545
YYYY-MM-DDTHH:MM:SS info vpxd[08396] [Originator@6876 sub=pbm opID=kdtz7aj8-520539-auto-b5ng-h5:70108018-13-02-01] Reconfigure profile association for vm vm-3998
YYYY-MM-DDTHH:MM:SS info vpxd[08396] [Originator@6876 sub=vmmoVm opID=kdtz7aj8-520539-auto-b5ng-h5:70108018-13-03] Powering on vm vmname (ds:///vmfs/volumes/########-######ef/vmname/vmname.vmx) in compute resource <name> on host <hostname>

  • In the ESXi  var/log/hostd.log you will see similar entries.

YYYY-MM-DDTHH:MM:SS info hostd[2102433] [Originator@6876 sub=Vimsvc.ha-eventmgr] Event 8793 : vmname on hostname in ha-datacenter is powered on
YYYY-MM-DDTHH:MM:SS info hostd[2102433] [Originator@6876 sub=Vimsvc.ha-eventmgr] Event 8794 : Started customization of VM vmname. Customization log located at C:/Windows/TEMP/vmware-imc/guestcust.log in the guest OS.
YYYY-MM-DDTHH:MM:SS info hostd[2100370] [Originator@6876 sub=Vimsvc.ha-eventmgr] Event 8795 : An error occurred while customizing VM vmname. For details reference the log file C:/Windows/TEMP/vmware-imc/guestcust.log in the guest OS.

 

  • In the VM folders vmware.log you will see similar entries.

YYYY-MM-DDTHH:MM:SS| vmx| I125: DICT ethernet0.virtualDev = "vmxnet3"
YYYY-MM-DDTHH:MM:SS| vmx| I125: DICT ethernet0.dvs.switchId = "50 08 91 17 ## ## ## ##-## ## ## ## 50 c5 b2 e8"
YYYY-MM-DDTHH:MM:SS| vmx| I125: DICT ethernet0.startConnected = "FALSE"

 

  • In the VMs guest customization logs, C:/Windows/TEMP/vmware-imc/guestcust.log you will see similar entries.

YYYY-MM-DDTHH:MM:SS: : INFO] GuestCustUtil invoked.
YYYY-MM-DDTHH:MM:SS: : INFO] Checking for Windows Sysprep Respecialize operation.
YYYY-MM-DDTHH:MM:SS: : DEBUG] Sysprep process is not running.
YYYY-MM-DDTHH:MM:SS: : INFO] Windows Sysprep Respecialize operation was not detected.
YYYY-MM-DDTHH:MM:SS:  GuestCustUtilLib:  DEBUG] customizationState: 4, errCode: 0
YYYY-MM-DDTHH:MM:SS:  GuestCustUtilLib:  DEBUG] Got VMX response: ''
YYYY-MM-DDTHH:MM:SS: :  DEBUG] Temporary sysprep dir path: C:\sysprep
YYYY-MM-DDTHH:MM:SS: :  DEBUG] Copying file/directory from 'sysprep' to 'C:\sysprep'
YYYY-MM-DDTHH:MM:SS: : INFO] Sysprep File is C:\Windows\Panther\unattend.xml
YYYY-MM-DDTHH:MM:SS: : DEBUG] HandleCustomizationFailed
YYYY-MM-DDTHH:MM:SS: : DEBUG] Customization in progress set to 0 at 2020-Sep-03 10:29:14
YYYY-MM-DDTHH:MM:SS: GuestCustUtilLib:  DEBUG] customizationState: 4, errCode: 100
YYYY-MM-DDTHH:MM:SS:  : DEBUG] RpcChannel: Recved 0 bytes
YYYY-MM-DDTHH:MM:SS:  : DEBUG] RpcChannel: Request OK: reqlen=95, replyLen=0
YYYY-MM-DDTHH:MM:SS: :  INFO] GuestCustUtil exiting.
Guest customization exits with customizationState: 4, errCode: 100

  


Note: The preceding log excerpts are only examples. Date, time and environmental variables may vary depending on your environment.

Environment

VMware vCenter Server  6.x
VMware vCenter Server 7.0.x

Cause

In windows OS when the computerName is exceeding 15 chars, Sysprep cannot handle computerName exceeding this length.

Resolution

This issue is resolved in VMware vCenter Server  6.5 U3n, 6.7 U3m and 7.0 U1c patches. To download go to the Broadcom Downloads page.


Workaround:
Use a shorter computer name in the Windows OS for the VM template.

Perform the below steps:

  1. Convert the template into VM and power it on.
  2. Login to the VM and use a shorter computer name, reboot and confirm the VM state is good.
  3. Power off the VM.
  4. Convert the VM into template.
  5. Deploy VM from template while selecting the customization.

Additional Information

It fails with GetComputerEx() Win32API we are using to get current VM's name, For more information refer to Microsoft Document https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getcomputernameexa
If the buffer is smaller than the returned value there will be "ERROR_MORE_DATA" error.

Impact/Risks:
Changing the VM templates computername to a shorter one.