AZ-104 Step by step

Azure Virtual Machines for Beginners: AZ-104 Lesson

AZ-104 lesson on Azure virtual machines: plan names, regions and sizes, create an Ubuntu VM in the portal and Azure CLI, then manage updates and auto-shutdown.

· 6 min read

Thumbnail of the lesson: Introduction to Azure virtual machines
Watch the lesson: Introduction to Azure virtual machines | Deploy and manage Azure… | AZ-104 Azure Administrator

Introduction to Azure virtual machines is the AZ-104 lesson where you plan a VM deployment and create a VM using both the Azure portal and the Azure CLI. It is for Azure administrator learners who are new to compute in Azure and want to understand the decisions behind a VM before they build one: naming, region, size, networking and management.

The lesson is about 36 minutes long and opens the compute section of the free AZ-104 Azure Administrator course.

What this lesson covers

The video is built around a realistic scenario: a team moving its servers into Azure one at a time. Along the way it covers:

  • Planning before you create. A VM needs supporting resources such as a disk, a network interface and a virtual network. If you do not supply them, Azure creates them for you and names them after the VM, which is why consistent naming matters.
  • Naming rules. The VM name becomes the computer name in the operating system, up to 64 characters for Linux but only 15 for Windows.
  • Choosing a region. Pick one close to your users, but remember that not every VM size is available in every region and prices vary by location.
  • Choosing a size. Azure offers predefined sizes by workload: general purpose, compute optimized, memory optimized, storage optimized, GPU and high performance compute. You can resize later, even while the VM is running, though it will reboot.
  • Creating a VM in the portal. A guided walk-through of an Ubuntu Server VM with SSH public key authentication, then connecting over SSH using the public IP.
  • Other ways to create VMs. The Azure CLI, templates, Terraform and the Azure REST API.
  • Managing VMs after deployment. VM extensions for post-deployment configuration, update management, and auto-shutdown to cut compute costs.
  • Availability. A first look at what availability means in the cloud and at scale sets, which the next lesson covers in depth.

What you will do

These are the steps the instructor takes in the video, in order, with the moment each one starts. Watch the video for the full walkthrough.

  1. Let’s start with a real world scenario. (0:58)
  2. You can install anything you need without buying physical hardware and Azure provides services to monitor, secure, and manage the operating system. (1:49)
  3. Start by taking an inventory of a server. The VM name is critical because it becomes the computer name and the operating system up to 64 characters for Linux but only 15 for Windows. This name also defines the Azure resource and it’s … (8:20)
  4. You can set up databases, increase VM power and monitor costs. It’s also a great learning tool because you can browse all available resources and use guided wizards. Let’s walk through creating a simple VM running in Ubuntu … (11:31)
  5. Now you configure the basic parameters. (12:57)
  6. Create. A window opens to generate a new key pair. You download the private key and create the resource. (13:51)
  7. You can deploy from a template, delete the whole resource group if something is off, tweak the JSON, and try again. Once the template works, you can parameterize fields like the VM name, network name, and storage account name. Then load the … (16:45)
  8. You write configuration files that specify the cloud provider, which is Azure in this case, and the elements that make up your infrastructure. (19:05)
  9. Update management builds on this, giving you a centralized way to assess available update status, schedule installation, and review deployment results to confirm updates applied successfully. (21:44)
  10. You can enable update management from an automation account or directly from a single VM’s pane in the portal. (21:55)
  11. Click on autoshutdown under the operations section and set your preferred schedule. This ensures VMs aren’t left running when they’re not needed, directly reducing compute charges without requiring manual intervention or complex scripting. (22:20)
  12. Let’s start by defining what availability actually means in a cloud context. (23:05)
  13. Create. Scale sets can deploy VMs into multiple availability zones, a single zone or regionally. Though the deployment options may differ based on the orchestration mode. This is a core service for building resilient autoscaling applications on Azure. (25:01)

Where it fits in the AZ-104 course

This is video 22 of 30. It follows Configure Azure Files, the last lesson in the storage section, and it is followed by Configure virtual machine availability, which shows how to protect VMs with availability sets, availability zones and scale sets with autoscale.

Later, Protect your virtual machines by using Azure Backup and Monitor your Azure virtual machines with Azure Monitor return to the VMs you create here.

How to study this lesson

  1. Listen to the migration scenario first.
  2. Make your own planning checklist: name, region, size, and the supporting network and disk resources. Note the 15-character Windows name limit.
  3. Create an Ubuntu VM in the portal following the video’s basics tab: subscription, resource group, image, size and SSH public key authentication. Download the private key when the portal asks.
  4. Connect over SSH using the VM’s public IP, as shown in the lesson.
  5. Create a second VM with the Azure CLI, then compare how much faster it is to repeat.
  6. Set up auto-shutdown under the Operations section.
  7. Clean up by deleting the resource group when you are done, or keep it for the next lesson on availability.

When you finish the compute section, check yourself with the AZ-104 mock exam; its free 10-question sample includes questions across every area of the course.

Frequently asked questions

Can I change a VM’s size after creating it?

Yes. The lesson explains that you can resize a VM even while it is running, but it will reboot. If you stop and deallocate it first, you can choose any size available in that region.

Why does the VM name matter so much?

The VM name becomes the computer name inside the operating system and also names the Azure resource. Azure uses it to name the network interface and disk it creates for you. Windows names are limited to 15 characters and Linux names to 64.

How do I avoid paying for a VM I am not using?

Use auto-shutdown under the Operations section, as shown in the video, and delete the resource group after practice.

Is this lesson free?

Yes. This lesson and the whole AZ-104 course are free on YouTube. Follow the course in order from the AZ-104 course page.

Do it yourself

Lab guides, practice and full mock exams come with a subscription. See the plans