Creating a Virtual Machine in Azure
This guide walks you through the process of creating a new virtual machine (VM) in Microsoft Azure using the Azure portal. Azure VMs provide scalable, on-demand computing resources that you can access and manage easily.
Step 1: Sign in to the Azure portal
Open your web browser and navigate to https://portal.azure.com/. Sign in with your Azure account credentials.
Step 2: Navigate to Virtual Machines
In the Azure portal search bar at the top, type "Virtual machines" and select "Virtual machines" from the search results.
Alternatively, you can click the menu icon (three horizontal lines) in the top-left corner, select "All services", and then find "Virtual machines" under the "Compute" category.
Step 3: Create a new Virtual Machine
On the Virtual machines page, click the "+ Create" button, then select "Virtual machine".
Step 4: Configure Basics
On the "Create a virtual machine" page, you'll see several tabs. Start with the "Basics" tab:
- Subscription: Select the Azure subscription under which you want to create the VM.
- Resource group: Choose an existing resource group or click "Create new" to create a new one. A resource group is a logical container for your Azure resources.
- Virtual machine name: Enter a unique name for your VM (e.g.,
my-ubuntu-vm). - Region: Select the Azure region where you want to deploy your VM.
- Availability options: For production workloads, consider availability sets or zones for high availability. For this guide, "No infrastructure redundancy required" is often sufficient for testing.
- Security type: Standard is usually fine for basic VMs.
- Image: Select the operating system image for your VM (e.g., Ubuntu Server, Windows Server, Red Hat Enterprise Linux).
- VM architecture: Typically x64.
- Size: Choose a VM size based on your performance and cost requirements. You can click "See all sizes" to explore options.
- Administrator account:
- Authentication type: For Linux VMs, you can use SSH public key or password. For Windows, you'll use a username and password.
- Username: Enter a username for the administrator account.
- Password/SSH public key: Provide the necessary credentials.
- Inbound port rules:
- Public inbound ports: Select "Allow selected ports".
- Select inbound ports: For SSH (Linux) or RDP (Windows), select the corresponding port (22 for SSH, 3389 for RDP).
Step 5: Configure Disks
On the "Disks" tab:
- OS disk type: Choose between Standard HDD, Standard SSD, or Premium SSD. Premium SSD offers the best performance for most production workloads.
- Data disks: You can add additional data disks here if needed.
Step 6: Configure Networking
On the "Networking" tab:
- Virtual network: A virtual network will be created by default, or you can select an existing one.
- Subnet: A subnet will be created by default, or you can select an existing one.
- Public IP: A new public IP address will be created by default, allowing you to connect to the VM from the internet.
- NIC network security group: Basic is usually sufficient for simple deployments. Advanced allows for more granular control.
Note
You can leave most of the settings on the "Management", "Advanced", and "Tags" tabs at their default values for a basic VM creation. Explore these tabs to learn about advanced configurations like monitoring, auto-shutdown, extensions, and custom data.
Step 7: Review and Create
Click the "Review + create" button. Azure will validate your configuration. Once validation passes, review the summary of your VM settings. If everything looks correct, click the "Create" button.
Important
VM creation can take a few minutes. You will see a notification in the portal when the deployment is complete. Once deployed, you can access your VM's public IP address to connect.