Server Migration

Background:

General Procedure:

So, the general steps for this project are as follows:

The Project:

The first thing that I did was create a virtual machine on my server running Hyper-V.

Once the VM was created, I started it and gave it the options it needed to install the operating system.

Before starting any project in Azure, I always create a separate resource group:

Once the resource group was created, I created a virtual network (by searching in Azure for virtual networks). I used the default settings for the newtork, and used the default settings on the subnet creation.)

I also needed a sotrage account to migrate storage for the VM. Igave the storage acccount a name, and tied it to the resource group I created earlier. I chose all defaults, save for the redundancy, which I set to Locally-redundant storage (LRS) to save costs.

Once the prerequisites were all created, it was time to create a migration project. To create a project, navigate to the Azure Migrate menu.

The first step after project creation is to discover the on-premise environment. The Discover page has a link to download a virtual appliance to assist with the discovery.

Once the appliance was downloaded, I imported it as a VM in Hyper-V.

After the appliance was imported, I configured setup of the virtual machine as normal, giving a username and password.

When the VM had completed its seteup, it launched the Appliance Configuration Manager webpage.

The appliance needed a project key. I used the "Generate Key" button back in the Azure portal, and copied that text to a text file since I couldn't copy text directly to the VM. After I moved the file to the VM, I copied the text and put it in the ApplianceConfigurationManager webpage, and clicked verify. Note that it took ~15 minutes for the verification process to succeed.

After the verification, I entered the credentials of the Hyper-V host, and gave it a friendly name to use later.

When adding the discovery source, I used the IP of my Hyper-v host, and used the friendly credentials that I'd entered earlier. After validating credentials, I clicked the discover button.

After some time (15+ minutes), I was able to see the MigrationTest VM (and the migration appliance)listed in Azure.

Creating an Assessment

The assessment is started back in the Azure Migrate main menu. The setup is straightforward--you tell it to use the Azure Migrate appliance as the discovery and choose which servers you want to migrate.

After the assessment is created, you can select it to show the estimated cost to run the VM.

Once the initial discovery and the assessment were complete, I started the actual migration. For this, you have to define where you want to migrate to.

Once the resources are created for the migration, the Hyper-V replication provider and the registration key have to be downloaded and installed on the Hyper-V host.

Duringthe Azure Site Recovery Provider installation, you'll be asked to download select the registration key downloaded earlier. Once imported, it'll auto fill the information needed for register.

It'll take some time, but back in the Azure migration window, the registration will show as finalized.

After registration, the VM (and the migration appliance) will show as "Discovered servers" in Azure. After they're discovered, replication has to happen between the host and Azure. Setting this up is simple enough: start by clicking the replicate button in the migration menu.

The replication setup again asks where you want to migrate your VM to. Select "Azure VM", and in the next window, select the VM that will be migrated.

In the Replicate window, select the storage account, virtual network and subnet created earlier. You'll also have the choice to set redundancy, but I chose none.

In the next window, you'll have to choose a VM size and operating system type. I chose the defaults for the rest of the replication wizard.

Back in the Azure migrate window, you'll see that there's one VM under Replications. If you click that number, you'll be able to see the details of the replication.

The replication status will initially give a synchronization percentage. After some time (~40 minutes) the replication status will show "Protected". Once the VM shows protected status, we can finally move to migrating the VM.

Back in the Azure migrate menu, click Migrate, and follow the wizard. You'll select the VM that you want to migrate, and click the Migrate button at the bottom.

After the migration starts, you'll get a notification that the operation is in progress. This'll take a long time, but eventually, the VM will show inside of the Azure VM menu. With that, we've successfully migrated on on-prem virtual machine to Azure.

Conclusions:

Following these steps, I was able to create and migrate a VM from a Hyper-V environment to Azure. Most of the steps in the setup seemed to be simple, but I ran into a handful of errors that confused me. Most of these issues were just becuase I was impatient or clicked too fast. A simple refresh of the webpage, or waiting some time before trying again fixed just about every issue that I had.