How to Create a Custom Virtual Machine
A custom virtual machine refers to a virtual machine you create using the From Gallery option because it gives you more configuration choices than the Quick Create option. These include:
- More image choices for creating the virtual machine (VM)
- Connecting the VM to a virtual network
- Installing the VM Agent and extensions, such as for antimalware
- Adding the VM to an existing cloud service
- Adding the VM to an availability set
Important: If you want your virtual machine to use a virtual network so you can connect to it directly by hostname or set up cross-premises connections, make sure 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 Azure Management Portal. Check out the Free Trial offer if you don't have a subscription yet.
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 lets you Choose an Image for your virtual machine from one of the lists in the Image Gallery. (The available images may differ depending on the subscription you're using.) Click the arrow to continue.
The second screen lets you pick a computer name, size, and administrative user name and password. If you just want to try out Azure Virtual Machines, fill in the fields as shown in the image below. Otherwise, chose the tier and size required to run your app or workload. Here are some details to help you fill this out:
- New User Name refers to the administrative account that you use to manage the server. Create a unique password for this account and make sure to remember it. You'll need the user name and password to log on to the virtual machine.
- A virtual machine's size affects the cost of using it, as well as configuration options such as the number of data disks you can attach. For details, see Virtual Machine and Cloud Service Sizes for Azure.
The third screen lets you configure resources for networking, storage, and availability. Here are some details to help you fill this out:
- 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.
The fourth configuration screen lets you configure the VM Agent and some of the available extensions. Click the check mark to create the virtual machine.
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 Using Extensions.
After the virtual machine is created, the Management 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 the Management Portal shows their status as Running.