Deploying a template or clone using customization fails at 93% with the error: Clone virtual machine Templatexxxx : Cannot connect to host
search cancel

Deploying a template or clone using customization fails at 93% with the error: Clone virtual machine Templatexxxx : Cannot connect to host

book

Article ID: 343181

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

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>


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

Cause

This issue occurs when you try to deploy from a template or clone from a template and use the customization wizard or any custom scripts, it can fail if the Windows temp folder is:
  • Being re-directed.
  • Holding a lock on temp files.

Resolution

To resolve this issue:

  1. Ensure that the C:/Windows/TEMP folder is not re-directed to another folder. If it is re-directed, point it back to C:/Windows/TEMP.
  2. Delete any files in the temp folder and reboot the vCenter Server machine to release any locks on temp files.


Additional Information