Managing VMware vMotion

This chapter contains the following sections:

About VMware vMotion and vCenter Storage vMotion

VMware vMotion (vMotion) technology allows users to migrate running virtual machines between compatible physical servers with zero downtime continuous service availability, and complete transaction integrity. The entire state of a VM is encapsulated by a set of files stored on shared storage, and VMware's VMFS cluster file system allows both the source and the target ESX Server to access these VM files concurrently. The active memory and precise execution state of a VM can then be rapidly transmitted over a high-speed network. Since the network is also virtualized by ESX Server, the VM retains its network identity and connections, ensuring a seamless migration process.

With VMware vCenter Storage vMotion (Storage vMotion), a VM and its disk files can be migrated from one datastore to another while the VM is running. These datastores can be on the same or separate storage arrays. The following terms are important for understanding the vMotion technology.

Host

A physical server that is part of the VMware infrastructure hardware resources pool.

Cold migration

Migration of a VM that has been powered off on the source host. The VM is powered on again on the destination host after the transfer of the VM is complete.

Hot migration

Migration of a VM that is powered on. The VM (and applications) previously running on the source host continue execution on the destination host, without being affected by changes, after the hot migration is complete.

You can enable vMotion on a VMkernel NIC using the Modify Port Properties task.

See Modifying VMkernel NIC Port Properties.

Migration Options

Based on the running state of the VM, there are small differences in the migrations options available for the user. A powered-off VM provides the full range of migration options that can occur simultaneously, whereas a powered-on VM is restricted to migrating either the resources or the data in the same job.

Table 1 Migration options
Option Description Type VM State

Change host

Move the VM to another ESX/ESXi host.

You can also select and edit the network port group. Network port group modification is supported with VMware vCenter version 6.0 or later.

vMotion

Powered-off (Cold) or Powered-on (Hot)

Change datastore

Move the VM's configuration file and virtual disks.

Storage vMotion

Powered-off (Cold) or Powered-on (Hot)

Change both host and datastore

Move the VM to another ESX/ESXi host and move its configuration file and virtual disks.

This option supports cross datacenter migration and lets you migrate the VM to a host with a different subnet.

Combined vMotion and Storage vMotion

Powered-off (Cold) or Powered-on (Hot)

Powered-on migration is supported with VMware vSphere version 6.0 or later.

Migration Using the Migrate VM Wizard

You can migrate a VM to a new host node and datastore. You can also modify the source VM network while changing the host node. Follow the steps to execute vMotion or Storage vMotion migration.


Note


VM migration is only supported within the same vCenter.


Procedure
    Step 1   Choose Virtual > Compute.
    Step 2   On the Compute page, choose the cloud.
    Step 3   On the Compute page, click VMs.
    Step 4   Click the row with the VM you want to migrate.
    Step 5   From the More Actions drop-down list, choose Migrate VM.
    Step 6   On the Migrate VM screen, choose the type of migration.
    • Change host
    • Change datastore
    • Change host and datastore
    Step 7   Expand Host Node or Datastore and check the host node or datastore to which you want to migrate the VM.
    Step 8   If you are changing the host node, check Modify Networks to modify the source VM network.
    Step 9   Expand VM Network Mappings, click the row with the network adapter that you want to modify, and click the edit icon.
    Step 10   On the Edit VM Network Mappings Entry, choose the new port group from the Target Port Group Name drop-down list.
    Step 11   Click Submit.

    Migration using the Migrate VM Workflow Task

    You can add the Migrate VM task from the Cisco UCS Director task library to a workflow for migration.


    Note


    The Migration VM task supports VM migration for all three options discussed in Migration Options.


    Procedure
      Step 1   Choose Orchestration.
      Step 2   On the Orchestration page, click Workflows.
      Step 3   Click the row with the workflow.
      Step 4   From the More Actions drop-down list, choose Workflow Designer.
      Step 5   Under Available Tasks, navigate to the Virtualization Taks/VMware Tasks/VMware VM Tasks folder.
      Step 6   Drag and drop the Migrate VM folder into the Workflow Designer screen.
      Step 7   On the Add Task (Migrate VM) screen, complete the fields for the workflow task basic information.
      Step 8   On the User Input Mapping screen, choose which of the attributes you would like to use values from the workflow input fields.
      Step 9   On the Task Inputs screen, choose the values for the task inputs that are not mapped to workflow inputs.
      Step 10   On the User Output Mappings screen, check the Map to User Output check boxes for the task output attributes that you want to use for the workflow outputs.
      Step 11   Click Submit.