You can move a virtual machine to another compute resource and move its disks or virtual machine folder to another datastore. With vMotion, you can migrate a virtual machine and its disks and files while the virtual machine is powered on.

Simultaneous migration to a new compute resource and datastore provides greater mobility for virtual machines by eliminating the vCenter Server boundary. Virtual machine disks or contents of the virtual machine folder are transferred over the vMotion network to reach the destination host and datastores.

To make disk format changes and preserve them, you must select a different datastore for the virtual machine files and disks. You cannot preserve disk format changes if you select the same datastore on which the virtual machine currently resides.

Prerequisites

Procedure

  1. Right-click the virtual machine and select Migrate.
    1. To locate a virtual machine, select a data center, folder, cluster, resource pool, host, or vApp.
    2. Click the Virtual Machines tab.
  2. Select Change both compute resource and storage and click Next.
  3. Select a destination resource for the virtual machine, and click Next.

    Any compatibility problems appear in the Compatibility panel. Fix the problem, or select another host or cluster.

    Possible targets include hosts and fully automated DRS clusters. If your target is a non-automated cluster, select a host within the non-automated cluster.

    If your environment has more than one vCenter Server instances, you can move virtual machines from one vCenter Server inventory to another.

    Important:

    If the virtual machine that you migrate has an NVDIMM device and uses PMem storage, the destination host or cluster must have available PMem resources. Otherwise, the compatibility check fails and you cannot proceed further with the migration.

    If the virtual machine that you migrate does not have an NVDIMM device but it uses PMem storage, you must select a host or cluster with available PMem resources, so that all PMem hard disks remain stored on a PMem datastore. Otherwise, all the hard disks use the storage policy and datastore selected for the configuration files of the virtual machine.

    Important: Migrating a virtual machine that has an NVDIMM device or a vPMem disk to a host that does not have the proper license fails and leaves the virtual machine in an unmanageable state for 90 seconds. You can afterwards retry the migration and select a destination host that is licensed to use PMem devices.
  4. Select the format for the virtual machine's disks.
    Option Action
    Same format as source Use the same format as the source virtual machine.
    Thick Provision Lazy Zeroed Create a virtual disk in a default thick format. Space required for the virtual disk is allocated during creation. Any data remaining on the physical device is not erased during creation. Instead, it is zeroed out on demand on first write from the virtual machine.
    Thick Provision Eager Zeroed Create a thick disk that supports clustering features such as Fault Tolerance. Space required for the virtual disk is allocated at creation time. In contrast to the thick provision lazy zeroed format, the data remaining on the physical device is zeroed out during creation. It might take longer to create disks in this format than to create other types of disks.
    Thin Provision Use the thin provisioned format. At first, a thin provisioned disk uses only as much datastore space as the disk initially needs. If the thin disk needs more space later, it can expand to the maximum capacity allocated to it.
  5. Select a virtual machine storage policy from the VM Storage Policy drop-down menu.
    Storage policies specify storage requirements for applications that run on the virtual machine. You can also select the default policy for vSAN or Virtual Volumes datastores.
    Important: If the virtual machine hard disks use different storage policies, the new policy that you select only applies to non-PMem hard disks. PMem hard disks are migrated to the host-local PMem datastore of the destination host.
  6. Select the datastore location where you want to store the virtual machine files.
    Option Action
    Store all virtual machine files in the same location on a datastore. Select a datastore and click Next.
    Store all virtual machine files in the same Storage DRS cluster.
    1. Select a Storage DRS cluster.
    2. (Optional) To disable Storage DRS with this virtual machine, select Disable Storage DRS for this virtual machine and select a datastore within the Storage DRS cluster.
    3. Click Next.
    Store virtual machine configuration files and disks in separate locations.
    1. Click Advanced.
      Note: You can use the Advanced option to downgrade from or upgrade to PMem storage.
    2. For the virtual machine configuration file and for each virtual disk, select Browse, and select a datastore or Storage DRS cluster.
      Note: Configuration files cannot be stored on a PMem datastore.
    3. (Optional) If you selected a Storage DRS cluster and do not want to use Storage DRS with this virtual machine, select Disable Storage DRS for this virtual machine and select a datastore within the Storage DRS cluster.
    4. Click Next.
  7. Select a destination network for all VM network adapters connected to a valid source network and click Next.

    You can click Advanced to select a new destination network for each VM network adapter connected to a valid source network.

    You can migrate a virtual machine network to another distributed switch in the same or to another data center or vCenter Server.

  8. Select the migration priority level and click Next.
    Option Description
    Schedule vMotion with high priority

    vCenter Server attempts to reserve resources on both the source and destination hosts to be shared among all concurrent migrations with vMotion. vCenter Server grants a larger share of host CPU resources. If sufficient CPU resources are not immediately available, vMotion is not initiated.

    Schedule regular vMotion

    vCenter Server reserves resources on both the source and destination hosts to be shared among all concurrent migration with vMotion. vCenter Server grants a smaller share of host CPU resources. If there is a lack of CPU resources, the duration of vMotion can be extended.

  9. On the Ready to complete page, review the details and click Finish.

Results

vCenter Server moves the virtual machine to the new host or storage location.

Event messages appear in the Events tab. The data displayed on the Summary tab shows the status and state throughout the migration. If errors occur during migration, the virtual machines revert to their original states and locations.