Recently I’ve expanded my lab environment with a second vSphere host. One of the advantages of having two vSphere hosts is that you can move machine from on vSphere host to the other. If you perform this move while the machine is powered down you don’t and need any additional configuration. However, if you want to move a running machine from one vSphere host to the other without losing connectivity to this VM, you need vMotion. First let me explain what vMotion is.
vMotion in vSphere allows a running virtual machine to move between two different vSphere hosts. During vMotion memory of the VM is sent from the running VM to the new VM (the instance on another host that will become the running VM after the vMotion). The content of memory is changing all the time. vSphere uses a system where the content is sent to the other VM and then it will check what data is changed and send that, each time smaller blocks. At the last moment it will very briefly ‘freeze’ the existing VM, transfer the last changes in the memory content and then start the new VM and remove the old one. This process will minimize the time during which the VM is suspended.
I am using the Dark mode theme in vCenter. To enable the dark mode, logon to vCenter click on your username, and click on “Switch Theme”.
The above image shows my current lab environment, as you van see there are two vShpere host and 16 virtual machines.
To configure vMotion on our vSphere host we need to navigate. Menu>Host and Clusters>Select Host>Configure Tab>Networking>VMkerrnel adapters. Click on “Add Networking”
Click “VMkernel Network Adapter”.
Click “Select an existing standard switch”. Click “Browse” and select the available switch. In this example this is “vSwitch0”.
Tick the box for “vMotion”.
Click “Use static IPv4 settings”. Enter an available address, subnet and gateway.
Check the overview page if all the information is correct, and click Finish.
Under VMkernel adapters you can now see the VMkernel Adapter for vMotion.
You are now able to move running VM’s from one vSphere host to another without losing connectivity.