Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

IP Customization fails during a failover or test failover of a recovery plan in vCenter Site Recovery Manager (2021083)

Symptoms

During a failover or test failover of a recovery plan in vCenter Site Recovery Manager (SRM), you experience these symptoms:
  • IP Customization fails for some or all virtual machines.
  • In the History tab under Recovery Plans, you see a message similar to:

    Error - Cannot complete customization, possibly due to a scripting runtime error or invalid script parameters (Error code: -1). IP settings may have been partially applied.

  • In the vmware-dr.log log file on the SRM server, you see:

    [00632 error 'Recovery' ctxID=27dcf3a7] [recovery-plan-3198.ipCust-protected-vm-3133-IPCustomization] Guest command on VM: [vim.VirtualMachine:vm-232] failed with exit code: 1
    [02956 trivia 'Recovery' ctxID=27dcf3a7]<msg>Cannot complete customization, possibly due to a scripting runtime error or invalid script parameters (Error code: 1). IP settings may have been partially applied.</msg>


  • The virtual machine is powered off and the network interface is set to disconnected.
  • The recovery plan or test recovery plan completes with errors.
Note: This issue occurs with both Windows and Linux virtual machines.

Cause

Windows

This issue occurs in Windows virtual machines if the default system variable for the %TEMP% or temporary folder within the guest operating system on the SRM server is changed from the default value and the new folder does not exist.

Note: The default folder specified in %TEMP% in Microsoft Windows is C:\windows\temp.

When you change the default value of %TEMP%, the guest operating system does not check if the folder exists. For example, if you change the default value of %TEMP% from C:\windows\temp to C:\temp, you do not see an an error if C:\temp does not exist.

During Windows guest customization, SRM needs to write to the folder specified in %TEMP%. If this folder does not exist, guest customization fails.

Linux

This issue occurs in Linux virtual machines when the /tmp directory is mounted with the noexec option for security reasons.

During Linux guest customization, SRM needs to execute a file stored in /tmp. If this file cannot be executed, guest customization fails.

Resolution

Windows

To resolve the issue in a Windows virtual machine:

Ensure that the new directory for %TEMP% exists and can be written to.

Note: The %TEMP% variable is case sensitive. If it is set to C:\Windows\TEMP, but the real path is C:\Windows\Temp, guest customization will fail.

Linux

To resolve the issue in a Linux virtual machine:

Allow files in the /tmp directory to be executed by removing the noexec option.

To work around this issue without changing the security options on the /tmp directory:

  1. In the Linux guest, open the VMware Tools configuration file (/etc/init.d/vmware-tools) using a text editor.
  2. Add this line:

    export TMPDIR=/new/desired/path

    For example:

    main()
    {
    export TMPDIR=/var/vmtmp


    In this example, a new tmp directory called vmtmp was created. SRM will use this temp directory when applying guest customization.

  3. Restart the VMware Tools service using this command:

    # /etc/init.d/vmware-tools restart

    This forces a reload of the VMware Tools configuration file.
Note: Any modification of the /etc/init.d/vmware-tools file will be reset to the default if VMware Tools is upgraded.

See Also

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 0 Ratings
Actions
KB: