How to Migrate from VMware to Azure Using Azure Migrate

Save to My DOJO

How to Migrate from VMware to Azure Using Azure Migrate

Hybrid cloud strategies have never been more popular. More and more companies are starting to look at some sort of hybrid cloud implementation. Azure Migrate is a free tool from Microsoft that allows VMware administrators to replicate their VMs from on-prem to Azure. It’s an extremely powerful tool that even allows for pre-migration tests to run. However, it’s important to note that many cloud experts recommend that an on-prem “lift and shift” to the cloud be used as a last resort cloud migration strategy. Almost always, just moving your VMs into the public cloud will result in little to no savings. Also, there is very little benefit to just parking your on-prem servers into another company’s datacenter, which is essentially what we are doing. It is highly recommended by cloud industry experts to take the time to use a cloud migration as a “refresh” and build new as opposed to the lift and shift strategy. If a certain workload can be moved over into a container or PaaS format then that should be the primary goal. Either way, you’ll be able to use ARM (Azure Resource Manager) to manage the workload moving forward, which is beneficial in many ways.

In my case (and as an example workload for this post), my wife and I have been playing a lot of 7 Days to Die (think zombie Minecraft) lately at home. I am currently hosting a server in my VMware environment on an HP Proliant server in my basement. My wife, bless her heart, loves playing the zombie-killing PC game so much, that she has invited several friends to play with us on our server. My server is pretty old and doesn’t have the fastest disks, so in order to get a beefier server that can support more players, I’ll simply use some of my Azure credits and just host the server up in the cloud. We’ll go through the migration step by step.

Azure Migrate now has two migrations options, one requires an agent to be installed on each VM that is to be migrated, the other is an agentless format which requires no agent to hassle with. There are pros and cons to each method, check out the requirements for each here. There are different use cases. For example, migrating VMs with the agent allows you to replicate pass-through disks and data disks up to 8TB where agentless can’t do pass-through and has a 4TB limit. In our example, we will do agentless which requires at least vSphere 5.5 and higher.

How to Setup an Azure Migrate Project

First, we need to set up an Azure Migrate project. Once logged into the Azure Portal search for the Azure Migrate service and select Assess and migrate servers:

Azure migrate get started

Create the Migration Project by filling in the details such as resource group and subscription. Then select Select migration tool tab:

add a tool azure migrate

Select Azure Migrate: Server Migration and select Review + add tool(s) and click Add Tools:

migration tool azure migrate

Now our Migration Project has been created.

Installing the Azure Migrate OVA

Now that we have the project created we need to download the Azure Migrate OVA and install it on our on-premise VMware environment. Again, in the Azure portal, under Azure Migrate: Server Migration select Discover:

azure migrate server migration

On the “Are your machines virtualized?” dropdown select Yes, with VMware vSphere Hypervisor and on the “How do you want to replicate?” drop-down select Using agentless replication. Then select Download to download the OVA:

discover machines

Once the OVA file has been downloaded log into VCenter and Deploy OVF Template:

Select Local File and browse to the OVA download. Run through the OVF Deploy wizard to finish deploying the OVA:

OVF template

Once the OVA template has completed deploying. Console into the VM, you will be prompted to set the Administrator password. Once logged in, Internet Explorer will automatically open to the server with port 44368. This will be the set up for the Azure Migrate appliance, it’s pretty intuitive but we will go through the major steps. The first step, of course, is to accept the license terms:

set up discovery for azure apppliance

After the validation steps run, we will need to download and extract the VMware vSphere Virtual Disk Development Kit. A link will be provided to the download.

NOTE: You must have a VMware account to download the files. Just download the Zip version and extract the files to the specified folder in the step:

appliance prerequisites

Next, we have to register the new appliance with our Azure Migrate Project. Select the subscription, Migrate Project, and the appliance name:

register with azure migrate

Lastly, we need to connect the appliance to our vSphere environment. You can create a custom account in vCenter with these specific permissions. For the sake of the demonstration I’m just going to use the administrator[email protected] credentials:

vcenter server

Next, the appliance will finish its initialization and start the discovery:

How to Start Replication with Azure Migrate

Once the discovery is done we can start replicating our VM over to Azure. In the Azure Portal under our Azure Migrate project, we will see a “Replicate” option appear. Select Replicate:

replication azure migrate

Select Yes, with VMware vSphere so specify our VM type. Then select the Azure Migrate Appliance we just set up and select Next:

replicate

Under Virtual Machines select No, I’ll specify the migration settings manually and we will select our target server and select Next:

virtual machine azure migrate

Now, we need to select our target settings, which is where we will house the VM. I set up a resource group with a VNet dedicated to hosting this workload in Azure:

target settings

Next, we need to select the size. I was a little greedy on-premise and over-allocated resources to my server. In the cloud we need to be more mindful of wasteful resources, so I’ll downsize the VM to a D2_v2:

 

For disk, I want to take advantage of Azure SSD which is a beautiful thing for video game servers. I selected Standard SSD, I’m excited to see the performance of this as I’m currently running on spinning disk on-premises:

Select Replicate to start the replicate process. We can see under Migration Tools that we now have 1 replication job configured:

We can check the status of the replication:

A snapshot gets created on the VM and an initial replication is run off of that snapshot. Once completed, the delta replication will run and any changes made afterward to the on prem VM are replicated over to the disks in Azure:

 

How to Run an Azure Migrate Test Migration

Microsoft recommends running a test migration before migrating any VM over to Azure. The test migration does not affect the on premise VM, It simply deploys a VM in Azure with the replicated data. Typically you would want to deploy the test to a development network etc. To start a test, inside the Azure Migrate Appliance window click on the name of the serverNow we have this fancy screen that allows us to perform our Test Migration:

We choose the network in Azure to deploy to and select Migrate:

We will be able to see all the steps of the test migration:

test migration

Once complete, we can see that our VM is now in Azure with a -test appended to the name. We can run our tests and verify that the applications are working on the server. I can telnet into my 7 Days to Die server successfully so I know it’s up and working:

After the testing is complete, we can have Azure Migrate clean up our test migration. Navigate your way back to the Azure Migrate Appliance screen and click on the VM name and choose Clean up test migration:

We will be prompted to input some testing notes and check the box to clean up the VM:

Migrating the VM to Azure

Now that we’ve done our testing, we can officially migrate the server into Azure. To do this select the VM and choose Migrate:

Now we will have the option to shut down the original VM to prevent data being written to it. In my case, I’m going to choose Yes. Select Migrate to start the migration:

We can check the status of the migration and see all the steps:

Once the migration is complete we can see that the VM now appears as shown below:

Wrap-Up

Azure Migrate is a very powerful tool that can be useful when doing a lift and shift to the cloud. However, as I stated before this should be your last resort as there are many other advantages gained from revamping your server into a cloud service. For me, this was a great way to get my 7 Days to Die server quickly hosted up in Azure so my wife and I could play with our friends. In your case, you’ll likely be migrating a more business-oriented workload, but this served well as an example of the migration process!

I plan on converting it over into a container down the road. Now it’s time to test out Azure cloud computing with some zombie axing fun!

As always do let us know if you have questions or comments using the comments section below!

Altaro VM Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

7 thoughts on "How to Migrate from VMware to Azure Using Azure Migrate"

Leave a comment

Your email address will not be published.