VMware Cloud Community
guest52
Contributor
Contributor

Unable to prepare migration. Network address %ESXi% is not valid for migration.

Hello!

I created a new infrastructure:

2 hosts at the moment (ESXi 6.5.0-5146846), e.g. ESXi_1 and ESXi_2;

1 VCSA with external PSC;

AllFlash vSAN 6.6, multicast mode;

NFS-storage for infrastructure VMs;

dvSwitch prepaired for vSAN stretched cluster.

vmk configurations:

vmk0 is in management VLAN, MTU 1500, only management is enabled;

vmk1 is in vSAN VLAN, MTU 9000, only vSAN is enabled;

vmk2 is in vMotion VLAN (169.254.2.0/24), MTU 1500, only vMotion is enabled.

These hosts are in the same networks as the parallel infrastructure which works normally. vdSwitch configuration was imported from parallel infrastructure (because it is the tech.refresh of "old" parallel infrastructure)

Pings pass between this hosts including "vmkping -I vmk2" command.

If I try to migrate a running VM between hosts (compute resources changing only), an error "Unable to prepare migration. Network address ESXi_2 is not valid for migration." occurs.

The error occurs both when I try to migrate a VM to host ESXi_2, or when I try to migrate from ESXi_2. If I try to migrate a powered-off VM between hosts (compute resources changing only), an error doesn't occurs, vMotion passed.

Any considerations?

0 Kudos
2 Replies
vijayrana968
Virtuoso
Virtuoso

1. Check if ESXI_2 hostname and IP address resolving successfully.

2. Check the Vmotion port settings are configured correctly on ESXI_2 as per below recommendation.

-- Ensure that virtual machines have access to the same subnets on source and destination hosts.

-- If you are using standard switches for networking, ensure that the network labels used for virtual machine port groups are consistent across hosts.

-- During a migration with vMotion, vCenter Server assigns virtual machines to port groups. Configure hosts for vMotion with shared storage to ensure that virtual machines are accessible to both source and target hosts.

-- If you use vMotion to migrate virtual machines with raw device mapping (RDM) files, ensure that the LUN IDs for RDMs are consistent across all participating hosts.

0 Kudos
VMassociate
Contributor
Contributor

I have seen such issues where vmkping works fine from source to destination vMotion vmkernel port IP but still vMotion fails with error = "message = "Network address 'hostname.com' is not valid for migration."

To resolve this issue, first validate in hostd.log file of source ESXi host and see the following entries -

VMotionPrepare: srcMgmtIp=

VMotionPrepare: dstMgmtIp=

If any of the field contains hostname instead of IP address then follow the below steps -

  • Login to the ESXi host via ssh
  • Run the following commands in order
    – cd /etc/vmware/vpxa/
    – cp vpxa.cfg vpxa_backup.cfg
    – vi vpxa.cfg
  • Locate the <hostIp> YOURHOSTNAME</hostIp> line and modify the hostname to IP address of the host.
  • Type Esc followed by :wq!
  • Restart the VPXA service , try restarting the host if possible.

Good luck !!