Azure is Microsoft’s cloud computing platform, offering a variety of services, including computing, storage, and networking resources. One of the key services is the ability to create and manage Virtual Machines (VMs), which are software-based computers running on Azure’s infrastructure.
If you’re new to Azure and want to create your own Virtual Machine, this guide will walk you through each step. By the end, you’ll be able to spin up your own VM for testing, development, or production workloads.
Prerequisites
Before you get started, ensure you have:
- An active Azure account. If you don’t have one, you can sign up for a free account at https://azure.microsoft.com/free.
- Basic knowledge of Azure and cloud computing concepts.
- A supported web browser (like Chrome, Edge, or Firefox).
Step 1: Log into Azure Portal
- Go to the Azure Portal
Navigate to https://portal.azure.com and log in with your credentials.
- Dashboard Overview
Once logged in, you’ll be taken to the Azure Portal dashboard, where you can manage and monitor all of your Azure resources.
Step 2: Create a New Virtual Machine
- Open the Virtual Machines Service
On the left sidebar, click on Create a resource. Then, in the “Search the Marketplace” box, type Virtual Machine and select it from the options.
- Click “Create”
After selecting “Virtual Machine,” click on the Create button on the top of the page.
- Subscription
If you have multiple subscriptions, select the one you want to use. By default, it will be set to the subscription associated with your account.
- Resource Group
Resource Groups are containers for your Azure resources. Select an existing resource group or create a new one by clicking Create new. For simplicity, let’s name it “VM-ResourceGroup.”
- Virtual Machine Name
Provide a name for your virtual machine (e.g., “MyFirstVM”).
- Region
Select the region (data center) where your VM will be hosted. Choose one that’s geographically closest to you for better performance. For example, “East US.”
- Availability Options
You can choose between options like Availability Zones, Availability Sets, or No infrastructure redundancy required. For this guide, we’ll choose No infrastructure redundancy required for simplicity.
- Image
Select the operating system for your VM. Azure provides a wide range of options, including:
- Windows Server
- Ubuntu
- CentOS
- Debian
For this example, choose Windows Server 2019 Datacenter.
- Size
Choose the size of the VM. The size determines the VM’s CPU, RAM, and other resources. For beginners, the B1s size (1 CPU core, 1 GB of RAM) is a good starting point, especially for testing purposes.
- Authentication Type
Choose an authentication method for logging into your VM. The two options are:
- Password: Set a username and password for login.
- SSH Public Key: Use an SSH key pair for Linux VMs (typically recommended for Linux OS).
For this guide, select Password, and create a username and a strong password for your VM.
- OS Disk Type
Choose the type of disk for your operating system:
- Standard HDD: More affordable but slower.
- Standard SSD: Balanced price/performance.
- Premium SSD: High performance, suitable for production workloads.
For this guide, choose Standard SSD.
- Data Disks (Optional)
You can add additional disks for data storage, but for now, we’ll skip this step by selecting None.
- Virtual Network
Select an existing virtual network or create a new one. By default, the wizard will create a new network in the region you selected earlier.
- Subnet
Choose the default subnet (if a new VNet is created). This defines the IP range that your VM will use.
- Public IP
Select Create new to assign a public IP address, which will be used to connect to your VM over the internet.
- NIC Network Security Group
For security, choose Basic. This ensures that the VM is protected by a basic firewall to block unwanted traffic.
Step 6: Management, Monitoring, and Advanced Settings
- Monitoring
Enable Boot Diagnostics and Guest OS Diagnostics to help with troubleshooting and monitoring the VM.
- Advanced
Here, you can configure additional settings like custom extensions, custom script execution, or custom storage settings, but for simplicity, you can leave these as default.
Step 7: Review and Create
- Review Your Settings
Review all the information you’ve entered for the virtual machine, including the subscription, resource group, VM size, operating system, disk configuration, and networking settings.
- Create the VM
If everything looks good, click Create. The deployment process will begin, and Azure will start provisioning the VM based on your configuration.
Step 8: Connect to Your Virtual Machine
- Access Your VM
After the deployment is complete (which can take a few minutes), navigate to your VM by going to the Virtual Machines section in the Azure portal. You should see the new VM listed there.
- Connect via Remote Desktop (RDP)
- Under the Overview tab for your VM, you’ll find a button to connect via RDP.
- Click Connect, then download the RDP file and open it.
- Enter the username and password you created during the setup to log in to your Windows Server VM.
Conclusion
Congratulations! You’ve successfully created an Azure Virtual Machine. You can now use it for development, testing, or learning more about cloud computing.
Keep in mind that VMs can incur costs, so be sure to stop or delete your VM when you’re done experimenting to avoid unnecessary charges. To stop your VM, go to the Azure portal, click on your VM, and select Stop. Note that stopping the VM only stops charges for the Compute portion of the VM, there will still be charges for storage (disks) and other resources like public IP addresses (if applicable).
Have any questions about how to create an Azure Virtual Machine or about the steps in this guide? Please reach out to our IT experts at any time!
This publication contains general information only and Sikich is not, by means of this publication, rendering accounting, business, financial, investment, legal, tax, or any other professional advice or services. This publication is not a substitute for such professional advice or services, nor should you use it as a basis for any decision, action or omission that may affect you or your business. Before making any decision, taking any action or omitting an action that may affect you or your business, you should consult a qualified professional advisor. In addition, this publication may contain certain content generated by an artificial intelligence (AI) language model. You acknowledge that Sikich shall not be responsible for any loss sustained by you or any person who relies on this publication.