Create a custom virtual machine running Windows
Azure has two different deployment models for creating and working with resources: Resource Manager and classic. This article covers using the classic deployment model. Microsoft recommends that most new deployments use the Resource Manager model.
A custom virtual machine simply means a virtual machine that you create using the From Gallery option because it gives you more configuration choices than the Quick Create option. These choices include:
- Connecting the virtual machine to a virtual network.
- Installing the Azure Virtual Machine Agent and Azure Virtual Machine Extensions, such as for antimalware.
- Adding the virtual machine to existing cloud services.
- Adding the virtual machine to an existing Storage account.
- Adding the virtual machine to an availability set.
If you want your virtual machine to use a virtual network so you can connect to it directly by host name or set up cross-premises connections, make sure that you specify the virtual network when you create the virtual machine. A virtual machine can be configured to join a virtual network only when you create the virtual machine. For details on virtual networks, see Azure Virtual Network overview.
Sign in to the classic portal.
On the command bar at the bottom of the window, click New.
Under Compute, click Virtual Machine, and then click From Gallery.
The first screen after this lets you Choose an Image for your virtual machine from the list of available images. You can choose an image from the gallery or select from images and disks that you have uploaded. The available images may differ depending on the subscription you're using.
The second screen lets you pick a computer name, size, and administrative user name and password. Use the tier and size required to run your app or workload. Here are some tips:
- Virtual Machine Name can only contain letters, numbers and hypens. It also must start with a letter and end with a letter or a number.
- New User Name refers to the administrative account that you use to manage the server. The password must be 8-123 characters long and have at least three of the following: lower case character, upper case character, number, and a special character. You'll need the user name and password to connect and log on to the virtual machine.
- A virtual machine's size affects the cost of using it, as well as configuration options such as how many data disks you can attach. For details, see Sizes for virtual machines.
The third screen lets you configure resources for networking, storage, and availability. Here are some tips:
- The Cloud Service DNS Name is the global DNS name that becomes part of the URI that's used to contact the virtual machine. You'll need to come up with your own cloud service name because it must be unique in Azure. Cloud services are important for scenarios using multiple virtual machines.
- For Region/Affinity Group/Virtual Network, use a region that's appropriate to your location. You can also choose to specify a virtual network instead.
- If you want a virtual machine to use a virtual network, you must specify the virtual network when you create the virtual machine. You can't join the virtual machine to a virtual network after you create the VM. For more information, see Azure Virtual Network Overview.
- For details about configuring endpoints, see How to Set Up Endpoints to a Virtual Machine.
The fourth configuration screen lets you install the VM Agent and configure some of the available extensions.
The VM agent provides the environment for you to install extensions that can help you interact with or manage the virtual machine. For details, see About the VM agent and extensions.
After the virtual machine is created, the classic portal lists the new virtual machine under Virtual Machines. The corresponding cloud service and storage account also are created and are listed in those sections. Both the virtual machine and cloud service are started automatically and their status is listed as Running.
You can also create a custom virtual machine running Linux using the classic portal.