When you create a web project for an Azure website, you can provision a virtual machine in Azure. You can then configure the virtual machine with additional software, or use the virtual machine for diagnostic or debugging purposes.
To create a virtual machine when you create a website, follow these steps:
In the New ASP.NET Project dialog box, select the type of web application you want, and in the Azure section of the dialog box (in the lower-right corner), make sure that the Host in the cloud check box is selected (this check box is labeled Create remote resources in some installations).
In the drop-down list under Microsoft Azure, choose Virtual Machine, and then click the OK button.
Sign in to Azure if you're prompted. The Create Virtual Machine dialog box appears.
In the DNS name box, enter a name for the virtual machine. The DNS name must be unique in Azure. If the name you entered isn't available, a red exclamation point appears.
In the Image list, choose the image you want to base the virtual machine on. You can choose any of the standard Azure virtual machine images or your image that you've uploaded to Azure.
Leave the Enable IIS and Web Deploy check box selected unless you plan to install a different web server. You won't be able to publish from Visual Studio if you disable Web Deploy. You can add IIS and Web Deploy to any of the packaged Windows Server images, including your own custom images.
In the Size list, choose the size of the virtual machine.
Specify the sign-in credentials for this virtual machine. Make a note of them, because you'll need them to access the machine through Remote Desktop.
In the Location list, choose the region to host the virtual machine.
Click the OK button to start creating the virtual machine. You can follow the progress of the operation in the Output window.
When the virtual machine is provisioned, published scripts are created in a PublishScripts node in your solution. The published script runs and provisions a virtual machine in Azure. The Output window shows the status. The script performs the following actions to set up the virtual machine:
devtest, but only if there isn't already such a storage account in the specified region.
13. (Optional) You can connect to the new virtual machine. In Server Explorer, expand the Virtual Machines node, choose the node for the virtual machine you created, and on its shortcut menu, choose Connect with Remote Desktop.
If you want to customize the published scripts you created, read more in-depth information at Using Windows PowerShell Scripts to Publish to Dev and Test Environments.