Migrating VMware VMs to your private cloud

To migrate virtual machines (VMs) from an on-premises data center to your private cloud vCenter environment, several options are available. The private cloud provides native access to VMware vCenter, which supports tools for workload migration. This document describes some of your vCenter migration options.

Before you begin

Migration of VMs and data from your on-premises data center requires network connectivity from the data center to your private cloud environment. Before migrating workloads, set up a site-to-site VPN connection between your on-premises environment and your private cloud.

The network path from your on-premises vCenter environment to your private cloud must support migration of VMs by using vMotion. The vMotion network on your on-premises vCenter must have routing abilities. Verify that your firewall allows all vMotion traffic between your on-premises vCenter and private cloud vCenter. On the private cloud, routing on the vMotion network is configured by default.

Migrate VMs using HCX

You can use VMware HCX to migrate VMs from your on-premises environment to Google Cloud VMware Engine. VMware HCX abstracts vSphere-based on-premises and cloud resources and presents them to applications as one continuous resource, creating a hybrid infrastructure.

For information about how to use VMware HCX to migrate VMs from your on-premises environment to your private cloud, see Migrating VMware VMs using VMware HCX.

Migrate VMs using backup and disaster recovery tools

You can migrate VMs to private clouds using backup/restore tools and disaster recovery tools. When you restore from backups that are created using a third- party tool, use the private cloud as a target. You can also use the private cloud as a target for disaster recovery by using VMware SRM or a third-party tool.

Migrate VMs using PowerCLI

To migrate VMs from the on-premises vCenter to the private cloud vCenter, use VMware PowerCLI or the Cross vCenter Workload Migration Utility available from VMware Labs. The following sample script shows the PowerCLI migration commands.

$sourceVC = Connect-VIServer -Server <source-vCenter name> -User <source-vCenter user name> -Password <source-vCenter user password>
$targetVC = Connect-VIServer -Server <target-vCenter name> -User <target-vCenter user name> -Password <target-vCenter user password>
$vmhost = <name of ESXi host on destination>
$vm = Get-VM -Server $sourceVC <name of VM>
Move-VM -VM $vm -VMotionPriority High -Destination (Get-VMhost -Server $targetVC -Name $vmhost) -Datastore (Get-Datastore -Server $targetVC -Name <name of tgt vc datastore>)

Migrate ISOs and templates

To create new VMs on your private cloud, use ISOs and VM templates. To upload the ISOs and templates to your private cloud and make them available, complete the following steps:

  1. Upload the ISO to your private cloud vCenter by using the vCenter UI.
  2. Publish a content library on your private cloud vCenter:
    • Publish your on-premises content library.
    • Create a new content library on the private cloud vCenter.
    • Subscribe to the published on-premises content library.
    • Synchronize the content library for access to the subscribed published on- premises content library.

Migrate VMs using an NSX Layer 2 VPN

This option enables live migration of workloads from your on-premises VMware environment to the private cloud. With this stretched Layer 2 network, the subnet from on-premises is available on the private cloud. After migration, new IP address assignment isn't required for the VMs.

For information about how to use a Layer 2 VPN to stretch a Layer 2 network from your on-premises environment to your private cloud, see Migrate workloads using Layer 2 stretched networks.