
Migrating VMs with vSphere vMotion
Learner Objectives
After completing this lesson, you should be able to meet the following objectives:
- Recognize the types of VM migrations that you can perform within a vCenter Server instance and across vCenter Server instances
- Explain how vSphere vMotion works
- Verify vSphere vMotion requirements
- Migrate virtual machines using vSphere vMotion
About VM Migration
Migration means moving a VM from one host, datastore, or vCenter Server instance to another host, datastore, or vCenter Server instance. Depending on the power state of the VM that you migrate, migration can be cold or hot:
- A cold migration involves moving a powered-off or suspended VM to a new host.
- A hot migration involves moving a powered-on VM to a new host.
Depending on the VM resource type, you can perform different types of migrations.
Migration Type | Description |
Compute resource only | Move VM, but not its storage, to another host. For a hot migration, vSphere vMotion is used to move the VM. |
Storage only | Move a VM’s storage, but not its host, to a new datastore. For a hot migration, vSphere Storage vMotion is used to move the VM. |
Both compute resource and storage | Move a VM to another host and datastore. For a hot migration, vSphere vMotion and vSphere Storage vMotion are used to move the VM. |
About vSphere vMotion
A vSphere vMotion migration moves a powered-on VM from one host to another. vSphere vMotion changes the compute resource only. vSphere vMotion provides the following capabilities:
- Improvement in overall hardware use
- Continuous VM operation while accommodating scheduled hardware downtime
- vSphere DRS to balance VMs across hosts
Enabling vSphere vMotion
To enable vSphere vMotion, you must configure a VMkernel port with the vSphere vMotion service enabled on the source and destination host.
vSphere vMotion Migration Workflow
The source host (ESXi01) and the destination host (ESXi02) can access the shared datastore that holds the VM’s files.
VM Requirements for vSphere vMotion Migration
For migration with vSphere vMotion, a VM must meet these requirements:
- If it uses an RDM disk, the RDM file and the LUN to which it maps must be accessible by the destination host.
- It must not have a connection to a virtual device, such as a CD/DVD or floppy drive, with a host-local image mounted.
In vSphere 7, you can use vSphere vMotion to migrate a VM with a device attached through a remote console. Remote devices include physical devices or disk images on the client machine running the remote console.
Host Requirements for vSphere vMotion Migration (1)
Source and destination hosts must have the following characteristics:
- Accessibility to all the VM’s storage:
- 128 concurrent migrations are possible per VMFS or NFS datastore.
- If the swap file location on the destination host differs from the swap file location on the source host, the swap file is copied to the new location.
- VMkernel port with vSphere vMotion enabled
- Matching management network IP address families (IPv4 or IPv6) between the source and destination hosts
Host Requirements for vSphere vMotion Migration (2)
- At least a 1 Gigabit Ethernet (1 GigE) network:
- Each active vSphere vMotion process requires a minimum throughput of 250 Mbit/second on the vSphere vMotion network.
- Concurrent migrations are limited to four on a 1 Gbps network.
- Concurrent migrations are limited to eight on a 10 Gbps (or faster) network.
- For better performance, dedicate at least two port groups to the vSphere vMotion traffic.
- Compatible CPUs:
- The CPU feature sets of both the source host and the destination host must be compatible.
- Some features can be hidden by using Enhanced vMotion Compatibility or compatibility masks.
Checking vSphere vMotion Errors
When you select the host and cluster, a validation check is performed to verify that most vSphere vMotion requirements are met.
Encrypted vSphere vMotion
When migrating encrypted VMs, you always use encrypted vSphere vMotion.
For VMs that are not encrypted, select one of the following encrypted vSphere vMotion menu items:
- Disabled.
- Opportunistic (default): Encrypted vSphere vMotion is used if the source and destination hosts support it.
- Required: If the source or destination host does not support encrypted vSphere vMotion, the migration fails.
Cross vCenter Migrations
With vSphere vMotion, you can migrate VMs between linked vCenter Server systems. Migration of VMs across vCenter Server instances is helpful in the following cases:
- Balancing workloads across clusters and vCenter Server instances that are in the same site or in another geographical area.
- Moving VMs between environments that have different purposes, for example, from a development environment to production environment.
- Moving VMs to meet different Service Level Agreements (SLAs) for storage space, performance, and so on.
Cross vCenter Migration Requirements
Cross vCenter migrations have the following requirements:
- ESXi hosts and vCenter Server systems must be at vSphere 6.0 or later.
- vCenter Server instances must be in Enhanced Linked Mode.
- Hosts must be time-synchronized.
Network Checks for Cross vCenter Migrations
vCenter Server performs several network compatibility checks to prevent the following configuration problems:
- MAC address incompatibility on the destination host
- vSphere vMotion migration from a distributed switch to a standard switch
- vSphere vMotion migration between distributed switches of different versions
VMkernel Networking Layer and TCP/IP Stacks
The VMkernel networking layer provides connectivity to hosts and handles the standard system traffic of vSphere vMotion, IP storage, vSphere Fault Tolerance, vSAN, and others.
TCP/IP stacks at the VMkernel level:
- Default TCP/IP stack
- vSphere vMotion TCP/IP stack
- Provisioning TCP/IP stack
- Custom TCP/IP stacks
vSphere vMotion TCP/IP Stacks
Each ESXi host has a second TCP/IP stack that is dedicated to vSphere vMotion migration.
Long-Distance vSphere vMotion Migration
Long-distance vSphere vMotion migration is an extension of cross vCenter migration. vCenter Server instances are spread across large geographic distances and where the latency across sites is high. Use cases for long-distance vSphere vMotion migration:
- Permanent migrations
- Disaster avoidance
- Site Recovery Manager and disaster avoidance testing
- Multisite load balancing
- Follow-the-sun scenario support
Networking Prerequisites for Long-Distance vSphere vMotion
Long-distance vSphere vMotion migrations must connect over layer 3 connections:
- Virtual machine network:
- —L2 connection.
- —Same VM IP address is available at the destination.
- vSphere vMotion network:
- —L3 connection.
- —Secure (if you are not using vSphere 6.5 or later encrypted vSphere vMotion).
- —250 Mbps per vSphere vMotion operation.
- —Round-trip time between hosts can take up to 150 milliseconds.
Review of Learner Objectives
After completing this Migrating VMs with vSphere vMotion lesson, you should be able to meet the following objectives:
- Recognize the types of VM migrations that you can perform within a vCenter Server instance and across vCenter Server instances
- Explain how vSphere vMotion works
- Verify vSphere vMotion requirements
- Migrate virtual machines using vSphere vMotion