This article provides steps to resolve the issue when the
Clone virtual machine Templatexxxx : Cannot connect to host error occurs while attempting to deploy a template or clone using customization.
Symptoms:
- Deploying a template or clone using customization fails at 93% .
- You see the error:
Clone virtual machine Templatexxxx : Cannot connect to host
- Cloning or deploying without customization works as expected.
- The C:\ProgramData\VMware\VMware VirtualCenter\Logs\vpxd.log file, contain entries similar to when set to trivia:
[<YYYY-DD-MM><time> 02960 trivia 'App'] [Vdb::Connection::Record] Recording (4022118:1) INSERT INTO VPX_EVENT_ARG (EVENT_ID, ARG_ID, ARG_TYPE, ARG_DATA, OBJ_TYPE, OBJ_NAME, VM_ID, HOST_ID, COMPUTERESOURCE_ID, DATASTORE_ID, NETWORK_ID, NETWORK_TYPE, DVS_ID, DATACENTER_ID, RESOURCEPOOL_ID, FOLDER_ID, ALARM_ID, SCHEDULEDTASK_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[<YYYY-DD-MM><time> 02960 verbose 'PropertyProvider'] RecordOp ASSIGN: info.state, task-43499
[<YYYY-DD-MM><time> 02960 verbose 'PropertyProvider'] RecordOp ASSIGN: info.cancelable, task-43499
[<YYYY-DD-MM><time> 02960 verbose 'PropertyProvider'] RecordOp ASSIGN: info.error, task-43499
[<YYYY-DD-MM><time> 02960 info 'App'] [VpxLRO] -- FINISH task-43499 -- vm-34631 -- vim.VirtualMachine.clone -- ########-####-####-####-########A9BE(########-####-####-####-########078C)
[<YYYY-DD-MM><time> 02960 info 'App'] [VpxLRO] -- ERROR task-43499 -- vm-34631 -- vim.VirtualMachine.clone: vim.fault.HostConnectFault:
(vim.fault.HostConnectFault) {
dynamicType = <unset>,
faultCause = (vmodl.MethodFault) null,
msg = "",
[<YYYY-DD-MM><time> 02960 verbose 'PropertyProvider'] RecordOp ASSIGN: info.completeTime, task-43499
[<YYYY-DD-MM><time> 03208 verbose 'App'] [VpxdResMgr] Resv Req.: (host-36980,1)
[<YYYY-DD-MM><time> 03208 error 'App'] [VpxdVmprov] Clone failed: vim.fault.HostConnectFault
[<YYYY-DD-MM><time> 03208 trivia 'App'] [VpxdMoVm::GetCfgFileInt] config file is sanfs://vmfs_uuid:########-####-########23e4/Template_Name/Template_VM_Name.vmtx
[<YYYY-DD-MM><time> 03208 trivia 'App'] [VpxdMoVm] Returning datastore datastore-34 from vm config file
[<YYYY-DD-MM><time> 03208 verbose 'App'] [VpxdMoEventManager] Event 524992(524983); type [vim.event.VmDeployFailedEvent], user [DOMAIN\USERNAME], vmId [34631=Template_VM_Name], hostId [36980=esx.domain.com], computeResourceId [162=Cluster], datacenterId [21=Datacenter]
</time></time></time></time></time></time></time></time></time></time></time></time>
For more information on setting logging to trivia, see Enabling trivia logging in VMware vCenter Server 4.x and 5.x (1001584).
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.