Building a Lync 2013 lab on Windows Azure – Notes from the Field

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:

image

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.

Current Portal:

image

Preview Portal:

image

So what those $100 give you?

To answer that question, the easy way is to show you what I’ve built so far:

image

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

image

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:

  1. Log on to the Management Portal.
  2. In the navigation pane on the left, click Settings, and then click Affinity Groups at the top of the page.
    image
  3. 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.
  4. On the Specify affinity group details page, enter the following information, and then click the check mark.
    1. Name: Enter a name for this affinity group.
    2. Description: Enter a description for this affinity group.
    3. Region: Select the region where this affinity group is to be located.
      image
  5. Click the checkmark. Once your affinity group has been created, you can view it on the Affinity Groups page in the Management Portal.
  6. 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:image
  7. 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.
    Untitled
  8. 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:
    image

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:

  1. 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.
    image
  2. The second option is using any Remote Desktop application (mRemote, Royal TS etc.) and configure the Virtual Machine Remote Desktop Public port:
    1. The port information is located in in the Endpoint tab under the Virtual Machine Configuration page:
      image
    2. 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:
      image
    3. Once we’ve got the information we can configure it as following:
      image

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 resourcesimage

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:

  1. Enabling my subscription on Windows Azure
  2. Creating the Affinity Groups
  3. Creating the Virtual Network and assign it to the existing Affinity Group
  4. Creating Virtual Machines and assigned them to the Virtual Network created
  5. Configuring Remote Desktop for connecting the Virtual Machines
  6. Promoting one of the server to be Domain Controller and set up a dedicated domain (followed those guidelines)
  7. 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)
  8. Installing Exchange 2013 on one of the virtual machines
  9. Installing Lync 2013 on one of the virtual machines (please read the section below in order to complete this step)
  10. 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.

I started installing the Lync Environment as following:

  1. Prepared the Active Directory Schema for Lync 2013 – Successful
  2. Installing the Lync 2013 Admins Tools – Successful
  3. Preparing the first standard edition server – Successful
  4. Install or Update Lync server system – Successful
  5. Step 1: Install Local Configuration Store – Successful
  6. Step 2: Setup Or Remove Lync Server components – Failure
  7. Step 3: Create and Assign Lync Certificates
  8. Step 4: Start Lync Services
  9. Install Lync 2013 latest Cumulative Update
  10. 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.

I then decided to do some more research on the problem, luckily I found the following article by Marc Terblanche which describe the exact same problem.

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:

image

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:

Once that command was completed successfully, I could proceed with Installing Lync in my environment and verify the client are able to connect successfully:

image

19 Comments

  1. Paul Bloem

    Thanks Guy,I got held up on step 2 and parked my azure lab until I had time to take another peek. Now I don’t have too 🙂

    Reply
  2. turbomcp

    Thanks
    where do you get the installation files from? they are also in azure?

    Reply
    1. Guy Bachar (Post author)

      Depends on the applications.
      SQL and SharePoint for instance has a build-in template for Azure so you don’t need the installation files.

      But for Lync and Exchange i used the 180 trial Microsoft are offering.

      You can also download the installation files from your MSDN Subscription or Volume License site if you have any, as the computers has internet access.

      Reply
      1. turbomcp

        Thanks for the quick reply guy
        Toda

        Reply
  3. Paul Bloem

    in Step 7. pointing the servers to your AD (DNS), this can be done on networks under DNS Servers. Probably best done this way or else the set DNS is dropped every time you reboot a server.

    Reply
    1. Guy Bachar (Post author)

      That’s a great feedback, thank you Paul.
      I will edit the post and add that.

      Reply
  4. Pingback: Weekly IT Newsletter – May 19-23, 2014 | Just a Lync Guy

  5. Pingback: NeWay Technologies – Weekly Newsletter #96 – May 22, 2014 | NeWay

  6. John Kreis

    Thanks so much for this guide! I sat down this weekend and created your setup very easily. Couple of questions / points I’d like to pick your brain on if you don’t mind. You’ve got the SQL Backend database, but then you stated that you set up a Standard Lync server. Was wondering why? Also, I ran into the same issue with the Host Cache on the disk when trying to install the database to the SQL server in an Enterprise deployment. What was interesting about it, was that all the databases, with the exception of the RTCBackend databases got created. What I did which was suggested on another site, was to create a large second disk, with the No Cache feature, and run the Install Database thru topology builder, and then it saw the largest disk, and automatically installed to there and that resolved my issue.

    Also, you have both a Web Apps server, and Web Proxy server listed. I figured out how to install the Web Apps, and get it working, but I’m not sure what you are using the Web Proxy for in this configuration?

    Also, is there any way to add an Edge server in Azure? From what I understand, there isn’t. Just figured I’d ask! Thanks again!

    Reply
    1. Guy Bachar (Post author)

      Hi John, thanks for the feedback, i’m glad to hear it helped.

      I did initially tried to install an Enterprise Edition so that’s why i had the SQL server ready, but after having the issue with the CACHE i thought i might had something misconfigured so i decided to try and install the STD edition, to realize eventually it was the CACHE setting which was the issue.
      Creating another disk and set it with No Cache is what i did eventually on the STD server as well, but it should work exactly the same for the Enterprise SQL Server.

      As for the Web Proxy, i just installed the server in order to create another post on how to install and configured it for Lync, i haven’t had a chance to do that so far 🙂
      The EDGE server is not supported according to my knowledge mainly best you can’t have a dedicated server with two different networks configured as DMZ / External networks.

      Reply
  7. John Kreis

    Oh, I had to install another disk for the local CS store database on the Enterprise Front end as well. I would have given up had I not found your article! Can’t wait to read about setting up the Web Proxy!

    Reply
  8. Pingback: Lync on Azure | UC Road Map

  9. Ernest

    It appears that as of Oct 2014 Azure VMs can have multiple NICs so would be curious if someone was able to also install an Edge Server on Azure which needs 2 NICs.

    http://azure.microsoft.com/blog/2014/10/30/multiple-vm-nics-and-network-virtual-appliances-in-azure/

    Reply
  10. Rick

    How did you get all this inside $100? I make your servers A1 x 4, A2 x 3, A3 x 1 — A1 is $57 on its own!

    Reply
    1. Guy Bachar (Post author)

      I’m not keeping the machines on all the time, just for setting them up for testing purposes and then i’m shutting them down again.
      I agree it’s far from idle, but at least it allow you to run some tests.

      Reply
  11. Paolo

    thanks for the info. Just want to ask if the lync Telephony Solution is working in your set-up

    Reply
    1. Guy Bachar (Post author)

      I havn’t tested any Telephony Solution in my Azure lab as EDGE wasn’t available that time due to networking issues.

      Also, Microsoft are planning enabling Hybrid voice and also Cloud Voice solution in the next couple of months so that could be another available solution.

      Reply
  12. Paolo

    thanks for the quick reply. do you think its possible? I’m planning to test that today. hope i won’t hit the wall.

    Reply
    1. Guy Bachar (Post author)

      Well depends what exactly you are trying to achieve, you need to get some valid public IP and set bunch of FW rules, i’m not sure Microsoft allowing all that in Azure just yet.

      Reply

Leave a Comment

Your email address will not be published. Required fields are marked *