RHEL VM fails with 'createTemporaryDirectory' File was not found in the Recovery Plan test failover.
search cancel

RHEL VM fails with 'createTemporaryDirectory' File was not found in the Recovery Plan test failover.

book

Article ID: 375727

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

Symptoms:

The ESXi Host hostd.log reports 'directoryPath=/temp failed' and Site Recovery Manager or Live Site Recovery vmware-dr.logs reports ' createTemporaryDirectory' File was not found:


hostd.log:
yyyy-mm-ddThh:mm:ss.msZ In(166) Hostd[2099343]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/datastore_uuid/vm_name/vm_name.vmx] [N8Guestsvc30CreateTemporaryFileRequestImplE:0x000000563fa51bf0] opCode=8 auth=<hidden> prefix=srm- suffix= directoryPath=/temp failed

 
vmware-dr.log:
--> msg = "Received SOAP response fault from [<SSL(<io_obj p:0x00007f57bc07f770, h:34, <TCP 'x.x.x.x : 34326'>, <TCP 'x.x.x.x : 443'>>), /sdk>]: createTemporaryDirectory
--> File was not found"

Environment

In the ESXi host hostd.log where the VM resides, search for "directoryPath=/temp failed" with command:

cat /var/run/log/hostd.log |grep "directoryPath=/temp failed"
 
example output:
yyyy-mm-ddThh:mm:ss.msZ In(166) Hostd[2099343]: [Originator@6876 sub=Vimsvc.ha-eventmgr] Event 8815 : Guest operation Create Temporary Directory performed on Virtual machine rhel.
yyyy-mm-ddThh:mm:ss.msZ In(166) Hostd[2099343]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/datastore_uuid/vm_name/vm_name.vmx] [N8Guestsvc30CreateTemporaryFileRequestImplE:0x000000563fa51bf0] opCode=8 auth=<hidden> prefix=srm- suffix= directoryPath=/temp failed

In the site recovery manager logs with command:

cat /var/log/vmware/srm/vmware-dr.log |grep createTemporaryDirectory -B4 -A1
 
example output:
yyyy-mm-ddThh:mm:ss.msZ error vmware-dr[01109] [SRM@6876 sub=Recovery ctxID=768e643d opID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-test:xxx] Plan execution (test workflow) failed; plan id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, plan name: VM_name RP, error: (vim.fault.FileNotFound) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> file = ""
--> msg = "Received SOAP response fault from [<SSL(<io_obj p:0x00007f57bc07f770, h:34, <TCP 'x.x.x.x : 34326'>, <TCP 'x.x.x.x : 443'>>), /sdk>]: createTemporaryDirectory
--> File was not found"

Cause

SRM uses the default /tmp on the ESXi Host, with full permissions:

drwxrwxrwt 1 root root 512 Aug 27 22:01 tmp

If you see in hostd.log. Thi is due to a custom configuration on the ESXi Host and SRM.

CreateTemporaryFileRequest and directoryPath=/temp failed

Resolution

 

  1. Create the /temp Directory
    The /temp directory is missing on the Protected Site ESXi Host and the DR Site ESXi Host. To resolve this, create the /temp directory with full permissions (chmod 777).
  2. Verify ESXi Host Default /tmp Directory
    SRM uses the default /tmp directory on the ESXi Host, which should have the following permissions:

 

            drwxrwxrwt 1 root root 512 Aug 27 22:01 /tmp

     3.Create the /temp Directory on Both Sites
           Run the following commands:

           mkdir /temp 

          chmod -R 777 /temp

   4  After confirming the directory /temp is at both sites is removed. Configure in Site Recovery for Advanced Settings the recovery.defaultLinuxCustomizationBaseDir           with   the directory to use for Recovery, the test recovery is a success.  

Check vSphere Client > > Site Recovery > OPEN Site Recovery > View Details > Site Pair > Advanced Settings > Recovery > EDIT > recovery.defaultLinuxCustomizationBaseDir make sure this is blank and uses /tmp on the Hosts, in this case added /temp.