First Published On: 03-18-2015 Last Updated On: 11-04-2015 1
Table of Contents 1. vmotion 1.1.Cross vswitch vmotion 1.2.Cross vcenter vmotion 1.3.Long Distance vmotion 2
1. vmotion Use vmotion to enable the live migration of running virtual machines from one physical server to another with zero downtime, continuous service availability, and complete transaction integrity. 3
1.1 Cross vswitch vmotion This walkthrough is designed to provide a step-by-step overview on how to cross a virtual switch (vswitch) using vmotion. Use the arrow keys to navigate through the screens. In this scenario, we will migrate VMs from our old cluster to new cluster. Note that old clusters are using standard switches and new clusters are using distributed switches. Click on [Hosts and Clusters]. 4
In this example, vcenter has two clusters; cluster 1 uses standard switches and cluster 2 uses distributed switches. Click on one of the hosts in cluster 1 to view a configured standard switch. Click on [vswitch0]. Here, we can see a port group assigned to the host in cluster 1 called VLAN0204 (vss). Click on [Linux VM] to view its network configuration. 5
Click on [Edit Settings]. Linux VM is configured to use the port group that is assigned on a standard switch. Click on [Cancel]. 6
Select one of the hosts in Cluster 2 and notice that the standard switch is not available. Click on [Home]. Now we migrate the VM from the old cluster to a new cluster without impacting services running on the VM. We can now change the virtual switch and assign a port group during vmotion. These clusters share a VMFS datastore. To begin with the cross vswitch vmotion, click on [Hosts and Clusters]. 7
Select the VM you want to migrate with a right-click and click [Migrate]. Select [Change VM compute resource only] and click on [Next]. 8
Select a destination host to run the VM. Click on [Next]. Select the destination network for the virtual machine migration. In this example, we select [VLAN0204]. With this step, the standard switch changes to distributed switch. Click on [Next]. 9
Select [Schedule vmotion with high priority] and click on [Next]. Verify the information and click on [Finish] to start the migration. 10
vmotion process is in progress. Click on [Refresh]. Notice that the vmotion process is complete. The virtual machines will get connected to the port group that is assigned to the distributed switch. Select [Linux VM] and click on [Edit Settings]. 11
Here, we can see the properties of the virtual machine, Linux VM. The VM is connected to port group configured on the distributed switch. Click on [Cancel]. Note that Layer 2 connectivity needs to exist on the port groups between the standard switch and the distributed switch. No change will be made within the Guest OS including change in the IP address. This concludes the walkthrough of CrossvSwitch vmotion. Select the next walkthrough using the navigation panel. 12
1.2 Cross vcenter vmotion This walkthrough is designed to provide a step-by-step overview on how to migrate virtual machines from one vcenter instance to another vcenter instance using vmotion. In this demo environment, due to scalability limits, we have two vcenter instances. With Cross-vCenter vmotion, moving virtual machines from one instance to another instance. 13
Here, we have two vcenter instances with two clusters each. We have separate distributed virtual switches on each vcenter instance. To migrate a virtual machine from one vcenter instance to another, right click on the virtual machine and click on [Migrate]. Select [Change VM compute resource only] and click on [Next]. 14
Select the destination host to run the VM and click on [Next]. Select the destination virtual machine folder and click on [Next]. 15
Next, select the network to be used for migration. This will attach the virtual machine to the port group on the distributed switch on the destination vcenter server. In this example, we select [VLAN0204] and click on [Next]. Select [Schedule vmotion with high priority] and click on [Next]. 16
Verify the information and click on [Finish] to start the migration. vmotion process is in progress. Click on [Refresh] to get an updated view. 17
The virtual machine is now attached to the port group on the distributed switch on the second vcenter server. Click on the [Globe] icon to look at the properties of the distributed switch on the second vcenter server. It is confirmed that the VM is now connected to the assigned port group on this distributed switch. Click on [Related Objects]. 18
Note that Layer 2 connectivity needs to exist on the port groups between the vcenter instances. No change will be made within the Guest OS including change in the IP address. This concludes the walkthrough of Cross-vCenter vmotion. Select the next walkthrough using the navigation panel. 1.3 Long Distance vmotion 19
This walkthrough is designed to provide a step-by-step overview on how to vmotion across vcenter instances that span geographical distances. Use the arrow keys to navigate through the screens. For this demo, we have setup two datacenters. One in Palo Alto, CA, and one in Austin, TX. We will decommission the Palo Alto datacenter and move all of its services to Austin. We begin by clicking on [Hosts and Clusters]. 20
We have two vcenter instances with two clusters each. We will migrate the VMs to Austin without impacting the services running in Palo Alto's VMs. Let us check the latency between the sites to ensure it is within the supported threshold. From the source site, ping a vsphere host on the destination site. The maximum supported RTT is 150 milliseconds. Notice that it falls under the acceptable threshold. We then ping the Linux VM in Palo Alto. Notice that the latency is very low. To perform a long distance vmotion, right click on Linux VM and click on [Migrate]. 21
Select [Change both compute resource and storage] and the default compute resource option under it. Click on [Next]. Select the destination host to run the VM and click on [Next]. 22
Select the destination storage for the VM and click on [Next]. Select the destination folder for the virtual machine and click on [Next]. Select the destination network for the virtual machine migration. In this example, we select [VLAN0204]. Notice the ability to switch to a distributed switch from a standard switch. Click on [Next]. 23
Select [Schedule vmotion with high priority] and click on [Next]. Verify the information and click on [Finish] to start the migration. 24
vmotion process is in progress. Click on [Refresh]. Notice that the vmotion process is complete. The virtual machine will get connected to the port group that is assigned to the distributed switch on the second vcenter server. The virtual disk has also been moved. Select [Linux VM] and click on [Edit Settings] to view its properties. 25
VM is now connected with the port group configured on the distributed switch on the second vcenter server. The virtual disk location has also changed. We will ping the same Linux VM and notice that the latency is high. This concludes the walkthrough of Long Distance vmotion. 26