A quick look at Windows Azure IaaS
I played around a bit with Windows Azure IaaS to see how it stacks up against Amazon EC2. We use Amazon EC2 internally for some test and demo setups that don’t always have to be running.
As a practical test, I wanted to install a Windows Server 2012 domain controller in a subnet of my choice. It turns out that getting started is pretty simple. The rest of this post presumes that you have a Windows Azure account with the Virtual Machines Preview activated (go to
to get started).
You can manage virtual machines from the new management interface at
or with Windows Azure PowerShell (
). This post will not use Powershell. Sorry!
The first thing I did was to create a new virtual network which also lets you create an affinity group. Affinity groups allow you to have some control over the location of components like storage in order to reduce latency for instance. To learn more about affinity groups, take a look at
. Note that there are other ways to create affinity groups, but it’s easy to do when you create your virtual networks. I will not bother you with the details of creating the virtual network and just show the end result. I created a virtual network with two subnets: prod and dev.
The details for the subnets can be seen when clicking Configure:
Note that there is more you can configure here. You can specify DNS servers that will then be handed out to your VMs using DHCP. In addition, you can configure a connection to your on-premises network using a site-to-site VPN solution.
After the networks are configured (including the affinity group), it’s time to create a storage account. Storage accounts are not new in Azure and are traditionally used to store BLOBs, tables and queues. The virtual machine disks you create (or that will be created automatically as an OS disk) will actually be stored in BLOB storage. I created the following storage account:
During the creation of the account, you will be asked for the affinity group. You see that reflected above in the location property. Note that you can actually take a look inside the storage account with a tool like Azure Storage Explorer (
). After adding your storage account using the name and the key (you can get that from the old portal), you will see:
Above, you see the boot disk of a virtual machine of 30GB. Files in BLOB storage have a maximum size of 1TB so VHDs are also limited to 1TB. Depending on the VM size, you can add additional disks of 1TB to a VM. The maximum amount of disks you can add today is 16 and you can stripe these inside the VM to a 16TB volume if required.
Now we have our network and storage defined, we can create a virtual machine. It’s important to note that you should create the virtual machine with the From Gallery option to be able to specify all the necessary settings such as the network:
When you click From Gallery, you will get a wizard with the following questions:
- OS selection: Windows Server 2008 R2, Windows Server 2012, CentOS, Ubuntu, …
- VM config: name, administrator password, size (from Extra Small to Extra Large)
- VM mode: here’s where you select the storage account and the network
- VM options: here you can select the virtual network subnets that this virtual machine should belong to
The virtual machine will then be provisioned and shown in the list:
Connecting to the virtual machine is easy with Remote Desktop and the Connect option at the bottom of the screen (with the virtual machine highlighted). The connection will not be made to the standard RDP port. Behind the scenes, every VM (or multiple VMs) live in a cloud service and each cloud service has an associated public IPv4 address. Each VM in the cloud service has an external port mapped to its RDP port. The external port is generated randomly but you can change it in the configuration of the virtual machine:
The cloud service’s IP address is automatically mapped to servicename.cloudapp.net so in the above example you would connect to servicename.cloudapp.net:50248 to connect to the virtual machine.
When you create your first virtual machine, you will not see the associated cloud service in the user interface. When you create another virtual machine and select to connect to an existing virtual machine in the VM options page, the cloud service will be shown in the UI:
The cloud service provides a view on the group of servers in the service. You can see the total amount of cores in the service, aggregated CPU utilization and more.
Now we have a virtual machine running, what about its IP address? Virtual machines are automatically assigned an IP from the range that was specified in the virtual network assigned to the virtual machine. If you specified your own DNS servers, these will be supplied as well. If not, Azure DNS servers will be assigned. It’s important to know that IPs should only be assigned through DHCP. Do not configure static IP addresses, not even one that matches the IP that was assigned. You should be aware that if your virtual machine were to fail (e.g. because of host failure), the same IP will be assigned although the MAC address will change.
Now that this is all sorted out, is there something we have to think of regarding the deployment of a domain controller? The answer is: absolutely! In short:
- Although you have always learnt to assign a static IP to a DC, forget about that now. Use the DHCP assigned address as stated earlier.
- Do not place the Active Directory DIT, logs and SYSVOL on the operating system disk but on an attached data disk. Data disks do not use “write-behind” caching it seems.
- Windows Azure today does not use Hyper-V 3 so the new VMgenerationID stuff in Windows Server 2012 is not supported.
Now how does Windows Azure IaaS stack up against EC2? I have not played around with it enough to know all the details and differences but this is what I found so far:
- Connecting to virtual machines using RDP and the concept of the cloud service and port mapping makes it easier to connect to virtual machines in a private virtual network. In EC2 you have to set this up yourself or use a Terminal Services gateway.
- Virtual machines seem to have the ability to connect to the Internet by default. In EC2 you need to assign an elastic IP or use some gateway solution inside the virtual private container.
- It is relatively easy to get started. The EC2 learning curve is a bit higher but there are more options as well so that evens it out.