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.
VMware Site Recovery Manager 8.x
VMware Site Recovery Manager 9.x
/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).
# 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
# 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