Using offline migration

With offline migration, Migrate for Compute Engine enables you to migrate workloads running on vSphere with operating systems that are not currently supported by Migrate for Compute Engine's streaming technology.

During the offline migration process, all storage migrates to the cloud before the VM starts on Compute Engine.

Another use case for offline migration is storage-only migration for VMs that aren't supported by the cloud provider. These are typically VMs with older operating systems, such as Red Hat 4. With storage-only migration, you can migrate volumes and then reattach them to a VM with a supported OS.

Preparing a VM for offline migration

The following steps show how to prepare different operating systems for offline migration.

Ubuntu 12.x

Before using offline migration, make the following changes to your Linux distribution on the source platform:

  1. Remove VMware, Azure, or AWS guest agents.
  2. Ensure that NTP configuration points to the NTP server "metadata.google.internal".
  3. Ensure that DHCP is enabled for the primary ethernet interface.
  4. Ensure that MTU is set to 1460 for all ethernet interfaces.
  5. Ensure that the Compute Engine Linux Guest Environment is installed from packages or provided repositories.
  6. Remove persistent network rules to prevent the instance from using cached MAC addresses. For example, use the following command:

    rm -f /etc/udev/rules.d/70-persistent-net.rules
    
  7. Configure sshd using the following steps:

    1. Ensure that sshd is enabled.
    2. Allow key-based authentication on sshd by adding the following line to the sshd_config file.

      AuthorizedKeysFile .ssh/authorized_keys
      
  8. Disable or remove the irqbalance daemon.

  9. Configure the bootloader using the following steps:

    1. Ensure that the bootloader config does not include:
      • splashimage=.
      • rhgb and quiet kernel command-line arguments.
    2. Ensure that kernel command-line arguments contain console=ttyS0,38400n8d so that the instance can function with the Interactive Serial Console.
  10. Edit /etc/fstab to include references only to block devices that are migrated or NFS exports that will be available after the migration.

Windows 2008 (non R2) or higher to Google Cloud

No preparation is necessary for offline migration of 64-bit versions of Windows Server 2008 or higher.

Windows Server 2008 32-bit requires package installation before starting offline migration.

To install them:

  1. Download the Windows Server 2008r1 Drivers from the Downloads page.
  2. Unzip devcon.zip to a directory of your choice.
  3. Download an additional driver package to that same directory:
    gsutil cp gs://gce-windows-drivers-public/win2k3driver/x86/* [DIRECTORY]
    
  4. Run the install.cmd script from that directory
  5. Run an offline migration

Windows 2003 SP2 to Google Cloud

No preparation is necessary for offline migration of Windows Server 2003.

On-premises to cloud: Offline migration process

Before you begin, perform the offline preparation as explained in the previous sections. Then perform the following steps:

  1. In the vSphere Web Client, select the virtual machine.
  2. Right-click the VM and select Velostrata Operations > Offline Migrate.
  3. Select the Velostrata Cloud Extension and click Next.
  4. Select the Instance Type (VM size) and click Next.
  5. Select the required Security Groups and click Next.
  6. Select a Subnet in Google Cloud. When Cloud Extension nodes are in different zones, Migrate for Compute Engine uses the node in the same zone as the selected subnet. Otherwise, you need to select the node manually.
  7. From the Configure Private IP drop-down list:
    • Select Auto to automatically assign an IP address on the subnet, or
    • Select Static and enter the desired static IP address. From the Edge Node drop-down list, select the required node and click Next.
  8. Select the Storage Type and click Next.
  9. Review the summary and then click Finish.

To view the related migration tasks, use the Monitor > Tasks & Events tab.

After the offline migration, you can connect to the VM using its private IP address or FQDN.

AWS to Google Cloud: Offline migration process

Offline migrations using Waves

To perform offline migration from AWS to Google Cloud, run an offline migration job on a Wave.

Offline migrations using PowerShell

To perform offline migration on a single VM from AWS, run the following command from PowerShell, filling in your AWS EC2 InstanceID and Cloud Extension name:


Invoke-VelosOfflineMigration [-Id] InstanceID -CloudExtension $ [-EdgeNode ]-StorageSpec  -InstanceType  -CloudDetailsName

For example:


Invoke-VelosOfflineMigration -Id i-04151a4a1067cfe9b -CloudExtension $gcpCe -EdgeNode NodeA -StorageSpec Standard -InstanceType n1-standard-1 -CloudDetailsName aws

Azure to Google Cloud: Offline migration process

Offline migrations using Waves

To perform offline migration from Azure to Google Cloud, run an offline migration job on a Wave.

Offline migrations using PowerShell

To perform offline migration on a single VM from Azure, run the following command from PowerShell, filling in your Azure instance ID and Cloud Extension name:


Invoke-VelosOfflineMigration [-Id] InstanceID -CloudExtension $ [-EdgeNode ]-StorageSpec  -InstanceType  -CloudDetailsName

For example:


Invoke-VelosOfflineMigration -Id i-04151a4a1067cfe9b -CloudExtension $gcpCe -EdgeNode NodeA -StorageSpec Standard -InstanceType n1-standard-1 -CloudDetailsName azure