SRM Manual IP customization fails on RHEL VM when recovery is initiated
search cancel

SRM Manual IP customization fails on RHEL VM when recovery is initiated

book

Article ID: 370658

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

SRM Manual IP customization failing on RHEL VM when test recovery is initiated.

Logs shows below specific error in vmware-dr.log :

--> 2024-06-21T08:18:17 DEBUG: opening file for writing (/etc/resolv.conf).
--> 2024-06-21T08:18:17 ERROR: Fatal error occurred during customization !! Customization halted.
--> 2024-06-21T08:18:17 ERROR: Error : Operation not permitted:Error writing data to file (/etc/resolv.conf). Operation not permitted at /var/run/.vmware-imgcust-dHMDg9K/scripts/Utils.pm line 656.
-->
--> 2024-06-21T08:18:17 INFO: Return code is 252.

Environment

VMware Site Recovery Manager 8.x

VMware Site Recovery Manager 9.x

Cause

/etc/resolv.conf file in VM's guest OS RHEL 8 having immutable flag attribute set which is not allowing the IP customization.

Example: 
# lsattr /etc/resolv.conf
----i----------- /etc/resolv.conf

In Linux, the "immutable" flag refers to a file attribute that can be set using the "chattr" command. When the immutable flag is set on a file, it prevents the file from being modified in any way: it cannot be deleted, renamed, linked to, or written to, even by the root user (superuser).

Resolution

  • Validate the file "/etc/resolv.conf" inside RHEL Guest OS having immutable flag set or not using below command.
    # lsattr /etc/resolv.conf

If the flag is set, resolv.conf file will show "i" in the attribute as given below:

    # lsattr /etc/resolv.conf
----i----------- /etc/resolv.conf
  • Turn off the immutable flag by running below command.
    # sudo chattr -i /etc/resolv.conf

Once we turn-off the immutable flag, the attribute will show as below.

    # lsattr /etc/resolv.conf
---------------- /etc/resolv.conf

  • Post turning off the immutable flag, run the recovery of VM again using SRM manual IP customization.