SRM Manual IP Customization Failure on Ubuntu 20.04 VM During Test Recovery
search cancel

SRM Manual IP Customization Failure on Ubuntu 20.04 VM During Test Recovery

book

Article ID: 317465

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

Symptoms:

Manual IP customization fails on Ubuntu 20.04 VMs during test recovery with the following error:

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

In the vmware-dr.log, you may see failures related to the gateway4 settings:

--> ERROR:src/parse.c:1120:handle_gateway4: assertion failed (scalar(node) == cur_netdef->gateway4): ("192.xxx.xxx.67" == "192.xxx.xxx.67")
--> Bail out! ERROR:src/parse.c:1120:handle_gateway4: assertion failed (scalar(node) == cur_netdef->gateway4): ("192.xxx.xxx.67" == "192.xxx.xxx.67")
--> 2023-07-25T06:35:48 ERROR: Fatal error occurred during customization !! Customization halted.
--> 2023-07-25T06:35:48 ERROR: Error : Failed to apply netplan settings, return code: 19968 at /var/run/.vmware-imgcust-d7nimbz/scripts/UbuntuNetplanCustomization.pm line 556.
--> 2023-07-25T06:35:48 INFO: Return code is 253.

Environment

VMware Site Recovery Manager (SRM) 8.x

Cause

The customization failure occurs when applying the gateway4 setting in the Netplan YAML file. In recent Ubuntu versions, the gateway4 parameter is deprecated in favor of specifying routes.

Resolution

  • Assign IP Address Manually:

    When customization fails, you will need to manually assign an IP address to the recovered VM for network access and log collection. Use the following CLI commands in Ubuntu:

bash

# Bring the network interface up
$ ip link set <link_name> up

# Assign IP address to the interface
$ ip addr add <server-ip>/24 dev <link_name>

# Add the default route
$ ip route add default via <gateway> dev <link_name>

Example:

bash

$ ip link set ens33 up
$ ip addr add 192.xxx.xxx.50/24 dev ens33
$ ip route add default via 192.xxx.xxx.1 dev ens33

  • Modify the Netplan YAML Configuration:

    In the 00-installer-config.yaml or equivalent Netplan configuration file, replace gateway4 with a routes entry as shown below:

yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    <link_name>:
      dhcp4: no
      dhcp6: no
      addresses:
        - <server_ip>/24
      nameservers:
        search:
          - <domain>
        addresses:
          - <dns_1>
          - <dns_2>
      routes:
        - to: default
          via: 10.xx.xx.1

Note: This adjustment aligns with changes in Ubuntu's network configuration requirements, ensuring compatibility with the newer Netplan syntax.

  • Additional Information for Log Collection:

    In some Linux distributions (e.g., Ubuntu 18.04), VGAuthService in open-vm-tools may log to syslog. Verify your system's logging configuration if further troubleshooting is needed.

  • Restart Networking:

    After making changes to the YAML file, apply the configuration with the following command:
    $ sudo netplan apply

Additional Information

Impact/Risks:

Manual IP customization fails using SRM on the recovered Ubuntu VM, necessitating manual intervention for network configuration.