Orange County, Tustin, CA 92780

How to Create Your First Azure Virtual Machine

If you've been working with on-premises virtualization using VMware vSphere or Hyper-V, making the leap to the cloud can feel like a big deal. But the good news is that creating your first virtual machine (VM) in Microsoft Azure is actually a pretty straightforward process, and it maps closely to concepts you likely already know. In this guide, we'll walk through the steps to get your first Azure VM up and running.

What You'll Need Before You Start

Before jumping into the Azure portal, there are a couple of things you'll want to have in place. First, you'll need an active Azure subscription. If you don't already have one, Microsoft offers a free tier that includes a $200 credit for the first 30 days along with a selection of services that remain free for 12 months — more than enough to get started. You can sign up at azure.microsoft.com/free. Second, you'll want to have a resource group ready, or you can create one during the VM setup process, which we'll cover below.

Log Into the Azure Portal

Head over to portal.azure.com and sign in with your Microsoft account. Once you're in, you'll land on the Azure dashboard. This is your central hub for managing all of your Azure resources. It may look a little overwhelming at first, but you'll quickly find your way around.

Navigate to Virtual Machines

From the Azure portal dashboard, click on the search bar at the top and type Virtual Machines, then select it from the results. Alternatively, you may already see it pinned under your Azure services on the home screen. Once on the Virtual Machines page, click the + Create button and select Azure virtual machine from the dropdown.

Configure the Basics

This is the most important tab and where you'll spend most of your time. Here's what you'll need to fill in:

  • Subscription: Select your active Azure subscription.
  • Resource Group: Either select an existing resource group or click Create new to make one on the spot. Think of a resource group like a folder that keeps all related resources together.
  • Virtual Machine Name: Give your VM a descriptive name. This is the name you'll see in the portal.
  • Region: Choose the Azure region closest to you or your users. This affects latency and pricing.
  • Image: This is the operating system for your VM. For this guide, select Windows Server 2022 Datacenter or Ubuntu Server 22.04 LTS if you prefer Linux.
  • Size: Azure defaults to a size based on the image selected. For a simple test VM, the Standard_B1s or Standard_B2s is a cost-effective choice. You can always resize later.
  • Administrator Account: Set a username and a strong password. You'll use these credentials to log into the VM.
  • Inbound Port Rules: For a Windows VM, make sure RDP (3389) is selected so you can remote in. For Linux, select SSH (22).

Disks

Click Next: Disks to move to the Disks tab. For a basic VM, the default OS disk settings are fine. Azure provisions a managed disk for you automatically. You can choose between Premium SSD, Standard SSD, or Standard HDD depending on your performance needs and budget. For a test or lab VM, Standard SSD is a good middle ground.

Networking

Click Next: Networking. Azure will automatically create a Virtual Network (VNet), subnet, and public IP address for your VM if you don't already have one. For a first VM, the defaults here are perfectly fine. Just make sure your network security group (NSG) has the appropriate inbound rules to match what you set in the Basics tab (RDP or SSH).

Review + Create

You can skip through the Management, Monitoring, and Advanced tabs for now — the defaults are fine for a first VM. Click Review + Create at the bottom. Azure will validate your configuration, and if everything looks good, you'll see a Validation passed message. Go ahead and click Create.

Deployment typically takes between 1 and 3 minutes. Once it's done, you'll see a Your deployment is complete message.

Connect to Your New VM

Once deployment is complete, click Go to resource. On the VM overview page, click the Connect button at the top and select RDP (for Windows) or SSH (for Linux). For RDP, download the .rdp file and open it, then enter the administrator credentials you set during setup. For Linux, you can use your favourite SSH client such as PuTTY or Windows Terminal.

And just like that, you're connected to your first Azure VM.

Don't Forget to Shut It Down

One thing that catches a lot of people out when they're new to Azure is that simply closing the RDP or SSH session does not stop billing. Unlike shutting down a VM in vSphere where the host still consumes resources, in Azure you need to explicitly Stop (deallocate) the VM from the portal to stop being charged for compute. You can do this from the VM overview page by clicking the Stop button. Deallocating the VM means Azure releases the underlying compute resources and you won't be charged for them while it's stopped (though you'll still be charged for the managed disk storage).

Wrapping Up

Creating a VM in Azure is a quick and painless process once you know where everything is. If you've worked with VMware or Hyper-V before, the concepts will feel familiar — you're still picking an OS image, allocating compute and storage, and configuring networking. Azure just wraps all of that up in a clean web interface with a pay-as-you-go model.

If you found this useful, check out some of the other articles on the site, including how to Install the Azure PowerShell Module to start automating your Azure environment from the command line.

Byron Zepeda

Byron Zepeda is a Senior Systems Engineer in Orange County, California, working with VMware vSphere, Citrix Virtual Apps, backups, and storage. As cloud technologies and automation become first-class citizens within IT organizations, he desires to share everything he learns and pass it on to others.