Establishing Remote Desktop to Windows Azure Instance – Part 1

Introduction

image_thumb_77758CB2As a Platform-As-a-Service (PAAS) provider, Windows Azure provides provisioned VM environment for customer. It’s no longer our responsibility to take care of platform related matters. This also includes applying new patch on the operating system. Also the instance is actually sited behind the load-balancer.

We would be only focus on taking care of our application that is hosted in Windows Azure.

The application that is hosted on Windows Azure is precisely hosted on the VM instance. Those VM instances are actually provisioned as Windows Server 2008 images based on the VM size that we specify in ServiceDefinition file (small, medium, large, etc.).

Troubleshooting on Windows Azure

In many scenarios, especially troubleshooting an issue, we would need to understand the actual problem in the environment. Traditionally, we’ve got a well-known tools and protocol which has great ability to perform remote desktop to the particular machine. Before Windows Azure SDK 1.3, it’s just too hard to troubleshoot Windows Azure Application, really it was very painful. With the released of Windows Azure SDK 1.3 (around end of 2010), we are now be able to perform RDP to particular Windows Azure instance.

How It Works

The idea of RDP-ing to Windows Azure instance is to utilize RemoteAccess plugin in the Windows Azure project. As mentioned earlier the VMs on Windows Azure are actually sited behind the load-balancer, which mean when we perform RDP,we are not directly hitting the VM. In fact,it uses port 3389 to pass our request to the VM.

Alright, let’s more to the more hands-on stuff. There are 2 major set of tasks to be done. Firstly, we use Visual Studio to configure the RemoteDesktop settings. Secondly, we need to upload a certificate on Windows Azure Platform.

Part 1. Some settings on Visual Studio

0. I assume that you are ready to go with your application.

1. Right click on your Windows Azure Project, and select Publish.

image_thumb_2351F270

2. You will see a Deploy Windows Azure project dialog box show up.

image_thumb_28E0847F

Regardless you want to deploy it now or later, click on the Configure Remote Desktop connections… link.

3. You will see another dialog box comes up, the Remote Desktop Configuration.

Check the Enable connection for all roles checkbox.

image_thumb_5DE8FFB0

4. The next step is to select certificate. Essentially, we would also need to specify username and password that will be used when remote-in the instance. To ensure that our credential (username and password) to be encrypted properly, it uses certificate to secure communication between Visual Studio environment and the Windows Azure instance. The certificate itself could be self-signed by our own without having to purchase it to certificate provider.

Click on the dropdown list to select available certificate or create a new one. To create a new one, you can either make use of “makecert tools” or just simply use the wizard provided there.

In this example, I assume we have available certificate installed.

image_thumb_0E8BE18F

5. Subsequently, we’ll need to enter username, password. We would also need to specify the account expiration that to avoid inappropriate usage, just in case the credential is lost.

Click OK on Remote Desktop Configuration dialog.

6. Just click on Cancel. Do not click-on OK for the Deploy Windows Azure project dialog.

7. If you open ServiceDefinition.csdef and ServiceConfiguration.cscfg file, you will notice that there’re some new stuff added automatically.

In ServiceDefinition.csdef file it adds 1 or 2 plugin module? Why it’s 1 or 2?

At the moment you have more than one role in your service, it will add RemoteAccess plugin to the all role, but add RemoteForwarder to only one of the role. It doesn’t really matter the RemoteForwarder will be added to. The function of the RemoteForwarder is actually forward the traffic to other role. It’s anyway transparent for us if we use Visual Studio to enable the remote desktop.

image_thumb_0E4C1C4B

  image_thumb_4BF0DC09
Still can’t understand? Forget it, it’s actually transparent for us anyway Winking smile

8. How about, check out the ServiceConfiguration.cscfg file.

image_thumb_5D2BE58B

It’s basically key-value pair of our setting that we’ve done in the wizard.

9. The final step of this first part is to package and publish this service. On the Deploy Windows Azure project dialog, simply click on OK button and in a while you will see a Windows Explorer opened for you with 2 files created, namely the [Your-Service].cspkg file and [Your-Service].cscfg file.

image_thumb_76227E31

Time out here…

Take a break here. I’ll continue this on the next post again. Stay tuned.

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Establishing Remote Desktop to Windows Azure Instance – Part 1

  1. Pingback: Establishing Remote Desktop to Windows Azure Instance – Part 2 | Wely's Cloud Journey...

Leave a Reply

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

*