How to migrate VMs & Servers to Google Cloud Compute Engine?

Cloud migration is becoming a technological trend as cloud offers on demand flexibility, scalability, and reduction in bearing costs of on premises infrastructure. Public clouds offer a variety of services for database, applications and storage migrations. 

Today we look more in detail about how cloud migration works for physical servers on premises and virtual machines from on-premises.  

Cloud Migration Scenarios  

Virtual machines and technology have been around for more than 15 years back, and as virtual machines grow the administration around virtual machines is not yet developed. Need for a decent administration model is fundamental to control expenses and derive incentive from virtual servers as well. 

In this blog, we will understand the migration of servers and VMs to GCP under the following scenarios:

  • Migrate Servers from On Premises to Google Cloud
  • Migrate VMs from on premises to Google cloud
  • Migrate VMs from another cloud to Google cloud
    • Azure cloud to Google Cloud Platform
    • AWS cloud to Google Cloud Platform

Migrate Servers from On Premises to Google Cloud Platform

To migrate a physical server to cloud you need to boot migrate for computing engine connector ISO image into RAM from a virtual or physical DVD ROM/CD ROM device. The migrate for computing engine connector maps local storage of physical servers and creates a stub VMware VM as a management object for Migrate for compute engine cloud migration operation.

Migration of physical servers require VMware iSCSI software adapter

To verify that you have this adapter check :

Step 1: in vCenter select the VM host

Step 2: Select tab configure, then storage adapters option if you have iSCSI adapter it would be listed here 

If you need iSCSI adapter

Step 1 : Navigate to configure -> storage adapters and add iSCSI software adapter

Step 2: Under networking select VMKernel adapters and click edit 

Step 3: Click Port properties 

Step 4: Under Enabled services, check the box next to Provisioning and click on ok

Booting from Velostrata ISO

Step 1: Launch the ILO remote console

Step 2: Select Virtual drives -> image file CD/DVD-ROM and select Velostrata connector ISO

Step 3: Select Power switch ->reset

Step 4: Post server is up ensuring it boots from ISO

Step 5: Log in to ISO using these credentials: ubuntu\Welcome01

Step 6: Run the ./VelosConnector.sh script to view VelosConnector menu 

Registering a Stub VM

Stub VM is a management object created on vSphere.  It is used by compute engine to interact with physical server

In the VelosConnector menu select 1 for registering a Stub VM to migrate for compute engine operations and follow-on screen instructions. Proper registration of operating systems is required to ensure creation of instances in Google cloud and proper migration. The iSCSI target associated with VM is created when registration of stub VM is done with the same source IP address.

Post verification of stub VM coming in vCenter you can start migration as per steps mentioned below to migrate VMs to Google cloud platform. 

Migrate VMs from on-premises to Google Cloud Platform

Step 1 : From the vSphere web client, select the virtual machine you need to migrate

Step 2 : Right click the virtual machine

Step 3: Select Velostrata Operations -> Run-in-Cloud , or Select Velostrata Operations -> Migrate

Step 4: Select your cloud extension

Step 5: Name the cloud VM (Optional Step)

Step 6: Click Next. The cloud instance screen will appear

Step 7: Select the project name and instance type

Step 8: Click Next. The storage policy screen will appear

Step 9: For the storage policy select Write back or write isolation

Step 10: Click Next. The networking screen will appear  

Step 11: Select the subnet on Google cloud platform for Virtual machine.

Step 12: Enter any network tags separate with commas, to apply to virtual machine

Step 13: Select the instance service account (Optional step)

Step 14: From configure private IP drop down select any one of the following:

Auto (Automatic assignment of IP Address from subnet) 

Static (enter static IP address within subnet)

Step 15: From the Edge Node drop down list, select primary node in cloud extension which will handle migration

Step 16: for external IP, select :

Step 17: Click Next

Step 18: Select the disk type for instance and service account which hosts the worker instance to handle migration

Step 19: click Next and summary screen will appear

The process of running the virtual machine in the cloud and migration of virtual machine can be viewed on cloud instance information portlet from Virtual machine summary page and monitor create vSphere task. 

Migrate VMs from another cloud to Google Cloud Platform

Azure cloud to Google Cloud Platform

Step 1: Stop source VM in Azure cloud

Step 2: Create the Migrate for Compute engine VM importer at Azure

Step 3: Take snapshot from source VM disk

Step 4: Create a data disk from source VM snapshot and attach it to migrate for compute engine importer

Step 5: create an instance in Google cloud

Step 6: Steam data from the importer to Google cloud extension

Step 7: when migration is complete. Migrate for compute engine terminates the importer and clean up resources

At the end process the original Azure instance remains intact and can be switched off.

AWS cloud to Google Cloud Platform

Step 1: Stop source VM in AWS

Step 2: create the migrate for compute engine VM importer at AWS

Step 3: Detach the EBS volumes from source VMs and attaches them to importer

Step 4: Creates an instance in Google Cloud

Step 5: Stream data from importer to google cloud extension 

Step 6: Terminate importer and reattach disks to source VMs. 

At the end process the original AWS instance remains intact with original EBS volumes re-attached and powered off.

Leave a Comment

Select your currency
USD United States (US) dollar