6.15. Migrating virtual machines between Red Hat Virtualization environments

You can migrate virtual machines from one Red Hat Virtualization environment to another using a data domain. You can minimize downtime by using live storage migration when migrating virtual machines. Alternatively, you can ensure that all virtual machines on the data domain are powered off by setting the data domain to backup mode.

Note

Although you can minimize downtime by using live storage migration when migrating virtual machines to the migration data domain, if you cannot use live migration, shut down the virtual machines that you want to migrate before migrating them to the migration data domain.

Prerequisites

  • The old data center and the new data center must be the same version.
  • You have a data storage domain to use for migration that is large enough to hold the virtual machines that need to be moved. If the data domain is not large enough to hold all the virtual machines, you can migrate them in batches.
  • (Optional) The migration data domain is set to backup mode to ensure that all virtual machines are powered off. For more information, see Setting a data storage domain to be a backup domain in the Administration Guide. If you use this option, you cannot use live migration.
  • You should use the same type of storage in the old storage domain, the migration storage domain and the target storage domain. For example, if using iSCSI in the old storage domain, use iSCSI in the migration storage domain and the new storage domain.

Procedure

  1. Export the virtual machines to the migration data domain. See Moving a Virtual Disk in the Administration Guide.

    Warning

    For virtual machines with more than one disk, make sure to migrate all disks.

  2. If you haven’t already shut down the virtual machines you are migrating, shut them down now.
  3. Migrate the migration data domain from the old data center to the new one. See Migrating Storage Domains between Data Centers in Different Environments in the Administration Guide.

    Important

    Do not check the Ignore OVF update failure checkbox. The maintenance operation on the storage domain should update the OVF.

    The virtual machines are no longer available on the old storage domain.

  4. Import the virtual machines from the migration data domain. See Importing Virtual Machines from Imported Data Storage Domains in the Administration Guide.

    The virtual machines are now imported to the new RHV environment.

  5. If you can use live migration, or if you can leave the virtual machines on the migration data domain, start the virtual machines.

    If you don’t need to use the migration data domain to continue migrating virtual machines from the old environment, you can skip the following steps.

  6. If you need to use the migration data domain to continue transferring virtual machines, move the virtual disks from the migration data domain to another data domain that is attached to the new environment. See Moving a Virtual Disk in the Administration Guide.

    Warning

    For virtual machines with more than one disk, make sure to migrate all disks.

  7. Disconnect the migration data domain from the new environment and reconnect the domain to the old environment to repeat the process until all virtual machines are migrated.

Be sure that the OVF for each virtual machine gets updated to ensure that this process also migrates the virtual machine’s configuration and metadata, including the vCPUs, memory, timezone, and MAC addresses. For more information, see Updating OVFs in the Administration Guide.

Additional resources