Microsoft Subnet An independent Microsoft community View more

Understanding and Implementing Microsoft Azure Virtual Machines

Building Hyper-V Guest Sessions in Microsoft's Cloud

For organizations looking to "go to the cloud", as much as Microsoft has had Azure Services that allows orgs to rewrite their apps and host them in the cloud, this new Azure Virtual Machines actually allows you to build a full blown Windows 2008 or 2012 Virtual Machine (VHD) in the cloud so you can load up whatever apps you want on the server.Azure Virtual Machines is still in beta and I believe the formal release time is Spring to Summer 2013, however it is available for IT Pros to setup an eval account, build whatever you want, and get a chance to fiddle / experience this new VM in the cloud.It’ll take you about 30 minutes max to get a system running in the cloud, and since Microsoft is providing free evaluation of Azure VMs right now, it doesn’t cost anything nor is it difficult to setup at all.  To create an Azure Virtual Machine, do the following:1)    Create a dummy Live.com account that you can associate your evaluation to (you can use a real email address, but for a throw away test, just create an account so that when you are “done” you are done) – http://www.live.com http://www.windowsazure.com/en-us/home/features/preview/

2)    Go to the Azure Trial page and “Try Now” on the Azure Virtual Machines

3)    “Sign-up” for Azure Virtual Machine with your contact info, and they do ask for a credit card#, you can use a Visa gift card, or if you remember to just “cancel” the account when you are done (and within 90-days), they won’t charge anything to your card.  Note: And I have confirmed, if you exceed the trial limits as I accidentally did on my first trial account, they will “shutdown” your trial and deactivate the trial as opposed to charge you anything, so I have confirmed that they will not charge the credit card during the trial.

4)    In the Azure “Portal” click on the Virtual Machines tab

5)    On the bottom left of the page, click the +NEW button to create a new VM, choose Virtual Machine / Quick Create

     a.    For DNS name, give it a name you want your VM to be known as (ie: RandsWebTest)

     b.    Specify which OS you want (Win2008, Win2012),

     c.    Give your VM a password (this will be the administrator account password as well as your remote RDP access password to the VM)

     d.    For Size, choose a 1-core, 2-core, 4-core, or 8-core guest session (you get 10-cores to use however you want in the trial, so you can make 10 1-core guests, or a single 8-core and single 2-core, however you want to splice up your core (you can change the core settings later just by going back to the config page and up’g or down’g the setting (and then the guest session reboots when you change the core settings))

     e.    For location, specify where you want your VM to run (typically out of the West or East coast datacenters)

6)    Click Create Virtual Machine (this takes about 5-10 minutes for it to create the VM before it is available).  You can view the status on your http://manage.windowsazure.com page that your VM is “starting” or “running” or “stopped”.  Even when it says running, some times it takes an extra couple minutes before you can remote into it

7)    When the VM is “running”, at the bottom of the Azure page, click CONNECT and it’ll launch an RDP guest session that’ll allow you to remote into your VM.  Enter in the password you specified in the previous step

8)    You will have a full blown Windows server ready to do whatever you want.  If you want to do something really really simple, just add the IIS/Web Server “role” to the server.

9)    Once IIS is installed on the server, test to make sure that the Web Server is working (open up IE on your VM guest and type http://localhost and you should get that Windows IIS page that shows its working

10)    Once you know your server is working “internally”, now you have to get Azure to open up the external port to access you server.  To do so, when you are on your http://manage.windowsazure.com management page for the VM, click on ENDPOINTS

11)    On the Endpoints page, click the +ADD ENDPOINT (at the bottom center of the page), choose add endpoint, specify TCP Public Port 80 / Private Port 80 to let HTTP traffic pass through to your guest VM

12)    Click the checkmark to save the EndPoint setting (it takes about a minute to set)

13)    Then from an external system, type http://{External IP Address of Guest}, in my example it’ll be http://168.62.8.83 (the IP address shows on the “manage.windowszure.com” page per the screenshot below.

You can get fancier like setup AD on the guest session, load up SharePoint, and have a full blown SharePoint server in the cloud.  You can also setup a Site to Site VPN between your Azure guest and your home AD so that the server in the cloud is a domain member of your home AD.  You can load up Exchange 2013 and test Exchange in the cloud.  Basically ANYTHING you can normally do with a virtual guest session, you can do with Azure.  Key is to make sure to open up the ports so that the guest session is accessible externally for whatever you want (ie: Port 443 if you want Exchange accessible externally, etc…)Note:  Okay, as for the free trial, as much as they will allow you to create up to 10 cores of guest sessions and save them, you still have to fit within the limits of the Azure trial which also includes 750 compute hours and 35gb of disk space.  A “compute hour” is basically 1 core running for 1 hour.  If you actually RUN a 1 core guest session for 31-days at 24-hours a day, you will burn through 744 compute hours.  If you run a 4 core guest session, you will burn through your 750 free “compute hours” a month in just under 8-days (24hrs/day x 4 cores = 96 compute hours a day, or effectively 7.8 days you’ll burn through your free 750 compute hour allotment.  The lesson I learned was I fired up 4 guest sessions, a couple with 4 cores, a couple with 2 cores, and within 3 days Microsoft shutdown my Azure account without an explanation.  I opened an incident with Azure support, which they got back to me within 2-hours and politely informed me that while they gave me 10 cores to fiddle with, the minute I turned on ALL of my beefy guest sessions and was running them, I burned through that 750 compute hour a month free limit in 2 days…  AND, during the free trial, when I ran out of compute time, they actually deleted my VMs (something they said is standard procedures because a lot of people fire up guest sessions and then forget about them, so rather than having them run or take up space, they delete the eval guest sessions).  So, lesson learned, turn on, fiddle, turn off your guest session.  If you want to turn on and run continuously, then expect to ONLY run 1 core guest session that’ll burn through 744 of your free 750 compute hours in a month and you'll be able to run that 1 core guest session continously with no interruption during your 90-day free trial period.Note:  Same thing with storage, you are only give 35gb of free storage, so if you try to load up a bunch of stuff, remember the total usage of all of your guest sessions needs to be under 35gb, or they will (presumably) disable your account as well for going over usage allotment.Azure VMs are pretty slick though, slick enough that I put my company Website up on Azure (http://www.cco.com) is running off Azure VMs!  I’m ONLY running that 1 guest session, getting some good metrics and admin support experience with that guest running, costing me nothing, good learning vehicle.  When Azure goes live and I have to pay for Azure VM for my site, the cost will come out to $57.60/month which is the flat rate they charge to run a 1-core guest session per month.  There is a cost on storage, which I've calculated to be less than $1/month to that fee.  But still, cheap…Specific to calculating your cost is to do the following:To find out your usage, do the following: https://account.windowsazure.com/

14)    The IIS/Web will be accessible externally

1)    Setup the Virtual Machine in Azure and run it for a couple weeks (I’m sure there’s a more elegant way of doing the calculation, but nothing like actually setting it up, getting actual data back, and then running that data through a calculator).  So what I did was setup my company Website and ran it for weeks)

2)    Once you have some data behind you, you can DUMP the data (compute, storage, etc) that makes up the calculation for billing

3)    Take your data, multiply it by the billing factors, and you have a good estimate on monthly cost.

1)    Logon to your Windows Azure Account: 

2)    Click on Subscriptions (in the upper left) and then click on “3-Month Free Trial” (or if you are actually a paid customer, it’ll note you are a paid customer)

3)    When you click on the 3-Month Free Trial subscription, you’ll get a dashboard that’ll show you total usage.  Since I only have ONE guest session in Azure and ONLY running that one guest session, my metrics of usage is actually 100% of my actual usage.  The dashboard looks like the following: 

http://www.windowsazure.com/en-us/pricing/details/ which in a nutshell for VMs, it calculates:So for my www Website, we’re looking at about $82.80 + .77 + .03 = $83.60 a month which includes the Microsoft Windows license.Do note, Microsoft is offering a volume discount, 6-month commitment discount, and pre-payment discount, so if you plan to spend as little as $500/month (which is only about 5-6 running VMs), you can get 20% off if you commit that rate for 6 months.  You can get an additional 2.5 percent discount if you purchase a 12-month plan and another 2.5 percent if you elect to pay for your entire commitment up-front.Monthly commitment    Discount on 6-month planOf course the pricing and details "may" change before this all goes general availability later this year, BUT again, if you want to fiddle with Virtual Machines in the cloud, this is a GREAT way to experience hosted Hyper-V without paying a penny for it!

In my case, you can see from 8/18 thru 8/31, I used 48 compute units, currently storing 6.17GB of stuff, have had 134 storage transactions, and have had 1.98gb of data transferred out.

4)    If you have multiple VMs stored or running, then this dashboard is a compilation of everything you have and is not as useful “per session”, so what you can do is dump an Excel report that shows all of the stuff that you can then sort the report and key in on specific VMs.  To dump a report, at the bottom right of the summary page is a “Download usage details (CSV)” which will allow you to dump out the raw stats to a spreadsheet file

5)    Open up the spreadsheet and sort by VM and you’ll get information about Compute, Storage, Transactions, etc.

6)    To calculate your cost, use the pricing details Microsoft provides up on

a.    “Compute”: Cost is the # of hours your VM is running, so if your VM is not running, just saved, then you don’t incur compute costs, just storage costs.  When you turn on your guest session, then the compute clock runs.  The cost is charged “per hour” of run time, so in a month, that’s 24-hours a day, 30-days a month, so comes to about 720-compute hours if you run a guest session non-stop all month.  The costs are:

In my case, I was running a “small” VM instance, so in the beta/preview, they’d charge me (if they charged me) .08/compute hour (which 720 hours in a month), that comes to $57.60 a month.  When this goes General Availability, they’ll charge me .115 per compute hour, or $82.80 a month.  If I setup a 4 core “large” VM configuration with 7gb of RAM, then they’d charge me .46 per compute hour, or $331/month to run the VM.  The Windows price per hour INCLUDES the cost of Windows licensing, so you don't even have to buy a $500 copy of Windows, that's included in the cost!

b.    “Storage”:  Azure also will charge you based on the amount of GBs of your usage.  Their storage costs break down as follows:

So in my case, I’m using 6.17gb of storage, with Geographically redundant rate of .125 per GB per month, so if/when I have to pay for this, my storage cost is 77-cents a month on top of the $82.80/month VM cost, cheap!

c.    “Storage Transactions”:  There’s also a cost for “storage transactions” at 1-cent per 100,000 transactions, which in the 2 week period that I was tracking I had 134,000 storage transactions, so figure in a month that’ll be about 300,000 storage transactions, or 3-cents a month for that component.

$500 to $14,999                     20%

$15,000 to $39,999                23%

$40,000 and above                 27%

Join the discussion
Be the first to comment on this article. Our Commenting Policies