Migrating VM from AWS Ec2 to GCP

  Uncategorized

Start the VM migration service

The VM migration service is offered by CloudEndure, a third-party partner of Google Cloud Platform. Before you can migrate your VM, you must sign up for CloudEndure. CloudEndure does not charge for this service

 

First, login to GCP

Go to Compute engine, and create a new project.

After created a new project , we need to generate a Service account key for GoogleEndure later.

Generate a service account key

Select Compute Engine default service account and Key type is JSON

Download and save the JSON on your computer.

Back to compute engine and select import vm

It will prompt a window and ask you to leaving GCP and using CloudEndure to import a vm. Select continue .

CloudEndure will ask you to log in a gmail, log in with the same GCP gmail.

After login , you need to setup your project, back to your GCP , and copy your Project id, and upload the JSON file downloaded just now

Select Project ID

Paste the Project ID and upload your JSON file, you will see something like this.

After that setup your server region and save the replication settings.

After that you will see the Agent installation token.

Install the migration agent

Install the VM migration agent on each of the source machines that you want to migrate. The VM migration agent is required to copy the machine at the block level from the source to the destination. The agent can be installed on any supported operating system. This step copies data into Google Cloud Platform but does not launch your final target machines.

To install the migration agent, download the agent to the machines you want to migrate using the following instructions.

LINUX

———–

On Linux, download the installer with the following command:

wget -O ./installer_linux.py https://gcp.cloudendure.com/installer_linux.py

Then run the installer using the following command. Replace [TOKEN] with your installation token:

sudo python ./installer_linux.py -t [TOKEN]

The Linux installer will require Python 2.4 or greater installed on the machine. Other Python versions won’t be able to run the installer.

 

WINDOWS

Download the Windows installer.

In a command prompt window, run the installer using the following command. Replace [TOKEN] with your installation token:

installer_win.exe -t [TOKEN]

After the agent installation completes successfully, you can track the progress of the migration in the VM Migration Console, in the Migration tab.

The progress of the data copy into Google Cloud Platform is shown under the Data Replication Progresscolumn in the console.

 

Configure the target machine

Next, for each VM instance that you are migrating, review the virtual machine properties by clicking on that server in the VM Migration Console, which opens the Blueprint tab.

The Blueprint tab lets you set the properties of your target VM instance. For example, you can change the target network the VM is created in, or the internal IP, and so on. You can change these properties at any time after the agent is installed. You don’t have to wait for replication to complete to modify these settings. These properties include:

  • The target instance’s machine type
  • The target VPC network/subnet
  • The internal IP
  • The type of each persistent disk used by the VM instance

To save your changes, click Save Blueprint.

Verify initial sync completion

Depending on the size of the source disk, and the zone that you are migrating your machine to, it might take several hours or more for the replication server to sync your data. When the initial sync is complete, in the Data Replication Progress column, the replicated machines show Continuous Data Protection , indicating that you can test the creation of your target instances. In the Status column, a purple launch icon is shown, indicating you can start the target machine in the target location.

 

Screenshot of initial sync progress

Test the creation of target VM instances

When you are ready to test the creation of the servers in the target location, select the server, then click Launch Target Machine, and click Test.

Screenshot of selected instances for testing

You can follow the progress of the target machine launch process in the Job Progress tab, which will also show if any errors were experienced during this process.

Test the availability of the target VMs

Go to the VM instances page and verify target VMs that were created. By default, the target VMs are prefixed with their original names. If you changed the name of the target instance in the blueprint, the target VM uses the name you chose.

Verify that you can log into the target machines. For Windows target machines, use RDP, and for Linux machines, use SSH.

GO TO THE VM INSTANCES PAGE

Use the source machine’s credentials for logging into its target machine. Please use external SSH and RDP clients rather than trying to connect through the web interface of the Cloud Platform Console.

 

 

 

 

LEAVE A COMMENT