Recently I got one of those marketing emails from Microsoft regarding Azure, I don’t know what was it that caught my eye but I decided to read it this time.
Surprisingly I found out that MSDN Subscribers or Microsoft Partners (MPN) gets up to $100 monthly credit for usage within Windows Azure.
At start I thought what those $100 could probably be useful for? Thinking it’s probably not even enough for creating more then 1-2 virtual machines.
You could imagine how surprise i was to find out those $100 were more than enough, as it allowed me to build a complete lab environment made out of 7-8 machines, up in the Microsoft cloud.
What does Windows Azure mean?
For those of you that are not familiar with Azure or what it stands for:
Azure is an open and flexible cloud platform that enables you to quickly build, deploy and manage applications across a global network of Microsoft-managed datacenters. You can build applications using any language, tool or framework. And you can integrate your public cloud applications with your existing IT environment.
Though it’s sounds as Azure is mostly for developing your application, it contain an on growing list of different solutions available for usage:
The Windows Azure model is very similar to the Office 365 (Actually, Office 365 is based on Windows Azure as well), and you can choose from a variety of billing plans depends on your license model and needs.
Managing the Windows Azure is done from the Azure Portal (Which by the way should change in the near future as it’s currently in the preview stage). The portal is pretty intuitive and it is very easy to operate and navigate. you can also add multiple users for access, set alerts and notifications for each and view your billing status.
So what those $100 give you?
To answer that question, the easy way is to show you what I’ve built so far:
The picture bellow also showing what are those within the $100 limit per resources available and how much more credit I got left.
- Please note that if you need more resources than what’s offered you can contacts Microsoft support
As you can see, it’s pretty impressive, I could build an entire lab which consists of the following servers:
- Domain Controller (2GB, 1 Core)
- Lync Front End (8GB, 4 Cores)
- SQL Server (4GB, 2Cores)
- Exchange Server (4GB, 2 Cores)
- Office Web Apps Server (2GB, 1 Core)
- Web Application Proxy ( 4GB, 2 Core)
- 2 x Desktops (2GB, 1Core)
As for the actual billing, the easiest way to calculate the estimated monthly fee is by using the Microsoft Windows Azure Calculator.
Another great option Microsoft providing is the ability to set spending limits when no more credit remain in the account in order to avoid any unplanned billing.
Starting building the environment
The nicest thing about Windows Azure and the Virtual Machines solution, is that Microsoft allow you to get the latest and recent OS available on the market, so you can play with built-in Windows Server 2012 R2 Servers images and also you can choose deploying Servers which includes Application templates such as SQL, SharePoint etc.
A few tips for those of you who planning building their own Lab in Windows Azure with Virtual Machines:
- Windows Azure lets you create your own Virtual Networks, those can be used for creating your lab with different subnets, VLAN’s etc. it can even be used to connect the Windows Azure platform to your on-premises network via different VPN solutions Azure is offering (Site-to-site VPN and Point-to-Point VPN)
- If you decide you want to build your servers on a dedicated network subnet, you need to create the network prior to the Virtual Machines creation, otherwise it cannot be assigned or allocate to existing virtual machine as the network assignment is done during the provisioning phase.
- A virtual network must be placed within an affinity group.
- Affinity Group – a way to tell Windows Azure to allocate all of your designed resources (Disks, Virtual Machines etc.) within the same logical and physical groups.
- If you plan to create a virtual network by using the Custom Create wizard in the Management Portal, you can create an affinity group within the wizard. You don’t need to create it beforehand. If you do select an affinity group that you already created, make sure that it’s associated with the region where you want your resources (VMs and PaaS instances) to be located.
- You can’t change the region associated with an affinity group after you create it.
In my case, I wanted to create my own network for putting all of my virtual machines within one dedicated subnet so they can communicate with each other on the same network.
To do so, I had to start with creating the affinity group:
- Log on to the Management Portal.
- In the navigation pane on the left, click Settings, and then click Affinity Groups at the top of the page.
- On the Affinity Groups page, click Add at the bottom of the page. If you are creating the first affinity group for this subscription, you can click Add An Affinity Group.
- On the Specify affinity group details page, enter the following information, and then click the check mark.
- Name: Enter a name for this affinity group.
- Description: Enter a description for this affinity group.
- Region: Select the region where this affinity group is to be located.
- Click the checkmark. Once your affinity group has been created, you can view it on the Affinity Groups page in the Management Portal.
- Once the Affinity group was created, I had to create my own Virtual Network following this guide. The output of this guide should be similar to the following:
- A very good tip given by Paul Bloem is also to set the DNS servers for the virtual network, under the Virtual Network Configuration section.
Setting the DNS server ensure that it will be given to the virtual machines in the network automatically via DHCP and will save you time setting it up manually after each reboot / shutdown.
- After the network subnets were configured, I could start deploying my virtual machines using the following guide.
- Please note that in order to assign the virtual machine to the Virtual Network I created earlier, I had to choose the “FROM GALLERY” option and not the “QUICK CREATE” option:
I’ve the Virtual Machines created, how do I get in?
For accessing the servers we’ve just created, we can use one of the following methods:
- Under the Virtual Machines menu in the Portal, select the virtual machine you want to connect to and choose “Connect” from the footer menu, that will download an customize RDP file ready for use as it contains all necessary DNS names and Ports.
- The second option is using any Remote Desktop application (mRemote, Royal TS etc.) and configure the Virtual Machine Remote Desktop Public port:
- The port information is located in in the Endpoint tab under the Virtual Machine Configuration page:
- The Remote Desktop Public Port is the port required for remote desktop and the IP/Name of the server is mentioned under the Dashboard tab in the “Quick Glance” section:
- Once we’ve got the information we can configure it as following:
- The port information is located in in the Endpoint tab under the Virtual Machine Configuration page:
Once connecting to the virtual machine in any of the above methods, you’ll need to provide with the login credentials entered during the initial provisioning phase.
Once entered to the Virtual Machine you will notice Microsoft also added a script which run on each Virtual Machine and provide you with details about it resources
Building the Lab
Following the procedures mentioned above, I quickly created a whole set of Virtual Machines.
the following summarize the general steps i made to build up my environment:
- Enabling my subscription on Windows Azure
- Creating the Affinity Groups
- Creating the Virtual Network and assign it to the existing Affinity Group
- Creating Virtual Machines and assigned them to the Virtual Network created
- Configuring Remote Desktop for connecting the Virtual Machines
- Promoting one of the server to be Domain Controller and set up a dedicated domain (followed those guidelines)
- Joining all member servers to the domain (Requires to Manually set the DNS server and point it to the Domain Controller or a better alternative will be to set the DNS server settings under the Virtual Network Configuration to point to the Domain Controller IP in order to keep the DNS server setting for all virtual machines from being dropped on every shutdown/reboot)
- Installing Exchange 2013 on one of the virtual machines
- Installing Lync 2013 on one of the virtual machines (please read the section below in order to complete this step)
- Installing Office 2013 on two Client virtual machines
Houston, we have a Lync problem
Starting building the lab, I quickly managed to install both the Domain Controller and the Exchange servers and test it out using the two desktops clients virtual machines.
My problems began when I started Installing the Lync 2013 server, a task which I was well familiar with before and i didn’t think it would take me too much time to complete, mostly because it is a simple environment with only one Lync Front End deployed as a Standard version.
- Please note that Lync is not officially supported on Windows Azure as mentioned on Microsoft server software support for Windows Azure virtual machines, mostly because not all Lync servers can be deployed on Azure.
I started installing the Lync Environment as following:
- Prepared the Active Directory Schema for Lync 2013 – Successful
- Installing the Lync 2013 Admins Tools – Successful
- Preparing the first standard edition server – Successful
- Install or Update Lync server system – Successful
- Step 1: Install Local Configuration Store – Successful
- Step 2: Setup Or Remove Lync Server components – Failure
- Step 3: Create and Assign Lync Certificates
- Step 4: Start Lync Services
- Install Lync 2013 latest Cumulative Update
- Assign and enable Lync Users
As you can see, whenever I ran Step 2, the Lync setup would eventually fail due to timeout error while trying to install the local SQL Express Instance for RTCLOCAL
The error that was given in the logs was:
InstallDatabaseInternalFailure: An internal error has occurred while trying to create or update the database
Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
At start, I wasn’t sure what is the actual reason as i saw the files being generate and copied to the CsData folder, I was trying to use the manual commands as well (Install-CsDatabase –LocalDatabases) but it fail every time i ran it. I then tried installing the Local SQL Express my own but I got similar time out errors every time.
Apparently, the reason for the failure are because of the disk typs the virtual machines in Windows Azure are provided with:
Data disk drives do not cache writes by default. Data disk drives that are attached to a VM use write-through caching. Write-through caching makes sure the write is committed to durable Azure storage before the transaction is complete from the perspective of the VM’s operating system. It provides durability, at the expense of slightly slower writes.
The solution as mentioned was to add an additional disk to the Lync Server virtual machine and configure that disk with HOST CACHE PREFERENCE set to None:
Once the disk was added to the Server, I installed the Lync Database manually using the following command where L: is the new attached disk:
Install-CsDatabase -LocalDatabases –DatabasePaths L:CsData
Once that command was completed successfully, I could proceed with Installing Lync in my environment and verify the client are able to connect successfully: