Using the vSphere vMotion feature in the VMware vSphere solution, you can migrate virtual machines hot (live migration) and cold from one VMware ESXi host to another.
When you migrate virtual machines live (i.e. when they are powered on), there will be no service interruption during the migration. The migration will therefore be transparent for the user.
However, this requires some prerequisites and some practices are recommended by VMware so that this is optimized in your infrastructure.
To begin, it is necessary that the network interfaces of the source VMware ESXi host and those of the destination host are correctly configured.
This notably involves activating the vMotion service on at least one VMkernel interface (vmkX) of each of the VMware ESXi hosts affected by the virtual machine that you wish to migrate.
To migrate multiple virtual machines simultaneously, you will need to ensure that your network bandwidth is at least 250 Mbps. Note that the WAN optimization that you would potentially have implemented in your case is not taken into account for this 250 Mbit/s limit.
If you want to do long distance vMotion migration (between 2 physical sites for example), the maximum supported latency is 150 milliseconds. Additionally, this particular case requires a vSphere Enterprise Plus license.
Source : vSphere vMotion Networking Requirements.
When you want to migrate virtual machines from one VMware ESXi host to another, it is recommended to:
For the migration to be done securely, it is recommended to separate the vMotion network from the usual network.
So vMotion traffic goes through a dedicated network that is only accessible by the hosts between which you want to migrate virtual machines.
Additionally, this allows you to avoid saturating your usual network bandwidth when migrating virtual machines whose storage is also migrated from one VMware ESXi host to another. This is necessary when the virtual machine is not on storage shared by the 2 VMware ESXi hosts.
VMware also specifies that each service (management, vmotion, ...) must be separated using different virtual switches (standard or distributed) preferably.
If this is not possible, it is recommended to create port groups with different VLAN IDs to separate these networks.
Note that you can also limit the bandwidth used by vSphere vMotion using vSphere Network I/O Control to prevent excessive vMotion traffic from physically saturating your network card and perhaps also your physical switch.
Sources :
Prerequisites for vMotion can be configured from the VMware ESXi web client (VMware Host Client), as well as from the web client (VMware vSphere Client) of the VMware vCenter Server (VCSA) to which your VMware ESXi hosts are linked.
It's up to you to choose the method you prefer, knowing that in business, it is possible that direct access to a VMware ESXi host is blocked thanks to the VMware vSphere locking mode.
In short, on VMware ESXi, use the web client (VMware Host Client) and log in as "root".
Note: if you want to configure the prerequisites from the web client (VMware vSphere Client) of your VMware vCenter Server, go directly to step "4. Configure the prerequisites on VMware vCenter Server (VCSA)" of this tutorial.
To begin with, in accordance with the prerequisites described previously, it is strongly recommended to use a dedicated physical network card for vMotion.
From the web client (VMware Host Client) of your VMware ESXi host, you will find the list of physical network cards in: Networking -> Physical NICs.
In our case, we have 2 network cards on our host "esxi1":
Note that in our case, these are 10 GbE network cards as you can see by the "10000 Mbit/s" value displayed in the "Link speed" column.
If you go to the "VMkernel NICs" tab, you will see that there is a network interface "vmk0" created by default:
Click on the name "vmk0" of this VMkernel network interface.
As you can see, this VMkernel network interface "vmk0" uses the physical adapter (physical network card): vmnic0.
If you click the "Edit" button at the top of the page, you will see that only the "Management" service is enabled.
Which indicates that it is through this network interface that you can manage your VMware ESXi host.
Note: in the case of a lab (test environment), you could check the "vMotion" box for this network interface "vmk0" so that vMotion works in your case.
However, in business, you should not use this trick. Because this does not meet the vMotion prerequisites and it risks saturating the bandwidth of your usual network, as well as that of the virtual machines running on this VMware ESXi host.
To separate vSphere vMotion network traffic from regular network traffic, you must create a new virtual switch.
Then, when creating this new virtual switch, you will be able to select the additional physical network adapter that you added to separate the vMotion network from your regular network.
To do this, go to "Networking -> Virtual switches" and click: Add standard virtual switch.
In the "Add standard virtual switch" window that appears, enter "vSwitch_vMotion" as the name for this new vSwitch.
By default, VMware ESXi will automatically add currently unused physical network adapters to this new vSwitch.
Hence our physical NIC "vmnic1" automatically appears as uplink 1.
For other settings, no changes are necessary to use vMotion.
Click: Add.
The new virtual switch ("vSwitch_vMotion" in our case) has been added.
If you click on the name of this new vSwitch and go to the bottom of the page that appears, you will find a "vSwitch topology" box where you can see that only one physical adapter (physical network card) is used by this virtual switch.
But, no port group is used at the moment.
Unlike port groups that allow you to manage network traffic between multiple virtual machines, VMkernel interfaces allow you to manage network traffic between multiple VMware ESXi hosts and/or between a VMware ESXi host and the physical network.
In short, to be able to manage vMotion traffic (between 2 VMware ESXi hosts), you will need a VMkernel interface.
Although it is technically possible to route vSphere vMotion network traffic over the same VMkernel interface, it is not recommended in an enterprise setting.
This should therefore only be used in a testing environment (to learn how to use VMware solutions, for example).
In business and in accordance with the prerequisites cited at the beginning of this tutorial, you will need an additional VMkernel interface dedicated to vSphere vMotion traffic.
To create this new VMkernel interface, go to "Networking -> VMkernel NICs" and click: Add VMkernel NIC.
In the "Add VMkernel NIC" window that appears, specify:
The message "VMkernel NIC vmk1 was successfully created" appears.
As you can see, you now have 2 VMkernel interfaces:
If you click on the VMkernel interface "vmk0", you will see that:
If you click on the VMkernel interface "vmk1", you will see that:
Now that the various network components are created and configured, go back to the "Networking -> Virtual switches" section and click on your new virtual switch "vSwitch_vMotion".
As you can see at the bottom of the "vSwitch_vMotion" page that appears, this virtual switch (vSwitch) makes it possible to make the link between the "vMotion Network" port group (of which the VMkernel interface "vmk1" is part) and the physical network card (vmnic1) added at the very beginning of the tutorial to be able to separate vMotion traffic from regular network traffic.
VMware 12/2/2022
VMware 3/8/2024
VMware 11/9/2022
VMware 3/29/2024
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
You must be logged in to post a comment