Using Remote Desktop with Windows Azure Roles
By using the Windows Azure SDK and Remote Desktop Services, you can access Windows Azure roles and virtual machines that are hosted by Windows Azure. In Visual Studio, you can configure Remote Desktop Services from a Windows Azure project. To enable Remote Desktop Services, you must create a working project that contains one or more roles and then publish it to Windows Azure.
You should access a Windows Azure role for troubleshooting or development only. The purpose of each virtual machine is to run a specific role in your Windows Azure application, not to run other client applications. If you want to use Windows Azure to host a virtual machine that you can use for any purpose, see Managing Windows Azure Virtual Machines.
To enable and use Remote Desktop for a Windows Azure Role
In Solution Explorer, open the shortcut menu for your project, and then choose Publish.
The Publish Wizard appears.
At the bottom of Settings page of the wizard, select the Enable Remote Desktop for all roles check box.
Click the Settings link.
At the bottom of the Remote Desktop Configuration dialog box, choose the More Options button. This allows you to set up a certificate so that you can encrypt credentials information.
A list appears and shows certificates that you can use to set up remote desktop connections.
In the list, click <Create>, or choose one from the list. If you choose an existing certificate, skip the following steps.
The certificates that you need for a remote desktop connection are different from the certificates that you use for other Windows Azure operations. The remote access certificate must have a private key.
The Create Certificate dialog box appears.
Type a friendly name for the new certificate, and then click OK.
In the Remote Desktop Configuration dialog box, type a user name and a password.
You can’t use an existing account. Don’t specify Administrator as the user name for the new account.
If the password doesn’t meet the complexity requirements, a red icon appears next to the password text box. The password must include capital letters, lowercase letters, and numbers or symbols.
Choose a date on which the account will expire and after which remote desktop connections will be blocked.
Several settings that enable Remote Access Services are added to the .cscfg and .csdef files.
In the Deploy Windows Azure Project dialog box, click OK when you’re ready to publish your cloud service.
If you aren’t ready to publish, click Cancel. Your Remote Desktop configuration will still be saved, and you can publish your cloud service later.
After you publish your cloud service, you can use Server Explorer to log into the virtual machines that Windows Azure hosts. In Server Explorer, expand the Windows Azure Compute node, and then expand the node for a cloud service and one of its roles to display a list of instances.
Open the shortcut menu for an instance node, and then choose Connect Using Remote Desktop.
Enter the user name and password that you created previously.
You are now logged into your remote session.