To help identify the reason for customization failure and remediate.
Symptoms:
You may see error "Cannot complete customization, possibly due to a script runtime error or invalid script parameters (Error code :255). IP settings may have been partially applied."
SRM logs /Logs/vmware-dr.log shows error as below
-> 2023-10-15T09:04:08 DEBUG: opening file for writing (/etc/resolv.conf). --> 2023-10-15T09:04:08 DEBUG: Permission denied writing data to file /etc/resolv.conf. --> 2023-10-15T09:04:08 INFO: File Attributes: /etc/resolv.conf --> 2023-10-15T09:04:08 DEBUG: Command: 'lsattr /etc/resolv.conf' --> 2023-10-15T09:04:08 DEBUG: Exit Code: 0 --> 2023-10-15T09:04:08 DEBUG: Result: ----i----------- /etc/resolv.conf --> --> 2023-10-15T09:04:08 INFO: File stat: /etc/resolv.conf --> 2023-10-15T09:04:08 DEBUG: Command: 'stat /etc/resolv.conf' --> 2023-10-15T09:04:08 DEBUG: Exit Code: 0 --> 2023-10-15T09:04:08 DEBUG: Result: File: ‘/etc/resolv.conf’ --> Size: 98 Blocks: 8 IO Block: 4096 regular file --> Device: fd00h/64768d Inode: 376565 Links: 1 --> Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
......
--> : [error] Deploy error: 'Deployment failed.The forked off process returned error code.'.
--> : [info] Deploying package status : 2
-->
--> : [info] ------------------------------------------------
--> Exit code: 255
--> ",
--> returnValue = 255
--> }
--> msg = "Cannot complete customization, possibly due to a scripting runtime error or invalid script parameters (Error code: 255). IP settings may have been partially applied."
--> },
--> (dr.recovery.fault.IPCustomizationFailure) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> result = (dr.recovery.CalloutResult) {
--> commandLine = "echo "Starting IP customization on Linux ..." >> "$VMware_GuestOp_OutputFile"
Failure to update the /etc/resolv.conf is due to immutable attribute set on the file. Customization script in SRM will check the attribute via 'lsattr /etc/resolv.conf' and if the result is as shown above in symptoms, it will result in permission error and customization task failure.