To simplify this tutorial, we will enable the "vMotion" service on the VMkernel port "vmk0" existing by default on all your VMware ESXi hosts and used by default for managing your hosts.
Do this on all hosts of the source site (in our case: Brussels).
Check the "vMotion" box and click OK.
Then, do the same on the hosts of the remote site (in our case: Paris).
Again, check the "vMotion" box and click OK.
For this tutorial, we created a new virtual machine "Win 10 x64 v2004" which we connected (during its creation) to the default virtual network "VM Network".
Change your virtual machine settings.
For this virtual machine's network adapter, choose "Browse" from the list that appears.
Select your previously created virtual network (port group) "VMs_L2_DPortGroup" on your virtual distributed switch (vDS) "VMs_L2_DSwitch" and click OK.
Once your virtual network is selected, click OK.
As you can see, at the moment our virtual machine is started:
So that you can see that the network access and Internet access of this virtual machine will never be lost, we have launched an infinite "ping" to a server present on the Internet using the "-t" parameter.
Batch
ping -t 8.8.8.8
Now that the "ping" command is launched in the virtual machine, go to: Actions -> Migrate.
Select "Change both compute resource and storage" to migrate this VM's execution and its files.
Select a VMware ESXi host located on the remote site (in our case, the "paris-esxi1" host from Paris).
Select the datastore where you want to store this VM on the remote host.
Select the data center and/or remote site folder where you want to move this virtual machine.
Select the destination network (which in this case will be the same as the source network).
Namely: VMs_L2_DPortGroup.
Note that no warning appears. Unlike using standard virtual switches (vSS) where a warning appeared here regarding networks that could be different on the source and destination host.
The priority for vMotion does not matter, so select the option you want.
Click "Finish" to start migrating your virtual machine.
The migration of our virtual machine currently located in Brussels begins.
In the virtual machine, the "ping" continues to work.
The VM migration continues and the "Initiate vMotion receive operation" task is reaching around 50%.
About halfway through the "Initiate vMotion receive operation" task, a small latency may appear briefly.
However, your virtual machine continues to access the network and the Internet normally.
Once the virtual machine migration is complete, you will see that the virtual machine still has the same IP address (in our case: 10.0.0.10).
Although this virtual machine is now in Paris (on our host "paris-esxi1") and is connected to the virtual network "VMs_L2_DPortGroup" (but from the vDS switch of the Paris site).
Despite the migration of this virtual machine from Brussels to Paris, you can see that it never lost access to the network or the Internet.
Note: to view statistics and stop this "ping" command, press the "CTRL + C" keys.
VMware 11/2/2022
VMware 7/15/2022
VMware 3/5/2025
VMware 6/26/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.
No comment