This article shows you how to use an Azure Resource Manager template to deploy a Linux virtual machine (VM) in Azure.
Azure virtual machines (VMs) can be created through the Azure portal. The Azure portal is a browser-based user interface to create Azure resources. This quickstart shows you how to use the Azure portal to deploy a Linux virtual machine (VM) running Ubuntu Server 22.04 LTS. To see your VM in action, you also SSH to the VM and install the NGINX web server.
Project details
Select the subscription to manage deployed resources and costs. Use resource groups like folders to organize and manage all your resources.
Instance details
This section details the instance configuration which includes
Virtual machine name: Enter a name for your virtual machine.
Region: Select the region where you want to deploy the VM.
Availability options: Choose the availability option that suits your requirements.
Image: Select "Ubuntu Server 18.04 LTS".
Size: Choose an appropriate size for your VM.
Authentication type: Select "SSH public key" or "Password" for authentication.
Username: Enter a username for accessing the VM.
SSH public key or Password: Provide the SSH public key or password, depending on the authentication type selected.
Click on the "Review + create" button to review your configuration.
After reviewing the details, click on the "Create" button to start the deployment process.
Azure will now deploy the Ubuntu Linux VM based on the provided configuration. The deployment may take a few minutes to complete. Once the deployment is finished, you can access and manage your Ubuntu VM through the Azure portal or by using SSH with the provided credentials.
When the deployment is finished, select Go to resource.
On the page for your new VM, select the public IP address and copy it to your clipboard.
Install web server
To see your VM in action, install the NGINX web server. From your SSH session, update your package sources and then install the latest NGINX package.
sudo apt-get -y update
sudo apt-get -y install nginx
Congratulations!! you have successfully created a Linux Ubuntu virtual machine using an Azure Quickstart template hosted on Azure PowerShell and also installed the Nginx webserver on it.