If you’re a developer, consultant or simply want to build Proof of Concepts…it’s most likely that you’re playing around with Azure VMs for a reason. One might be…we want to turn my POC into a real product…I might be building this for a client, and now I need to switch it from my MSDN to their Pay-as-You-Go Subscription…the list goes on. If you’re new to Windows Azure, or specifically to Windows Azure Virtual Machine Preview Feature, there are a number of things you’ll unfortunately be learning the hard way. The goal of this entry is to bring together some of those Gotchas in the hopes it saves you some time, trouble and frustration. Everything you see in this may and most likely will change by the time the services rolls out of Preview and into Release…so take it as a moment in time.
Landmines to Avoid (a.k.a. Best Practices to Follow when Creating & Using Azure Virtual Machines)
Issue: There are Limits to MSDN-based Azure Benefits:
There are differences between creating a VM under your MSDN Subscription’s Azure Virtual Machine Preview Subscription vs. a Trial or Pay-As-You-Go…just know this and read the differences!
Issue: Don’t Create a VM under an MSDN Azure Account if you want to “Move It” to a Paid Account later on!
There is a way to “move” virtual machines after the fact, which I will cover, but you will save yourself a lot of work and definitely a lot of time if you follow this simple tip. It is better to “play around” with Virtual Machines on your local machine, and once you have something that is somewhat ready to use (ie everything’s installed….NOW I want to start developing against it; or we’ve been developing and NOW we want to move it into the Azure management umbrella etc. etc.), then upload the VHD as a Page Blob to Windows Azure. I’ll cover the workaround below if you’ve already found yourself in the dilemma of waking up and being out of hard drive space on the OS disk, drive C, and are trying to figure out how to make it bigger so you can actually start using it productively 🙂
Resolution: if you already have a VM in Subscription #1 and want to move it to Subscription #2
If you already have a VM in either your MSDN or Trial Subscription and for some reason you want to move it to another one, I’ve compiled the steps in this document.
Issue: Want more than a 30 GB C drive? Create your own VHD offline, prepare & copy it to Windows Azure instead of using the Wizard
If you want the VM’s OS Drive (Root C Drive) to be larger than 30GB (which is pretty much always) it is best to create the VM in your own environment, prepare it for WIndows Azure, and upload it as a PAGE BLOB to your Azure Storage account. If you weren’t warned or just dove in head first and already woke up to a useless VM because the C drive is full…don’t bother asking if you can resize it using your Azure Management Tools…the answer will be no. Simply bite the bullet and refer to the Resolution listed below and PDF that I’ve attached.
Resolution: if you’re already out of HD space on the OS C Drive: If you’ve already created a VM, discovered some of the limits, like running out of hard drive space on drive C, attached in the PDF file are the steps to get out of the situation.
These tools will ask you for a Management Certificate, and if this is the first time you’re encountering this, you’ll be wondering what the heck to do. It’s pretty simple and you can follow the instructions below to make it happen. Basically, you do the following:
- Generate a Certificate on your local machine
- Upload the Certificate to the Windows Azure Subscription you want to manage
- Add the Subscription to the Cloud Management Tool using the Certificate you just uploaded to Azure