AddIpMapping

This method associates an IPMapping object with an inventory-mapped protected site network. This must be called on secondary (recovery) site. The protectedNetwork should be mapped to recoveryNetwork by #InventoryMapper.addNetworkMappings() for the IPMapping to be applied to VMs connected to recoveryNetwork during IP customization. If an IPMapping had been already associated with the protectedNetwork, then it gets replaced by the new IPMapping. Up to 1 IPMapping containing multiple SubnetRule rules can be associated with any given protected site network at any time. If the destination (recovery) network is associated with a Test Network on the recovery site, then the ipMapping will be applied to the test network as well. This method requires Resource.com.vmware.vcDr.RecoveryUse privilege on destinationNetwork.

Synopsis

void addIpMapping(vim.Network protectedNetwork, vim.Network recoveryNetwork, IPMapping ipMapping)

addIpMapping has the following parameters:

Parameter Description
protectedNetwork Primary site network
recoveryNetwork Secondary site network
ipMapper IPMapping to associate with the existing Network Mapping

IPMapping defines the rule(s) used to translate VM's IP settings between protection and recovery sites. IPMapping can be associated with a protected site's vim.Network mapped to a recovery site's vim.Network with InventoryMapping.addNetworkMapping method. This allows IP settings for the recovered VMs be deduced based on the IP subnet parameters without a need to configure IP settings for each protected VM individually. It has the following fields:

Field Description
name Name of the IP mapping.
@optional SubnetRule[] rules A set of network rules to evaluate/apply during recovery. The rules are evaluated in the order they are specified. SRM applies the first matched rule.
SubnetRule describes the mapping between protection site IP parameters to recovery site ones for a single IP subnet. It has the following fields:
Field Description
name Name of the Rule.
recoverySiteSubnet CIDR specifying the recovery site subnet.
protectedSiteSubnet CIDR specifying the protected site subnet.
@optional IPSettings recoverySiteIPSettings IP settings to be applied for all matched network adapters on the recovery site when executing Test and Failover workflows.
dnsSuffixes[] DNS Suffixes to be applied to all matched network adapters.
IPSettings is the IP customization info for a specific network adapter. It has the following fields:
Field Description
ipV4Gateways List of IPv4 gateways in the order of preference.
ipV6Gateways List of IPv6 gateways in the order of preference.
dnsServerList List of server IP addresses to use for DNS lookup.

In Windows, these settings are adapter-specific. In Linux they are used to build a global list of DNS servers for all adapters. Specify these servers in order of preference. If set in case of DHCP, the explicit DNS server list overrides the default DNS configuration acquired through DHCP protocol.

WindowsIPSettings is an extension for IPSettings. It is used for setting Windows specific IP customization information for a specific network adapter.

Field Description
domainName A connection-specific DNS domain name.
wins The IP addresses of the primary and secondary WINS servers. The first element in this array is always the address of the primary WINS server and if a second element exists, it is the address of the secondary WINS server.
netBios NetBIOS setting. Possible values are the constants defined by NetBiosMode enum.

NetBiosMode is used for configuring NetBIOS on Windows systems. The values correspond directly to Microsoft constants for NetBIOS mode. It enumerates the following:

Value Description
enableNetBiosViaDhcp Enables the DHCP server to decide whether or not to use NetBIOS.
enableNetBios Explicitly enables NetBIOS.
disableNetBios Explicitly disables NetBIOS.

For information about the faults that Site Recovery Manager throws, see Faults in Site Recovery Manager API.

Faults

  • ConnectionDownFault
  • InvalidArgument
  • IpMappingFault
  • RemoteSiteNotEnabled
  • RemoteSiteNotAuthenticated
  • StringArgumentTooLong
  • UnknownPrimaryNetwork
  • UnknownSecondaryNetwork
  • RuntimeFault