Migrating Virtual Machines Using vMotion
How to Create a VMkernel Port Group for vMotion Migration
The following steps will show you how to create a VMkernel port and use it for vMotion migration.
- Go to Home > Inventory > Hosts and Clusters.
- Select your ESXi host in the inventory and click the Configuration tab.
- Click the Networking link.
- Click the Virtual Switch button.
- Click Add Networking.
- Do the following when the Add network wizard appears:
- Click VMkernel. (Connection Type)
- Select the vmnic for the vMotion network. (Network Access)
- Type vMotion. Select the Use this port group for vMotion check box. (Network Label)
- Enter the vMotion IP address. (IP Address)
- Enter the vMotion subnet mask. (Subnet mask)
- Confirm the settings and click Finish. (Summary)
- Verify the configuration information for the new virtual switch in the Networking panel.
How to Verify that your ESXi Host Meets vMotion Requirements
The following steps will show you how to verify that your ESXi host meets vMotion requirements.
- Go to Home > Inventory > Hosts and Clusters.
- Select each ESXi host and its Summary tab.
- View the Processor Type information to verify that the CPUs are compatible.
- Click your ESXi host’s Configurations tab.
- Verify that a vMotion port group exists and that it is configured with a speed and duplex of 1000Mb, Full duplex:
- Click the Networking link.
- Click the Virtual Switch button. A vMotion port group should exist and it should be a VMkernel port.
- Click the Properties link next to the vMotion virtual switch.
- Click the Network Adapters tab. In the pane to the right, the configured speed and duplex should be 1000Mb, Full Duplex.
- Click Close to close the vSwitch Properties dialog box.
- Verify that both ESXi hosts have access to the same shared datastore:
- Select the lab Servers folder and click the Maps tab.
- In the Map Relationships panel, select Custom Map from the drop-down menu.
- Under Host Options, select the Host to Datastore check box. Deselect the Host to VM check box.
- Under VM Options, deselect every check box.
- Click Apply Relationships. Both ESXi hosts should have access to the same shared datastore for virtual machines.
- Verify that both ESXi hosts have access to the same networks:
- Under Host Options, deselect the Host to Datastore check box and select the Host to network check box.
- Under VM Options, deselect every check box.
- Click Apply Relationships. Both ESXi hosts should access to the same networks.
How to Verify that Your Virtual Machine Meets vMotion Requirements
The following steps will show you how to verify that the virtual machine’s settings meet the vMotion requirements.
- Go to Home > Inventory > VMs and Templates.
- In your folder, right-click your desired virtual machine and select Edit Settings.
- Verify that the virtual machine’s floppy drive is not connected to a local device and does not have an image in a local datastore defined:
- In the Hardware list, verify that the Summary column for Floppy Drive 1 shows Client Device.
- If the Summary column does not show Client Device, select Floppy Drive 1 in the list and click Client Device.
- Verify that the virtual machine’s CD/DVD Drive 1 is not connected to a local device and does not have an image in a local datastore defines:
- In the Hardware list, verify that the Summary column for CD/DVD Drive 1 shows Client Device.
- If the Summary column does not show Client Device, select CD/DVD Drive 1 in the list and click Client Device to remove existing connections.
- In the Hardware list, find Network Adapter 1. Verify that the virtual machine is either disconnected from the network or connected to a network accessible by the destination ESXi host.
- Check the Hardware list for hard disks that are of type Mapped Raw LUN (and that are not accessible by the destination host):
- If you have such a disk, select the mapped raw LUN and click Remove.
- In the Removal Options panel, leave the default Remove from virtual machine.
- Verify that CPU affinity is not set:
- Click the Resources tab and select Advanced CPU.
- If the Scheduling Affinity field displays a number delete the number.
- Click OK to apply all virtual machine changes.
How to Perform a vMotion Migration of a Virtual Machine
The following steps will show you how to migrate a virtual machine while it is powered on.
- Go to Home > Inventory > Hosts and Clusters.
- Expand the inventory view so that you can see all of your virtual machines.
- Migrate each of your virtual machines to your
- In the inventory, separately right-click each of the virtual machines that you own and select Migrate.
- Do the following when the Migrate Virtual Machine wizard appears:
- Select Change Host. (Select Migration Type)
- Expand the inventory view and select the ESXi host. The migration requirements will be validated. If the validation does not succeed, you will receive warning or error messages and will be unable to continue with the migration until the errors are resolved. (Select Destination)
TIP: One reason that the validation might not succeed is if the virtual machine’s disk is not on the shared datastore. If this is the case, use Storage vMotion to migrate the disk to the shared datastore first and then retry the vMotion migration. - Select the ESXi host name. (Select Resource Pool)
- Select High priority (Recommended). (vMotion Priority)
- Click Finish. (Ready to Complete)
- In the Recent Tasks pane, monitor the progress of the virtual machine migration.
- Verify that your virtual machines appear under your team’s ESXi host in the inventory.
How to Migrate All Virtual Machines to One ESXi Host
The following steps will show you how migrate all virtual machines to one ESXi host.
- Migrate all of your running virtual machines to the lower-numbered ESXi host:
- Right-click each of your virtual machines, one at a time, and select Migrate.
- Do the following when the Migrate Virtual Machine wizard appears:
- Click Change host. (Select Migration Type)
- Expand the inventory view and select the lower-numbered ESXi host. The migration requirements will be validated. If the validation does not succeed, you will receive warning or error messages and will be unable to continue with the migration until the errors are resolved. (Select Destination)
- Select the ESXi host name. (Select Resource pool)
- Keep the default. (vMotion Priority)
- Click Finish. (Ready to Complete)
- Right-click <name>##1 in the inventory and select power > Shut Down Guest.
- Right-click <name>##2-RDM in the inventory and select Power > Shut Down Guest.
- After <name>##2RDM shuts down, right-click it in the inventory and select Remove from Inventory.
- Click Yes to confirm removal.
