vMotion fails with the error: Destination Host Not on Same Networks as Virtual Machine You Are Trying to Migrate
search cancel

vMotion fails with the error: Destination Host Not on Same Networks as Virtual Machine You Are Trying to Migrate

book

Article ID: 343852

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

I'm attempting to use VMotion to migrate a virtual machine from one ESX Server system to another. In VirtualCenter, the Networks section is blank for the source server on the host summary page. Why do I receive the following error message?
Error: The destination host is not on the same set of networks as the virtual machine you are trying to migrate. Please make sure that all of the NICs on the destination host are connected to the same networks as the virtual machine.


Environment

VMware ESX Server 2.5.x
VMware ESX Server 2.0.x
VMware VirtualCenter 1.2.x
VMware ESX Server 2.1.x
VMware VirtualCenter 1.1.x
VMware VirtualCenter 1.0.x

Resolution

VirtualCenter checks the names of the virtual switches that the virtual machine to be migrated is using. It expects to find identically named virtual switches on the destination ESX Server system. For example, if you have a virtual machine connected to a virtual switch called Network1, then a virtual switch called Network1 must exist on the destination ESX Server system.

Note: Although it verifies matching virtual switch names, VirtualCenter does not verify that the virtual switches are connected to the same physical network. Confirm the following:

  • The name of each virtual switch (network connection) used by the virtual machine you intend to migrate matches the name of an existing virtual switch on the target ESX Server system and both virtual switches access the same network.

  • The service consoles for both ESX Server systems access the same network.

  • The network adapters that are used to migrate the virtual machine access the same network.
In addition, verify that your environment meets the general VMotion requirements in the VirtualCenter 1.x documentation. To satisfy the items above, follow these steps to verify and set the virtual network adapter configuration.
  1. In the Management Interface of the source ESX Server system, click the name of the virtual machine you plan to migrate. A new window opens.

  2. Click hardware.

  3. In the Network Adapter section, Click Edit.

  4. Look at the available Network Connection entries.

    If you find a Network Connection entry that satisfies the following two conditions, choose it and try migrating the running virtual machine again. Skip to the migration step, below. Prerequisites to choosing a Network Connection entry for migrating a running virtual machine include the following:

    • The Network Connection entry name must exactly match the name of the virtual switch that this virtual machine will use on the target ESX Server system.

    • The Network Connection entry must use the same physical network as the virtual switch on the target ESX Server system.

  5. If a qualifying entry is not listed in the Network Connection dropdown menu, add a new entry by creating a new virtual switch as follows:

    1. In the Management Interface of the source ESX Server system, click the Options tab.

    2. Click Network Connections.

    3. In the Overview section, click Add.

    4. Enter the desired network connection name in the Network Label box.

    5. Click Create Switch. By default, it is not connected to any outbound (physical) adapters, but you can connect it to any available outbound adapter.

  6. If the new virtual switch satisfies both prerequisites above for using an entry in the Network Connection dropdown menu, choose it and retry the migration. Skip to the migration step, below.

  7. If you cannot connect the new virtual switch to the network currently used by the virtual machine, you can either:

    • Connect the virtual machine to the new virtual switch anyway, which disconnects it from the network. Then skip to the migration step, below. After migration, the network connection should be restored.

    • Or, follow the steps below to prepare the virtual machine for migration without disrupting its network connection.

  8. To prepare the virtual machine for migration without connecting it to the new virtual switch (which would disconnect the virtual machine from the network):

    1. Connect to the source ESX Server system's service console.

    2. Find the virtual machine configuration files on the ESX Server host system. Their paths are listed in /etc/vmware/vm-list.

    3. Using a text editor, carefully edit one of the virtual machine configuration files--one that is for a currently running virtual machine--as a test subject.

    4. Find a line that looks something like:

      Ethernet0.networkName = "Adapter0 Network"

    5. Change it to look like this:

      Ethernet0.networkName = "MyNetwork"

    6. Save the file.

    7. Notes:
      • Replace the part in the quotation marks, MyNetwork, with the name of the network connection (virtual switch) you created above.

      • Ethernet0.networkName (or Ethernet1.networkName, etc.) is not case-sensitive.

      • If the line does not exist in the file at all, add it.

      • You can confirm that you have chosen a valid network name by viewing /etc/vmware/netmap.conf on the destination ESX Server system and looking for the name of the network connection you created on the source ESX Server system.

      • The running virtual machine continues to use the network to which it was connected when it started. If you reboot the virtual machine, however, the newly created network connection is used.

    8. If the virtual machine must not be powered off, you need to temporarily bypass VirtualCenter's check for network connectivity while it performs a hot migration:

      1. Edit config.ini in the VMware VirtualCenter folder on the system that is running the VirtualCenter management service. By default, the path to this folder is:

        Windows Server 2000, 2003 and Windows XP:

        C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter

        Windows Server 2008, 2012, Windows Vista, 7 and 8:

        C:\ProgramData\VMware\VMware VirtualCenter


        Note: If the config.ini file does not exist, create it.

      2. Add the following line to config.ini to disable the check that prevents the virtual machine from migrating.

        migrate.check.nicCompat="FALSE"

      3. Restart the VirtualCenter service for the change to take effect.

  9. Perform a migration of the virtual machine in VirtualCenter. If you reconfigured the virtual machine to use a different network connection, you might observe that it hasn't changed in VirtualCenter. Depending on your version of VirtualCenter, the updated network connection name might not be shown after migration. You can use the management interface on the destination ESX Server system to check the network connection setting. You should also ping or otherwise confirm network connectivity to the migrated virtual machine.

  10. If you disabled the VirtualCenter network check above, re-enable this important integrity check.

    1. Edit the VirtualCenter config.ini file.

    2. Change the value to "TRUE". For example:

      migrate.check.nicCompat="TRUE"

    3. Restart the VirtualCenter service.

  11. If you created a virtual switch as described above, but the virtual switch is not connected to the desired network, you might want to delete the virtual switch after the migration is complete.