Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
157 lines (81 sloc) 7.55 KB

Performing a Linux migration to Azure with CloudEndure

Expected Outcome

This challenge will give you practical experience migrating a running host to Microsoft Azure. While this virtual machine is technically already running in Azure, it is running in a nested virtualization configuration on your host.

Inside the CentOS Linux host that you are using as your desktop, there is a running virtual machine entitled "migrate-host". It, too, is a CentOS virtual machine running under the KVM hypervisor. Microsoft has partnered with CloudEndure to provide access to their migration toolset to showcase its capabilities and give you hands-on experience with the migration process. At the end of the challenge, you should have a new virtual machine created in Microsoft Azure which you can SSH to and verify that it is, indeed, the same host.

The source host to be migrated can be an on-premise physical host, a virtual machine on any popular hypervisor (VMWare, KVM, etc), or it may also exist in another public cloud. CloudEndure is agnostic to the source environment and performs a block-level copy of the host into your Azure subscription as part of the replication process.

Process

  1. Register for a CloudEndure account
    • Visit & fill out the registration page located on the white-board at the front of the classroom.

    • Check the account for the e-mail address which you entered, and open the email from "Jonathan Bloom" at CloudEndure regarding "Confirm your CloudEndure account request"

    • Click on the link in the e-mail to "complete this form"

      Register For CE Account


  1. Log in to the CloudEndure Console

  1. Set Up CloudEndure

    • You will be presented with a dashboard which will allow you to select the type of project you wish you control.

      CloudEndure Dashboard

    • Select "Default Migration Project"

      CloudEndure Select Project

    • You will then receive an alert message indicating that the CloudEndure console has not yet been configured. You may safely click "Continue" as we will configure the console in the next step.

      CloudEndure Dismiss Alert


  1. Populate Service Principal Information to CloudEndure console

    • You must now configure CloudEndure to connect to Microsoft Azure. A service principal has been created for you as part of this challenge exercise and will allow CloudEndure to connect to your subscription.

      SP Information Screen

    • Populate the service principal information into the CloudEndure console; Navigate to the "Setup & Info" tab in CloudEndure and then choose the "ARM Credentials" tab.

      Populate Blank Service Principal

    • Based on the data in this example, the completed page would appear as follows:

      Populated Service Principal


  1. Define the target Replication Settings and specify an Azure Data Center location

    • After the Service Principal information is entered and saved, you will need to select the target Azure Data Center location for your CloudEndure migration project. Select the "Live Migration Target" drop-down and choose the Azure Data Center which your resource group has been created in. For example, "eastus2" would select "Azure ARM East US 2", centralus would select "Azure ARM Central US", and westus2 would select "Azure ARM West US 2".

      Populate Blank Replication Settings

    • In this case, "East US 2" was chosen. After the Azure Data Center is chosen, you may specify which existing virtual network you would like the migrated hosts to be connected to. In this case, the populated value of Default can remain.

      Populated Replication Settings

    • After the information is saved, you are now ready to configure your host for migration. Click on "Show Me How"

      Completed Replication Settings


  1. Verify SSH access to the migrate-host virtual machine and prepare it for migration to Microsoft Azure

    • Determine the IP address of the migrate-host virtual machine. This should be contained in a text file on your CentOS desktop

    • SSH to the migrate-host virtual machine using the IP address and credentials provided

      SSH to migrate-host VM

    • Determine if the required Hyper-V drivers are already installed on the migrate-host virtual machine

      Check for HV Drivers

    • Edit the /etc/dracut.conf file and force-add the Hyper-V drivers required for operation within Microsoft Azure. These were not added at the time this host was built since, according to what it could detect, it is running solely inside a KVM hypervisor and as such the Hyper-V drivers are not required.

      Edit Dracut

    • Re-make the initramfs of the migrate-host

      Remake Initramfs

    • Verify that the Hyper-V drivers are now installed on the migrate-host virtual machine

      Check for HV Drivers


  1. Deploy the CloudEndure Migration Agent onto the migrate-host virtual machine

    • Navigate to the "Machines" tab. The required commands to execute are present on this screen; You will be downloading and installing the CloudEndure migration agent.

      Install CE Agent

    • Download the CloudEndure Migration Agent

      Download CE Agent

    • Install the CloudEndure Migration Agent -- hit "Enter" when asked for which disks to replicate

      Install CE Agent

    • View the environment setup in the CloudEndure console

      Setup CE Environment

    • After the CloudEndure environment is setup, an initial sync will occur

      Initial Sync 1

      Initial Sync 2


  1. Execute a test migration

    • On the "Setup & Info" tab, wait for the initial sync to be completed from Step 7

      Verify Sync Complete

    • After the initial sync is complete, return to the "Machine" tab and confirm that the migrate-host is indeed ready to be tested

      Verify Ready for Testing

    • Select the checkbox next to the "migrate-host" virtual machine, Click "Launch Target Machines" and select "Test"

    • After the test is completed, this should reflect in the "Machines" tab

      Verify Test Complete


  1. Verify connectivity to the migrated virtual machine

    • Determine the IP address of the migrated virtual machine; Double-click on "migrate-host" and explore the newly created "Target" tab

      Verify Test Complete

    • SSH to the virtual machine at the IP address provided by CloudEndure; This is your new IP address in Microsoft Azure.

      Verify SSH Connectivity


You have now migrated your "migrate-host" virtual machine to Microsoft Azure and it is now running within Azure environment. Continue on to Challenge 4 where we will moderize the applications running inside this virtual machine.