Module 2: Azure Architecture and Services

Azure Virtual Machines

Master Azure Virtual Machines - your virtual computers in the cloud. Learn VM sizes, create your first VM, secure access with Azure Bastion, and manage costs effectively with your free trial account.

Learning Objectives

After completing this session, you'll be ready for Quiz 11 and able to:

Understand what Azure Virtual Machines are (IaaS service)
Choose appropriate VM sizes for different workloads
Create, connect to, and manage your first Azure VM
Understand availability sets and fault domains
Use Azure Bastion for secure VM access
Know when to use VMs vs other Azure services
Manage VM costs effectively with your free trial
Understand VM Scale Sets and auto-scaling

What are Azure Virtual Machines?

Azure Virtual Machines are like renting a complete computer in the cloud. Think of it like this: instead of buying a physical computer and keeping it in your office, you get a virtual computer that runs in Microsoft's data centers. You have full control over this virtual computer - you can install any software, configure it however you want, and use it just like a physical machine.

🖥️ Simple Computer Analogy

🏠 Your Physical Computer

You buy it, own it, maintain it. If it breaks, you fix it. Takes space in your room.

☁️ Azure Virtual Machine

You rent it, Microsoft maintains the hardware. Access it from anywhere with internet.

📱 Your Smartphone

Different sizes (iPhone, Android) for different needs. VMs also come in different sizes!

💡 Virtual Machines = Infrastructure as a Service (IaaS)

Microsoft Provides
  • • Physical servers
  • • Data center buildings
  • • Power and cooling
  • • Network infrastructure
You Control
  • • Operating system (Windows/Linux)
  • • Software installation
  • • Security settings
  • • Your data and applications
Both Share
  • • Network security (firewalls)
  • • Monitoring and backups
  • • Updates and maintenance
  • • Performance optimization

✨ Why Students Love Azure VMs

Perfect for Learning

Practice anywhere:

Access your virtual computer from home, school, or anywhere

Install anything:

Try different software without affecting your personal computer

Start fresh anytime:

Delete and create new VMs for different projects

Student-Friendly Costs

$200 free credits:

Your free trial gives you plenty to practice with

Stop when not using:

Only pay when the VM is running

Delete to save:

Remove everything when you're done practicing

Azure VM Sizes - Like Choosing a Car

Just like cars come in different sizes for different needs (small car for city driving, SUV for families, truck for heavy work), Azure VMs come in different sizes optimized for different types of computer work.

🚗 VM Types = Car Types

🚗 Small Car

B1s VM

Good for beginners, learning, small websites. Uses little fuel (credits).

🏎️ Sports Car

F-series VM

Fast computer processing (CPU), perfect for apps that need speed.

🚙 SUV

M-series VM

Lots of memory (RAM) for big databases and heavy applications.

🚛 Truck

Storage VMs

Built for storing and moving lots of data and files.

Perfect VM Sizes for Students

These sizes won't eat up your free trial credits quickly!

🎯 B1s - Perfect for Beginners!

  • • 1 CPU core, 1GB memory
  • • Perfect for learning and basic tasks
  • • Costs around $8-10/month (but you can stop it!)
  • • Runs Windows or Linux
  • • Can handle web browsing, basic software

💪 B2s - When You Need More Power

  • • 2 CPU cores, 4GB memory
  • • Good for web servers, development
  • • Costs around $30-35/month
  • • Can run multiple applications
  • • Better for programming projects

💾 VM Storage Types - Like Hard Drives

📀 Standard HDD
  • • Cheapest option
  • • Like old spinning hard drives
  • • Perfect for learning
  • • Slower but saves money
⚡ Standard SSD
  • • Faster than HDD
  • • Like modern laptop storage
  • • Good for most projects
  • • Costs a bit more
🚀 Premium SSD
  • • Fastest option
  • • Like gaming computer storage
  • • For high-performance needs
  • • Most expensive

💡 Student Tip: Start with Standard HDD to save money. You can always upgrade later!

Hands-on Lab: Create Your First Azure VM

Before You Start

• You need an Azure free account with $200 credits (sign up at azure.microsoft.com)

• Make sure you're signed into the Azure portal (portal.azure.com)

• This lab will use about $8-10 of your credits if you delete the VM afterward

Always delete resources when done practicing to save credits!

💰 How to Save Your Free Credits

✅ Smart Choices During Lab:

  • • Use B1s VM size (smallest and cheapest)
  • • Choose "Standard HDD" for storage
  • • Don't add extra features unless needed
  • • Work through the lab quickly

🛑 Important After Lab:

  • • Stop (deallocate) VM when not using
  • • Delete the entire Resource Group when done
  • • Check your billing in Azure portal regularly
  • • Set up budget alerts to track spending
1

Open Azure Portal and Start Creating VM

Let's begin by accessing Azure and starting the VM creation process

📝 What to do:

  1. 1. Open your web browser and go to portal.azure.com
  2. 2. Sign in with your Azure account (the one with free credits)
  3. 3. Look for the "+ Create a resource" button (big plus sign at the top)
  4. 4. In the search box, type "Virtual Machine" and press Enter
  5. 5. Click on "Virtual Machine" from the results
  6. 6. Click the blue "Create" button

👀 What you'll see:

Azure will open a form called "Create a virtual machine" with many options. Don't worry about all the options - we'll fill them out step by step!

2

Fill in Basic Information

Now we'll configure the basic settings for your virtual machine

📋 Required Information:

  • Subscription: Your free trial subscription (should be selected automatically)
  • Resource Group: Click "Create new" and name it "MyFirstVM-RG"
  • Virtual machine name: Type "MyFirstVM" (or any name you like)
  • Region: Choose one closest to you (like "East US" or "West Europe")

💰 Money-Saving Choices:

  • Image: Select "Windows Server 2022 Datacenter - x64 Gen2"
  • Size: Click "See all sizes" and choose "Standard_B1s" (cheapest!)
  • Authentication type: Choose "Password"

🔐 SUPER IMPORTANT: Create Strong Login

  • Username: Type "azureuser" (or any username you prefer)
  • Password: Create a strong password with letters, numbers, and symbols
  • Write down your username and password! You'll need them to access your VM
  • • Example password: "MyAzure2024!" (but make your own unique one)
3

Configure Storage and Networking

Set up storage and network settings (we'll use the cheapest options)

🌐 Networking (Leave as Default):

  • Virtual network: Leave as default (Azure will create one automatically)
  • Subnet: Leave as default
  • Public IP: Leave as default (you need this to connect to your VM)
  • NIC network security group: Leave as "Basic"

💾 Storage (Choose Cheapest):

  • OS disk type: Choose "Standard HDD" (this saves the most money!)
  • • Don't add any data disks unless you really need them
  • • Leave encryption settings as default

⚙️ Advanced Settings:

You can skip the "Management", "Monitoring", and "Advanced" tabs for now. The default settings are fine for learning.

4

Review and Create Your VM

Final check before creating your virtual machine

✅ Before clicking "Create":

  1. 1. Click "Review + create" at the bottom of the page
  2. 2. Azure will check your settings (this takes a few seconds)
  3. 3. Look for the estimated cost - should be around $8-10/month
  4. 4. Make sure VM size shows "Standard_B1s"
  5. 5. Check that disk type shows "Standard HDD"
  6. 6. If everything looks good, click the blue "Create" button

⏱️ What happens next:

Azure will create your VM! This takes about 3-5 minutes. You'll see a progress screen that says "Deployment in progress". When it's done, you'll see "Your deployment is complete" with a green checkmark.

5

Connect to Your Virtual Machine

Time to access your virtual computer and see it in action!

🖥️ How to connect:

  1. 1. After deployment completes, click "Go to resource"
  2. 2. On your VM's main page, click the "Connect" button at the top
  3. 3. Choose "RDP" (Remote Desktop Protocol)
  4. 4. Click "Download RDP File"
  5. 5. Open the downloaded .rdp file (usually in your Downloads folder)
  6. 6. When prompted, enter the username and password you created in Step 2
  7. 7. Click "Yes" if you see any security warnings

🍎 For Mac Users:

  1. 1. Download "Microsoft Remote Desktop" from the Mac App Store (it's free)
  2. 2. Install and open the app
  3. 3. Then follow the steps above to download and open the RDP file

🎉 Success!

If everything worked, you'll see a Windows desktop that looks just like a regular computer! This is your virtual computer running in Microsoft's cloud. You can:

  • • Open web browsers and browse the internet
  • • Install software (try downloading Notepad++ or Chrome)
  • • Create files and folders
  • • Use it just like any Windows computer!
6

💰 CRITICAL: Save Your Free Credits!

This step is SUPER IMPORTANT to avoid wasting your $200 credits

🛑 Stop the VM When You're Done:

  1. 1. In the Azure portal, go to your VM page
  2. 2. Click the "Stop" button at the top
  3. 3. When asked "Stop and deallocate?", choose "Yes"
  4. 4. Wait until the status shows "Stopped (deallocated)"
  5. 5. Only when it says "deallocated" are you NOT being charged!

🗑️ Delete Everything (Recommended for Practice):

  1. 1. In Azure portal, search for "Resource groups"
  2. 2. Find your "MyFirstVM-RG" resource group and click on it
  3. 3. Click "Delete resource group" at the top
  4. 4. Type the resource group name exactly to confirm
  5. 5. Click "Delete"

✅ This deletes EVERYTHING - VM, disk, network, IP address. Zero charges after this!

💡 Pro Tips for Managing Costs:

  • • Set up billing alerts in Azure portal to track spending
  • • Always "Stop (deallocate)" VMs when not using them
  • • Delete practice resources when done learning
  • • Check your billing page regularly to see credit usage

🔧 Having Problems? Here's How to Fix Them

❌ Can't connect to VM:

  • • Make sure VM status shows "Running" (not stopped)
  • • Double-check your username and password
  • • Try downloading the RDP file again
  • • Check if your firewall is blocking remote desktop
  • • Wait 5 minutes after creating VM and try again

❌ VM creation failed:

  • • Try a different region (East US, West US, etc.)
  • • Check that you have enough free trial credits
  • • Make sure VM name doesn't have spaces or special characters
  • • Try creating the VM again with same settings
  • • Contact Azure support chat if problem continues

VM Scaling and Security Features

Virtual Machine Scale Sets (Auto-scaling)

VM Scale Sets are like having a smart assistant that automatically creates more VMs when your website gets busy (like during Black Friday shopping), and removes extra VMs when things quiet down so you don't pay for what you don't need.

🍕 Restaurant Staff Analogy

😴 Quiet Hours

Few customers = minimal staff. Only 1-2 VMs running to save money.

🏃 Rush Hour

Lots of customers! System automatically creates 5-10 VMs to handle the load.

📊 Smart Management

Monitors website traffic and adjusts VM count automatically.

Availability Sets (Fault & Update Domains)

Availability Sets ensure your VMs are spread across different physical servers and racks in the data center. This way, if one server fails or needs maintenance, your other VMs keep running.

🏢 Office Building Analogy

🔧 Fault Domains

Like different electrical circuits in a building. If one circuit fails, devices on other circuits keep working.

  • • Different power sources
  • • Different network switches
  • • Up to 3 fault domains per availability set
🔄 Update Domains

Like floors in a building during renovation. Maintenance happens one floor at a time, so other floors stay operational.

  • • Planned maintenance groups
  • • Only one update domain down at a time
  • • Up to 20 update domains

Azure Bastion (Secure VM Access)

Azure Bastion is like having a secure private tunnel to access your VMs. Instead of exposing your VMs directly to the internet (which is risky), Bastion provides a safe way to connect through your web browser.

🏨 Hotel Security Analogy

🚪 Without Bastion

Like having your hotel room door open to the street. Anyone can try to enter.

🛡️ With Bastion

Must go through hotel lobby, check with security, get escorted to room safely.

🌐 Browser Access

Connect to VMs directly from Azure portal - no need to download RDP files!

⚙️ Advanced VM Features (Good to Know for Quiz)

🚀 VM Generations:
  • Generation 1: Older VMs, BIOS-based
  • Generation 2: Newer VMs with UEFI, Secure Boot, faster startup
  • Student tip: Gen 2 is better but both work fine for learning
💾 Managed vs Unmanaged Disks:
  • Managed Disks: Azure handles everything (recommended)
  • Unmanaged Disks: You manage storage accounts (more complex)
💰 Special VM Types:
  • Spot VMs: Up to 90% cheaper but can be removed anytime
  • Reserved Instances: Pay upfront for 1-3 years, get big discounts
  • Dedicated Hosts: Entire physical server just for you (expensive)
🔧 VM Extensions:
  • What they do: Automatically install software and configure VMs
  • Examples: Antivirus, monitoring agents, custom scripts

When Should You Use Virtual Machines?

🤔 VM Decision Tree (Important for Quiz!)

Do you need complete control over the operating system and software?

✅ YES → Use Virtual Machines (IaaS)

You need specific OS versions, custom software, or full admin control

❌ NO → Consider App Service (PaaS) or Functions

Focus on your application, let Azure manage the infrastructure

✅ Perfect for VMs

Choose VMs When You Need:

  • • Moving existing apps from your office to cloud (lift and shift)
  • • Specific OS versions (Windows Server 2012, old Linux)
  • • Custom software that requires admin installation
  • • Legacy applications that can't be changed
  • • Complete control over security settings
  • • Compliance rules requiring specific configurations
  • • Installing development tools like Visual Studio

❌ Consider Alternatives

Avoid VMs When You Want:

  • • Simple web applications → Use App Service instead
  • • Quick background tasks → Use Azure Functions
  • • No OS management headaches → Use PaaS services
  • • Automatic scaling without VM management → Use App Service
  • • Focus only on writing code → Use Functions or App Service
  • • Cheapest possible option → Use consumption-based services

🧠 Get Ready for Quiz 11 - Sample Questions

Here are some example questions similar to what you'll see in Quiz 11. Make sure you understand these concepts!

Sample Question 1:

"Which Azure compute service provides the Infrastructure as a Service (IaaS) option?"

  • A) Azure App Service
  • B) Azure Functions
  • C) Azure Virtual Machines ✅
  • D) Azure Container Instances

Sample Question 2:

"What is the primary benefit of Azure Bastion?"

  • A) Reduce VM costs
  • B) Secure VM access without public IP ✅
  • C) Increase VM performance
  • D) Backup VM data

📝 Quiz 11 Topics: VM sizes, IaaS concepts, availability sets, scaling, storage types, Bastion, and when to use VMs

Take Quiz 11 Now

Session 11 Summary

🎯 Key Takeaways - Everything You Need for Quiz 11

🖥️ Virtual Machines Basics:

  • IaaS Service: Complete control over virtual computers in Azure cloud
  • VM Sizes: B1s for learning, different series for different workloads
  • Scale Sets: Automatically adjust VM count based on demand
  • Availability Sets: Fault domains and update domains for reliability

💾 Storage & Performance:

  • Storage Types: Standard HDD (cheapest), Standard/Premium SSD
  • Generations: Gen 1 (BIOS), Gen 2 (UEFI, Secure Boot)

🔐 Security & Access:

  • Azure Bastion: Secure browser-based VM access without public IP
  • RDP: Remote Desktop Protocol for Windows VM connections
  • Authentication: Password or SSH key-based access

💰 Cost Management:

  • B1s VMs: Perfect for students ($8-10/month)
  • Stop (deallocate): No charges when VM is stopped properly
  • Spot VMs: Up to 90% cheaper but can be evicted

🎉 Hands-on Achievement Unlocked!

You now know how to create, connect to, and manage Azure Virtual Machines! You've learned about VM sizes, cost management, security, and when VMs are the right choice vs other Azure services.

VM Creation ✓ Remote Access ✓ Cost Management ✓ IaaS Concepts ✓ Security Features ✓

🚀 Ready for Quiz 11?

Perfect! You've mastered Azure Virtual Machines and understand IaaS concepts. Now test your knowledge with Quiz 11, which covers all the topics from this session.