Hopefully you took advantage of some of the ways in which Microsoft will allow you to try out Azure for free. I talked about 2 ways that are currently available in a previous post. Even if you are not currently getting a free subscription you may have landed here because you are looking to get started in Azure. In this post I am going to show you how to quickly jump in and get started using Azure and, in particular, building a Virtual Machine that will be a Domain Controller. This DC will be the foundation for a working lab in the cloud.
Once you have your account set up the first thing you want to do is head over to the management portal at manage.windowsazure.com and log in. Once you have successfully logged in to the portal you are almost ready to start building your first virtual machine. You will first need to create a Storage Account within Azure that will hold the VMs.
An Azure Storage Account is necessary and provides a unique namespace for storing your resources including Blobs, Tables, Queues, and File Storage. I won’t bore you with all the details but in case you are interested you can read more about Azure Storage here. Once logged in to the Azure Management Portal you should see Storage in the left hand panel about 7th down from the top. Click on it and you will notice a plus symbol (+) at the bottom with “New” next to it. Click on that and then click “Quick Create” and you will see the choices below.
To create the storage account you will need to enter:
1.) A unique URL where it will be located. Whatever name you provide is checked for uniqueness and is automatically suffixed with .core.windows.net.
2.) A Location/Affinity group. You will want to choose want close to your region.
3.) Replication. For our purposes I chose “Locally Redundant”. It is the most inexpensive.
4.) Once the above information is entered click the bottom right “Create Storage Account”
Now that your Storage Account is create your next step will be to create a Cloud Service. The Cloud Service is a “compute container” that will hold your projects. It is extremely scalable and highly available. From the Azure Management Portal find Cloud Services along the left hand side and click on it. At the bottom you will see the plus symbol (+) with “New” next to it. Click there and you will again be presented with the “Quick Create” option and it will be the only one. From there you will see the choices below.
To create your new Cloud Service you will need the following:
1.) A unique name to be used in the URL that will be suffixed with .cloudapp.net.
2.) A region or Affinity Group. For simplicity sake I would choose the same region you chose when creating your Storage Account.
I am a bit of a control freak and this next step isn’t absolutely necessary but I am going to assume that you want the same amount of control over your lab as I do. Azure will give your machines network addresses but by creating your own virtual network you have far more control and flexibility. In the Management Portal find Networks on the left hand side and click on it. Click the plus symbol (+) with “New” next to it. Network Services will be highlighted and so will Virtual Network, click on the choice “Custom Create”
From there you will be asked to enter your Virtual Network Details including:
1.) Name (this only needs to be meaningful to you).
2.) Location. Again I would choose the same region you chose in earlier steps.
3.) DNS Servers. Trust me on this one and just enter something meaningful to you as the name and 10.0.0.4 as the IP address.
4.) Don’t worry about Point-to-Site or Site-to-Site Connectivity. Leave them unchecked.
5.) On the last step click on the Check Box to create your virtual network
Your First Azure Virtual Machine
Now that you have created your Storage Account, Cloud Service, and Virtual Network the real fun begins. You can now build your first Virtual Machine in Azure. Since the whole purpose of this article was to build a Virtual Lab I am going to start with a Windows Domain Controller. More specifically, Windows Server 2012 R2. Why not see the latest and greatest?
In the Azure Management Portal find Virtual Machines along the left hand side and click on it. Click the plus symbol (+) with “New” next to it.
Click on “From Gallery” in the right-most pane. From there you will be presented with a whole new set of choices. The first part asks you to “Choose an Image.” For this exercise I chose the first one which is Windows Server 2012 R2 Datacenter.
Clicking on the arrow in the lower right hand takes you to the next section.
You will need to make choices for:
1.) Version release date. I usually leave it as is since it is the latest available
2.) Virtual Machine Name. Must be between 3 and 15 characters.
3.) Tier. Basic is the cheaper of the two so I chose it.
4.) Size. Since this will only be a Domain Controller you can get by with the cheapest option which is A0 which is a shared core and 768 MB memory. You can always scale this up later without having to recreate the machine.
5.) A New User Name which will be the Administrator account on your new machine. For security reasons obvious names such as Admin or Administrator are not allowed.
6.) Password. Again, for security reasons obvious passwords such as 12345678 or Password1 are not allowed. The must contain at least 8 characters and must be complex.
Click the right arrow in the bottom and go on to the next section.
1.) Choose the Cloud Service you created earlier from the drop down menu.
2.) Your Virtual Network should appear here after you have chosen your cloud service
3.) Choose the Storage Account you created earlier.
4.) Leave everything else as is and click on the right arrow at the bottom
Leave “Install the VM Agent” checked and click on the checkbox at the bottom to create your machine.
Congratulations you have just created your first machine! In the Azure Management Portal you should see a Status of “Starting (Provisioning)”. The process should take no more than about 10 minutes to complete.
Configuring Your New Domain Controller
Once your new machine is done provisioning click on it in the Azure Management Portal and you should be presented with a Quick Start Menu
Click on Dashboard in the top left hand side of the Quick Start Menu. Now notice on the right hand side of the Dashboard there is a Quick Glance column that will include your DNS name, machine status, Public Virtual IP address, Internal IP address, size, etc. You should notice that your DC was given the IP address of 10.0.0.4 which was what we set your DNS to use when we created the Virtual Network.
At the bottom of the Dashboard you should see an option to Connect to your new virtual machine. When you click on Connect you will be given the option to Open or Save an RDP file. Save it to a folder and then open the file. Opening the RDP file will initiate an RDP connection to your new DC in the cloud. Specify the credentials you used when you created the machine. You should now be connected and logged in to your new DC.
Next you will want to add the Active Directory Domain Services for your DC.
In Server Manager start the Add Roles and Features Wizard
Installation type is “Role-based or feature based installation”
Choose your new DC
Click on the “Active Directory Domain Services”
Click “Add Features”
Click “Install” at the confirmation
You will get a message “Starting Installation”
Once notified about Post-deployment Configuration click on the “Promote this server to a domain controller”
Choose to “Add a new forest”
You will receive a warning but it can be ignored. Click “Next”
At Review Options click “Next”
Prerequisites will be checked
Prerequisites should pass and you can ignore the informational items. Click “Install”
You should get a message that “This server was successfully configured as a domain controller”. Click “Close”
Congratulations you have built your first machine in Azure and, more importantly, your first step towards a working lab. In future blogs I will show you how to create labs where you can test out products such as Web Application Proxy, SharePoint, and Rights Management Server and manage them all in the cloud. Enjoy!
Note: If the information contained here was useful please let me know in the comments below. Also, if there are any corrections needed or you would like to see future content on a particular subject please let me know that as well. Thanks!