Blog Post

Microsoft Mechanics Blog
10 MIN READ

How to migrate your VMs to Azure and why | Complete tutorial with new business case

Zachary-Cavanell's avatar
Zachary-Cavanell
Bronze Contributor
Jul 19, 2023

Move on-premises VMware or Hyper-V workloads to the cloud with Azure Migrate. Discover and assess your VMs, generate a business case for moving Windows and Linux VMs into Azure, and use integrated tools to replicate and migrate your VMs into production running on Azure.

 

 

Get Extended Security Updates until October 2026 along with upgrade rights to a supported Windows Server release if you’re migrating Windows Server 2012 VMs to Azure.

 

Azure expert, Matt McSpirit, gives a quick overview of how to migrate your VMware virtual machines to Azure.

 

Discover VMs and assess them with Azure Migrate.

See how to move your on-prem workloads to the cloud.

 

Build a Business Case and reduce cost.

Recommendations to minimize cost, total cost breakdown & estimated savings, adjust assumptions and export details. Get support for your migration plan with Azure Migrate.

 

Create an assessment to migrate VMs into Azure.

Assess as many servers needed for bulk migration, and create multiple assessments. How to migrate VMware virtual machines to Azure.

 

Watch our video here.

 

QUICK LINKS:

00:00 — Introduction

00:31 — Prerequisites

01:12 — VM discovery

03:15 — Discovered servers

04:12 — New business case assessment

05:55 — Create an assessment to migrate VMs into Azure

06:54 — Replicate VMs into Azure

08:35 — Run test migrations

09:14 — Migrate VMs into production

09:47 — Wrap up

 

Link References:

Set up permissions in Azure at https://aka.ms/VMwarePrereqs

Details to migrate complete VMware environments and run them in Azure at https://aka.ms/AVSmechanics

For expert migration help go to https://azure.com/AMMP

 

Unfamiliar with Microsoft Mechanics?

As Microsoft’s official video series for IT, you can watch and share valuable content and demos of current and upcoming tech from the people who build it at Microsoft.

 

Keep getting this insider knowledge, join us on social:


Video Transcript:

-Coming up, if you are looking to moving your on-premises VMware or Hyper-V workloads to the cloud, I’ll show you how Azure Migrate helps you discover and assess your VMs, generate a business case for moving your Windows and Linux VMs into Azure. How the integrated tools can replicate and migrate your VMs into production running on Azure. And by the way, if you’re migrating Windows Server 2012 VMs, moving those to Azure gives you included extended security updates until October, 2026, along with upgrade rights to a supported Windows Server release. So let’s get started. There are a couple of prerequisites you’ll need in place before you begin.

 

-First, you’ll need an Azure subscription. Then you’ll need to make sure that the right permissions are set up in Azure so that your virtual machine logs can be sent to the cloud and then replicate VMs into Azure storage. You can find more guidance on how to set this up at ak.ms/VMwarePrereqs. Since I’m going to be using vSphere let me first show you the VMs we want to migrate into Azure. You’ll see I’ve got a number of VMs that I can migrate individually or as part of a bulk migration. In our case, we’re going to follow this Windows Server 2012 VM here prod SQL VM 13 to show the entire process from start to finish. So now that you’ve seen the starting point we’ll actually start the process with VM Discovery to find data about VM specifications, apps and workloads running on the servers and any dependencies.

 

-So I’ll start in the Azure portal and I’ll search for migrate, which takes me to the get started experience. And you can see there are options for servers, databases, VDI, web apps, and data box. Now for this scenario I’ll click on Discover, Assess, and Migrate. Now I’ll create a project and to speed things up I’ve already filled in the standard details and project name and I’ll hit create. From here, you can choose from multiple assessment tools but I’m going to stick with the default and choose Discover.

 

-Next, I can select between VMware, Hyper-V or whether I want to migrate physical servers or from other clouds. So I’ll choose VMware. Now I’ll name my appliance Mechanics and by hitting the Generate key it’s going to create a unique identifier string as a project key that I’ll use later with the Azure Migrate appliance so it can communicate the discovery details to Azure. From there, I can choose from appliance VM .OVA file or .zip with everything needed to use an existing Windows Server 2016 or newer VM already running in your VMware environment. So I’ll choose the .zip download to install on an existing VM. So now I have my Windows Server VM open running in my VMware environment, and I’ve copied the .zip file to it and extracted that to a folder. And I’ll run AzureMigrateInstaller.PS1 at Elevated Privilege which configures the VM for discovery and assessment. Once the script is complete you’ll see this Appliance Configuration Manager shortcut on the desktop, selecting it’s going to take you to a tool which runs in the browser.

 

-Once connectivity with Azure is established and the time is in sync, I can paste in my project key from the step before and log into my Azure account. From there in order to get configuration and performance data, I need to connect to the vCenter server. So I’ll enter its IP address and leave the port as 443. Now for the purpose of this demo, I’ve already added my vCenter server account admin, as well as my Windows and Linux machine credentials to save some time. But for reference, you would do that here by selecting credential type, friendly name, username and password, and save when finished. And from that point, you’ll be able to start discovery. Depending on the number of servers you have and which workloads they’re running, this can take up to 24 hours to run. So we’ll speed this up a little and let’s switch back to Azure Migrate in the Azure portal.

 

-And now with the project open, you’ll see that it’s discovered all of our servers both Linux and Windows servers can be migrated into Azure using this approach. And in fact, I can click into discovered servers and see the details for each VM. So there’s our Windows Server 2012 VM from before and back at the top level view, I can see the number of servers running SQL along with web servers, OS distribution and dependency analysis. Importantly, while I’ll be demonstrating moving from virtual machines on-prem to virtual machines in Azure, these tools can also be used to migrate SQL database VMs into PaaS databases or managed instance databases. And your web app servers can be migrated to cloud native containers. Also, web app server code can be migrated from your VMs into the Azure App Service, so you have options to modernize your service architecture as you migrate.

 

-Next, another capability to be aware of is the new business case assessment to evaluate your move to Azure, which is critical as many of us are looking to reduce costs. To get started in discovery and assessment I just need to click build a business case, give it a name. I’ll paste one in, choose the target Azure location. So I’ll choose south central US. Select the migration strategy and get recommendations to minimize costs to migrate to IaaS or migrate to PaaS. But I’ll keep the recommended approach. I can also select savings options with reserved instances and savings plans. Now if you have an average percentage discount, you can also input that here. Now I’ll confirm and build a business case and this process is going to take a few minutes to complete.

 

-Once it’s ready, you’ll see the estimates derived for total cost of ownership or TCO. And here I can see my cost breakdown and estimated savings are 585,000 US dollars or 40.2% year over year estimates with savings that use your existing on-premises licenses using Azure Hybrid Benefit, and in my case totalling just over 102,000 US dollars for Windows and SQL combined. Then discovery insights gives you more details on utilization and whether any servers can be decommissioned, along with a breakdown of workloads.

 

-I can drill into the details for the TCO estimates where it lists out compute and licensing, storage, networking, labor and facilities costs. There are also detailed breakdowns for Azure IaaS. You can find more information with cost estimates savings by VM type and storage costs and I can adjust the assumptions based on my true calculated costs for my on-prem servers and licensing. Then for Azure costs, you can adjust year over year cost modeling based on how long you estimate the migration will take along with other attributes. Importantly, these details can be exported and you’ll use the final values to help get broader support for your migration plan. Next, you can create an assessment to migrate as many VMs as you want into Azure. Since we’re keeping things simple, I’ll just stick with my Windows Server 2012 VM. So under assess, I’ll choose Azure VM. I’ll keep the defaults and I’ll give it a name, MechAssess and a new group MechGroup. Now I’ll search for my VM and there it is, and I’ll select it.

 

-Now at this point, I’ll create an assessment for this server to make sure everything is ready and get corresponding VM and storage recommendations. Of course, you can assess as many servers as needed for bulk migration and do everything for multiple servers in one assessment. You can also create multiple assessments as needed. And in fact, I’ll click into the assessments that have already been run. It’s already filtered on my assessment MechAssess. And when I look into the details you’ll see that our server is ready for Azure with a monthly cost estimate for compute and storage. In Azure readiness, I can see the recommended size is standard D2as V5. And you can find granular details for every virtual machine and service configuration along with corresponding costs. And once we’ve confirmed our server is ready to migrate, the next step is to replicate it into Azure. Again, this is another operation you can do in bulk with up to 500 servers per replication group.

 

-So back in the servers, databases, and web apps overview blade, I’ll start by replicating our server. So here I can specify my intent for what I want to migrate, VMs esp.net web apps or Java web apps on Apache Tomcat. So I’ll stick with servers or virtual machines and keep them migrate to destination as Azure VM. After I continue, I can select my VM platform. Again, there are VMware, Hyper-V and physical options. So I’ll choose VMware, vSphere, and my appliance. And in the virtual machines tab I’ll keep the defaults and select my server.

 

-Next, I can choose my target settings. So I’ll choose my subscription, region, resource group where my VMs will reside, post migration, then my vnet and subnet, so my VMs can communicate once they’re migrated. And I’ll choose the hybrid benefit since I have an eligible license and confirm. In compute, I can see the target Azure VM is automatically populated using the assessment recommendations from earlier. And if you want, you can also change the Azure VM size. I’ll keep the defaults for the rest. And in disks we can choose which disks to replicate from my VM. I’ll keep both selected.

 

-Next, I can choose to tag the replicated resource. And in the review and start replication tab I can kick off the replication process. Now, depending on how many VMs and their size, the replication process time will vary. You can monitor progress from the Azure migrate portal. So here you can see our servers replicating and the process will create a VM snapshot, then replicate from that snapshot into our defined Azure managed disks. After the initial replication, the process will make delta replications to keep everything in sync.

 

-Next, you can run test migrations to ensure that everything works as expected. So in the servers, databases and web apps overview blade, I’ll select test migration. From the replication view, I’ll choose VM. And from there, test migration again. Now I just need to make sure the right virtual network and NIC configurations are set. So I’ll choose my NIC, then my subnet. And this last confirmation starts the test. Once the migration finishes the migrated virtual machine will be running in Azure in the resource group specified earlier and you can see it here with my other Azure virtual machines with its name and the hyphen test suffix. To be clear, the source VM is not affected by the migration process, so it’s still running. And now our migration’s been verified.

 

-The last step is migrating the VM into production, back in the servers, databases and web apps overview blade, I’ll select migrate. Now it’s going to prompt me to shut down machines before migration to minimize data loss. Everything’s running now, but once it completes I’ll be able to click on the ellipses here and choose complete migration which will stop all replication activity. From there you need to perform any post migration configurations such as updating host names or IP addresses and cut over traffic to the migrated Azure VM. And that’s it.

 

-So that was a quick overview of how to migrate your VMware virtual machines to Azure. While I showed you how you can move individual Vms, there’s another option to migrate complete VMware environments and run them in Azure. See ak.ms/AVSmechanics for details. And for expert migration and modernization help, you can contact Microsoft engineers and migration partners from the Azure Migration and Modernization program at azure.com/AMMP. Thanks for watching.

Updated Jul 19, 2023
Version 1.0
No CommentsBe the first to comment