Updated: May 29, 2014
The Azure Virtual Machines service provides on-demand, scalable computing resources. An Azure virtual machine is a server in the cloud that you configure and maintain according to your needs. It gives you the flexibility of virtualization without the expense of buying and maintaining the hardware to host it.
With a virtual machine in Azure, you can:
Deploy available versions of Windows Server or distributions of Linux operating systems by choosing from preconfigured images. Or, you can upload a virtual hard disk (VHD) that contains a server operating system and then use it to create virtual machines.
Create and connect multiple virtual machines so you can load balance traffic among them.
Use both automated and manual ways to create, manage, and delete a virtual machine. You can use the web portal (Azure Management Portal), cmdlets for Windows PowerShell, or the Service Management APIs.
Delete and recreate it whenever you need to, like you can with any other virtual machine.
This article describes how you can create and interact with a virtual machine. If you’d rather learn about virtual machines by experimenting with them, you’ll find instructions in the Documentation section on Azure web site. To find answers to some of the most common questions about virtual machines, see the Azure Virtual Machines FAQ.
For information about the server operating systems, roles and workloads that are supported or endorsed for use with Azure VMs, see the following:
For Windows VMs -- Microsoft server software support for Windows Azure Virtual Machines
For Linux VMs -- Linux on Windows Azure-Endorsed Distributions
When you create a virtual machine, choices you’ll need to make include the following:
The size of the virtual machine. This determines configuration such as the number of CPU cores, amount of memory, and storage capacity. For details, see Virtual Machine and Cloud Service Sizes for Azure.
The operating system. You can choose from stock images, some of which include SQL Server or Sharepoint. Or, if you’ve uploaded your own VHD, you can use that as a custom image for the virtual machine.
The networking configuration. If you want a virtual machine to use a virtual network, you’ll need to specify the virtual network when you create the virtual machine. For more information, see the Virtual Network Overview.
The cloud service configuration. Each virtual machine resides in a cloud service, either by itself or with other virtual machines. When you place virtual machines in the same cloud service, you can load balance your applications and services by configuring load-balanced endpoints. For instructions, see Load Balancing Virtual Machines
The ways of communicating with or interacting with a virtual machine and what’s required to allow the interaction are summarized below.
Extensions can help you configure and interact with a Windows virtual machine. For example, when you can't access the guest OS because of a forgotten password, an extension can reset the password. This is important because you can't connect directly to the console of a virtual machine.
|The VM Access cmdlets help you reset your password. They also can reconfigure RDP access. For reference details, see Get-AzureVMAccessExtension and Set-AzureVMAccessExtension.|
These extensions are installed and managed through the VM Agent. This means you'll need to first install the VM Agent so you can install extensions. You can install the agent on both existing and new virtual machines. On existing Windows virtual machines, use the installation package for the VM Agent, available from the Download Center. On new Windows virtual machines, how you'll install it differs depending on whether you're using an image provided by Azure or one of your own. Here are the details:
Use a portal image - install the VM Agent when you create the virtual machine. If you use the Portal, the Quick Create option installs the VM Agent automatically. If you use the From Gallery option, select Install the VM Agent. If you use the New-AzureVM or New-AzureQuick VM cmdlet, the VM Agent is installed automatically.
Use your own image - install the VM Agent to the operating system before you upload it to Azure and add it as image. You can get the installation package for the VM Agent from the Download Center.
After you install the VM Agent, you can use cmdlets to find and manage extensions. The following cmdlets help you do this:
For more information, see Manage Extensions. For a list of available extensions, see “Learn more about available extensions” in that article.
All virtual machines in the same cloud service or virtual network can automatically communicate with each other using a private network channel. However, to communicate with other resources on the Internet or other virtual networks, a virtual machine uses endpoints. These endpoints handle the inbound network traffic to the virtual machine. For instructions, see How to Set Up Communication with a Virtual Machine.
The way you log on to a virtual machine depends on whether it’s running Windows Server or Linux. For an overview of requirements and troubleshooting tips, see Connect to an Azure virtual machine with RDP or SSH.
For a virtual machine running Windows Server, you can use Remote Desktop. In the Management Portal, click Connect to start a Remote Desktop Connection. For instructions, see How to Log on to a Virtual Machine Running Windows Server.
For a virtual machine running the Linux operating system, you use a Secure Shell (SSH) client to logon. You’ll need to install an SSH client on your computer that you want to use to log on to the virtual machine. There are many SSH client programs available. The following are possible choices:
On a computer running a Windows operating system, you can use PuTTY. For instructions, see the PuTTY Download Page.
On a computer running a Linux operating system, you might want to use an SSH client such as OpenSSH. For more information, see OpenSSH.
For general instructions, see How to Log on to a Virtual Machine Running Linux
Windows PowerShell Remoting lets you connect remotely to one or more computers from a Windows PowerShell session to run commands directly on the remote computers. You can configure your virtual machine to allow Windows PowerShell Remoting when you create it, or at a later point. You configure the virtual machine by adding an endpoint that specifies the port and protocol to use. For instructions about adding an endpoint, see How to Set Up Endpoints to a Virtual Machine. For more information about remoting, see about_Remote_FAQ.