Migrating Databases & Virtual Machines to Google Cloud.

Migrating Virtual Machines (VMs) and databases to Google Cloud can be a major hurdle when migrating your workload to the Google Cloud environment, and yet is very important both in reducing your physical server’s strain, as well as to ensure convenience in managing and maintaining the cloud environment.

In this post, we will explore how to easily and securely migrate databases and Virtual Machines (VMs) to Google Cloud. Let us begin by discussing the concept of how VM migration works.

How VM Migration Works

First, what is a Virtual Machine or VM?

A virtual machine is, in layman’s terms, a virtual computer within a computer—a software-defined computer stored as a programming code within a physical computer (or server). A VM, as a computer file, is also often called an “image” and behaves like an actual computer albeit not having any physical form.

VM migration, in the cloud computing field, refers to the process of migrating a Virtual Machine from the previous environment (whether a physical on-premises environment or a cloud environment) to a target cloud environment. This article will focus on VM migration to the Google Cloud environment as the target. 

We can differentiate VM migrations into two basic types: hot migration and cold migration:

  1. Hot migration

Refers to moving a Virtual Machine (VM) to a target environment/host when it’s powered on. Hot migration is also called vMotion or live migration, and the idea here is that you migrate the virtual machine without any downtime, so it’s still available to users during the migration process.

  1. Cold migration

In this type of migration, the virtual machine is powered off or suspended when migrated to a new environment/host. Cold migration is obviously easier (and more reliable) to perform, and you can also perform automatic cold migrations using available solutions. 

A key advantage of Google Cloud over its main competitors, Amazon Web Services (AWS) and Microsoft Azure, is the fact that it allows hot/live migration for both Virtual Machines and databases with native DataFlow services and built-in Datastream.

Virtual machines and Google Compute Engine

Compute Engine is the name of Google’s cloud computing service as a part of Google Cloud that lets you create and run VMs on Google’s infrastructure.

As mentioned above, Google offers live migration (hot migration), allowing migration of running VM instances without requiring any reboot.

While there are many benefits of this live migration function, a very important benefit is the fact that this allows Google to perform maintenance without interrupting any of the running VMs. Maintenance, as we know, is extremely important in ensuring the cloud environment, VMs, and applications stay reliable, optimal, and secure. During Google Cloud’s maintenance, the VM will be live migrated.

How To Ensure Secure Migration of VMs

While the actual migration process may vary with different VMs and workloads, migration to Google Cloud will follow four key phases:

  1. Assess: assessment of the current environment and its differences to Google Cloud, as well as the VMs requirements.
  2. Plan: plan the migration based on the assessment results
  3. Migrate: performing the actual migration based on the migration plan
  4. Optimizing: optimizing the migrated workload and VM, including training users so they can make the most of the new environment

Below are the best practices for each phase to ensure secure and reliable migration of VMs to Google Cloud.

Assess Phase: Best Practices

The key to a successful VM migration is a thorough assessment of the VMs and source environment, and you may want to consider the following factors:

  • How many VMs do you need to migrate?
  • Do you need to migrate the VM with an unsupported OS?
  • Do you need to migrate physical servers?
  • Do you need to migrate VMs with an OS that requires an update?
  • Are there any dependencies with a given hypervisor or with any applications, systems, or VMs?

Another key assessment to perform is to identify the resource requirements by doing the following:

  • Identify the machine type of different VMs in the target Google Cloud Environment and compare them with each VM that you’d like to migrate.
  • Identify the provisioned resources of each VM in your current environment.
  • Monitor the utilization rate of resources in the current environment.

The assessment phase should help you identify:

  • The expected time needed for the migration
  • The migration cost per VM and total migration cost
  • Available network throughput

Planning Phase: Best Practices

Some key best practices in the planning phase are:

  • Ensure your current environment meets the migration requirement. Check out Google’s guidelines for migrating for Compute Engine version 4 requirements.
  • Ensure you have enough resource quota (again, check Google’s guidelines here)

Migration Phase: Best Practices

Here are some important best practices to address common issues and problems during VM migration:

  • Ensure the correct configuration of guest OS in VMware. Make sure VMware’s vCenter is not reporting any errors related to the guest OS.
  • Make sure your VMs are correctly prepared for migration without any errors.
  • Verify your VMs by creating test clones in a sandbox environment to ensure the VMs are working properly in Google Cloud
  • It’s recommended to uninstall Migrate for Compute Engine after a successful migration to avoid unnecessary billing and resource usage.

Ensuring Smooth Google Cloud Migration

To ensure a smooth migration process to Google Cloud, you can leverage the help of professional cloud migration companies like Pythian that can help you identify and build comprehensive plans to help you transform and migrate your VMs, applications, and databases to Google Cloud. 

Pythian offers 24/7 ongoing operational support from its global, certified teams, so you can make sure you’ll always get help during and after the cloud migration process. 

Pythian cloud migration services will help you ensure a seamless and secure migration to your target cloud environment, ultimately allowing your business to maximize the ROI of your cloud environment.