Create a Virtual Machine in Azure
A step-by-step guide for beginners to deploy your first virtual machine on Microsoft Azure.
Welcome to our guide on creating a Virtual Machine (VM) in Azure! Azure VMs provide on-demand, scalable computing resources. This tutorial will walk you through the essential steps using the Azure portal.
Prerequisites
Before you begin, ensure you have:
Step 1: Sign in to the Azure Portal
Navigate to the Azure portal and sign in with your Azure account credentials.
Step 2: Create a Virtual Machine
In the Azure portal, search for "Virtual machines" and select it. Then, click the "Create" button and choose "Virtual machine".
This will open the "Create a virtual machine" blade.
Step 3: Configure Basic Settings
You'll need to fill in the following basic details:
- Subscription: Select your Azure subscription.
- Resource group: Create a new one (e.g.,
myResourceGroup
) or select an existing one. A resource group is a logical container for your Azure resources.
- Virtual machine name: Give your VM a unique name (e.g.,
myVM
).
- Region: Choose the Azure region where you want to deploy your VM.
- Availability options: For basic testing, "No infrastructure redundancy required" is sufficient.
- Security type: Typically "Standard".
- Image: Select an operating system image. Common choices include Windows Server or various Linux distributions like Ubuntu LTS.
- Size: Choose a VM size based on your performance needs and budget. For testing, a smaller size like
Standard_B1s
is usually fine.
- Administrator account:
- Authentication type: Choose "Password" or "SSH public key" (recommended for Linux).
- Username: Enter a username for the administrator account.
- Password/SSH public key: Provide the necessary credentials.
- Inbound port rules: For basic access, select "Allow selected ports" and then choose "RDP (3389)" for Windows or "SSH (22)" for Linux.
Step 4: Configure Disks
You can accept the default disk settings or customize them. For OS disks, SSDs offer better performance. You can also add data disks if needed.
Step 5: Configure Networking
Azure automatically creates a virtual network, subnet, public IP address, and network security group (NSG) for your VM. You can customize these if you have specific networking requirements.
Step 6: Review and Create
Review all the settings you've configured. Azure will perform a validation check. Once validation passes, click the "Create" button.
The deployment process can take a few minutes. You can monitor the progress in the Azure portal notifications.
Accessing Your VM
Once the deployment is complete:
- Navigate back to "Virtual machines" and select your newly created VM.
- On the VM's overview page, you'll find its public IP address.
- For Windows VMs: Use a Remote Desktop client to connect using the public IP address and the administrator credentials you set up.
- For Linux VMs: Use an SSH client (like PuTTY or the built-in terminal) to connect using the public IP address, username, and your SSH key or password.
Congratulations! You have successfully created and deployed a virtual machine in Azure.