Problem solve Get help with specific problems with your technologies, process and projects.

Making sense of Windows Azure's VM role

The new VM role for Windows Azure should be a boon for organizations looking to host their virtual machines in the cloud, but it’s not ideal for all situations.

Windows Azure now includes a Virtual Machine role that allows organizations to host their own virtual machines...

in the cloud.

Microsoft introduced this role as a way to ease the migration of applications to cloud computing. So instead of waiting until your code is “cloud-ready”, you can use this role to move applications to the cloud while refactoring old code.

Where the VM role fits within Azure
Windows Azure currently has three roles: Web, Worker and Virtual Machine (VM). The Web role is used for web application programming on Internet Information Services (IIS) 7.0, while the Worker role is basically for any type of process that runs in the background with a front-end interface.

The VM role is the newbie, and it uses a virtual hard disk (VHD) image of a Windows 2008 R2 server. The image is created internally on your network using Hyper-V technology and then uploaded to Windows Azure. This image can be customized and configured to run whatever software you would like to run in the cloud.

Before pushing virtual machines out to the cloud, however, it’s important to understand the pricing, licensing and perquisites involved. Any instance of a VM role is priced by the compute hour, and licensing of the role is included in the cost (see the table below).

Compute Instance Size CPU Memory Instance storage I/O performance Cost per hour
Extra small 1.0 GHz 768 MB 20 GB Low $0.05
Small 1.6 GHz 1.75 GB 225 GB Moderate $0.12
Medium 2 x 1.6 GHz 3.5 GB 490GB High $0.24
Large 4 x 1.6 GHz 7 GB  1,000 GB High $0.48
Extra large 8 x 1.6 GHz 14 GB 2, 040 GB High $0.96

Note:This same table can be found on Microsoft’s Azure Compute page.

All virtual machines are created using Hyper-V Manager on a Windows Server 2008 operating system, where R2 is recommended. You’ll also find that Hyper-V, IIS 7.0, Windows Azure SDK, ASP.NET are all required, with an optional install of Visual Studio 2010 also available. (More requirements for the Azure VM role are listed on MSDN.)

Where the VM role makes sense
So why would you want to implement the VM role? Well, let’s say you’ve done your due diligence and decided on Windows Azure as your cloud platform of choice. You are ready to move forward but have a lot of existing legacy applications that are written differently and may not work on the Azure platform. A rewrite of this code could have a lengthy roadmap even if you are utilizing agile programming. In my opinion, this is where the VM role should be used.

The VM role gives you complete control over the system where your code runs, so while you are rewriting code to work in Azure, you could also create and deploy customized VHD images to the cloud immediately. In other words, the VM role can be used to migrate an on-premise application to run as a service in the Windows Azure cloud.

Another ideal time to implement the VM role is when you aren’t sure if you want stay with Windows Azure for the long-term. What if you decide to change vendors? Windows Azure is a Platform as a Service (PaaS), which is simply a framework for developers to create applications and store data.

Basically, once you develop your product for Windows Azure, it runs on Windows Azure. But if your company takes a new direction and wants to leverage a different cloud platform from Amazon or VMware, guess what? You’ll have to recode because you won’t be able to move that application. The VM role acts as a bridge that connects PaaS with Infrastructure as a Service (IaaS); it gives Microsoft an IaaS platform and provides you with the portability to move vendors if a change of direction is needed.

When not to use the Azure VM role
While the use cases above make sense, to me a VM role in the cloud doesn’t seem like the best option for the long-term. For starters, if you push virtual machines to the cloud, you need good speeds to upload. So the bigger the VM, the longer that upload process will take. Secondly, Microsoft doesn’t maintain your virtual machines for you; you are responsible for patching and uploading the changes as a differencing disk.

When you look at it that way, maintaining a VM role for an extended period of time seems like a nightmare. Not only could the uptake be tremendous, but differencing disks are not my favorite virtual machine technology anyway as they are prone to corruption. Snapshot technology is much easier to deal with.

So while the Windows Azure VM role is good to have in the Azure platform, in my opinion it’s not a great long-term PaaS solution. What it can do is help bridge the gap while you are busy coding for a true Platform as a Service.

You can follow on Twitter @WindowsTT.

Steven S. Warren is a writer in Florida. His articles and blogs have appeared on websites such as, ZDNET,, SearchTechTarget, Datamation, and DatabaseJournal. He is the author of The VMware Workstation 5 Handbook and has held the Microsoft MVP award for 8 consecutive years. You can also find him on Twitter and LinkedIn.

This was last published in February 2011

Dig Deeper on Microsoft Azure cloud services

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.