This tutorial will guide you through the process of deploying a virtual machine (VM) on Microsoft Azure using the Azure portal. We'll cover the essential steps from creating the VM to basic configuration.
Azure Virtual Machines (VMs) provide on-demand, scalable computing resources. They offer the flexibility of virtualization for a wide variety of computing workloads. You can deploy Windows and Linux VMs to run applications, host websites, and much more. Azure VMs are designed to be highly available and can be easily scaled up or down based on your needs.
In this tutorial, we will focus on the most common method: using the Azure portal, a web-based interface for managing Azure resources.
Open your web browser and navigate to https://portal.azure.com/. Log in with your Azure account credentials.
In the Azure portal, search for "Virtual machines" in the search bar at the top and select it from the services list. Click the + Create button and then select Virtual machine.
Screenshot illustrating the 'Create Virtual machine' option.
On the "Create a virtual machine" page, you'll need to fill out several sections:
myVMResourceGroup
).
myAzureVM
).
Standard_B1s
is often sufficient.
azureuser
).In the "Disks" tab, you can configure the OS disk and add data disks. For this tutorial, the default settings are usually fine. You can choose the OS disk type (e.g., Premium SSD, Standard SSD, Standard HDD) based on performance and cost.
The "Networking" tab allows you to configure virtual networks, subnets, public IP addresses, and network security groups (NSGs). By default, Azure will create a new virtual network, subnet, and public IP address for your VM. The NSG will automatically include the inbound port rules you selected earlier.
These tabs offer additional configurations for monitoring, auto-shutdown, extensions, and resource organization. For a basic deployment, you can often skip these or accept the defaults.
Click the Review + create button. Azure will validate your configuration. Once the validation passes, review the summary of your VM settings. Click the Create button to start the deployment.
Screenshot of the review and create stage.
The deployment process may take a few minutes. You can monitor the progress in the Azure portal. Once completed, you will see a "Deployment succeeded" message.
After the deployment is complete, navigate back to the "Virtual machines" service. Click on your newly created VM name to open its overview page.
On the VM overview page, click the Connect button. Select "RDP" and download the RDP file. Open the file and connect using the administrator username and password you set during creation.
On the VM overview page, you will find the public IP address of your VM. You can connect using an SSH client (like PuTTY on Windows or the built-in terminal on macOS/Linux) with the following command:
ssh azureuser@YOUR_VM_PUBLIC_IP_ADDRESS
If you used SSH key authentication, you might need to specify the path to your private key:
ssh -i /path/to/your/private/key azureuser@YOUR_VM_PUBLIC_IP_ADDRESS
Remember to replace azureuser
with your chosen username and YOUR_VM_PUBLIC_IP_ADDRESS
with the actual public IP address of your VM.