Creating and Managing Virtual Machines- Part 1
AZ-104 notes: Creating and Managing Virtual Machines- Part 1. Covers key concepts for the Azure Administrator Associate exam.
- Structured Summary + Deep Technical Understanding
Primary service:
- Azure Virtual Machines
Related services:
- Azure Virtual Network
- Azure Managed Disks
- Azure Network Security Group
- Azure Migrate
Official documentation:
VM overview:
VM sizes:
Managed disks:
Availability options:
1️⃣ What Is an Azure Virtual Machine?
An Azure VM is:
- ✔ Infrastructure as a Service (IaaS) compute ✔ A cloud-hosted virtualized server ✔ Built on Azure’s hypervisor platform (based on Hyper-V) ✔ Deployed into an Azure Virtual Network
It replaces on-prem hypervisor solutions like:
- VMware
- Hyper-V
- Physical servers
Key difference from on-prem:
You manage:
- OS
- Applications
- Configuration
Azure manages:
- Physical hardware
- Hypervisor layer
- Datacenter infrastructure
2️⃣ VM Core Architecture Components
A VM consists of several associated resources:
🔹 Compute Resource
The VM itself (CPU + Memory)
🔹 Operating System Image
Examples:
- Ubuntu
- Red Hat
- Windows Server
- CentOS
- Marketplace provides ready-made images.
🔹 Storage (Disks)
Modern Azure uses:
- Azure Managed Disks
Types:
- OS Disk
- Data Disks
- Premium SSD
- Standard SSD
- Standard HDD
- Important: Managed disks replaced unmanaged disks (which used storage accounts + page blobs).
🔹 Networking
VM networking includes:
- Network Interface (NIC)
- Private IP
- Optional Public IP
- Subnet
- Virtual Network
Security controlled by:
- Azure Network Security Group
3️⃣ Common VM Use Cases
✔ Domain Controllers (Active Directory)
Run AD DS in VMs.
✔ Web Servers
- Apache
- Nginx
- IIS
✔ Database Servers
- MySQL
- MariaDB
- SQL Server
✔ Network Appliances
- Firewalls
- VPN appliances
- Load balancers
✔ N-tier Architecture
Deploy:
- Frontend in one subnet
- Application tier in another
- Database tier in another
4️⃣ VM Deployment Properties (Exam Important)
When deploying a VM, you configure:
5️⃣ VM Families Explained
Choosing the correct VM family is critical.
🔹 General Purpose
Balanced CPU-to-memory Use cases:
- Dev/Test
- Small web apps
- Light workloads
🔹 Compute Optimized
High CPU-to-memory Use cases:
- Web servers
- Batch processing
- Network appliances
🔹 Memory Optimized
High memory-to-CPU Use cases:
- Relational databases
- Caching
- In-memory analytics
🔹 Storage Optimized
High disk throughput Use cases:
- OLTP databases
- Big data
- Data warehousing
🔹 GPU
Graphics acceleration Use cases:
- Video rendering
- AI training
- Deep learning
- Game servers
🔹 HPC (High Performance Compute)
Maximum performance Use cases:
- Scientific computing
- Geophysics
- Advanced simulations
Docs:
6️⃣ Availability Options (Important for High Availability)
During deployment you can choose:
- No infrastructure redundancy
- Availability Set
- Availability Zone
- VM Scale Set
- Note: Not all regions support Availability Zones.
Docs:
7️⃣ Deployment Walkthrough Summary (Demo Recap)
Steps performed:
- Create Virtual Machine
- Choose Ubuntu 20.04 LTS
- Select VM size (2 vCPU, 8GB RAM)
- Configure authentication (password)
- Select disk type (Premium SSD)
Auto-create:
- Virtual Network
- Subnet
- Public IP
- NIC
- Review + Create
- Deploy
After deployment:
- VM is running
- Public and Private IP assigned
- SSH connectivity available
- Disk and networking configurable
8️⃣ Post-Deployment Management Options
After creation, you can:
- ✔ Start / Stop VM ✔ Restart VM ✔ Resize VM ✔ Change disk size ✔ Modify networking ✔ Add data disks ✔ Configure NSG rules ✔ Connect via SSH or RDP
- Important: Stopping VM without deallocating still incurs compute charges.
9️⃣ VM Networking Concepts
If VM has:
- Public IP → Accessible over internet Private IP only → Internal access only
NSG rules control inbound traffic:
- SSH (22)
- HTTP (80)
- HTTPS (443)
- RDP (3389)
🔟 Migration to Azure
Existing workloads can be migrated using:
- Azure Migrate
Supports:
- VMware
- Hyper-V
- Physical servers
Docs:
1️⃣1️⃣ Cost Considerations
VM pricing depends on:
- VM size
- Disk type
- Region
- Running vs stopped
- Public IP
- Network egress
- Exam Tip: Compute cost stops only when VM is deallocated.
1️⃣2️⃣ Key Exam Concepts to Remember
✔ Azure VMs are IaaS ✔ Managed disks are default ✔ VM deployed inside a VNet ✔ VM requires NIC ✔ VM size determines CPU & memory ✔ VM families optimized for workloads ✔ Availability Zones increase resiliency ✔ Public IP enables internet access ✔ NSGs control traffic ✔ Azure manages hypervisor
1️⃣3️⃣ Mental Model
Think of Azure VM as:
- Cloud-based server rack → Hypervisor managed by Azure → You manage OS and applications
- It’s your datacenter server — just hosted in Azure.
1️⃣4️⃣ Final Takeaways
- ✔ Azure VMs provide flexible IaaS compute ✔ Multiple VM families for workload optimization ✔ Networking and storage are separate Azure resources ✔ Managed disks simplify storage ✔ Public IP enables remote connectivity ✔ Availability options improve uptime ✔ Azure Migrate helps lift-and-shift ✔ VM management continues after deployment
If you'd like next:
- 🧠 VM availability sets vs zones deep dive
- 💰 VM pricing optimization strategies
- 🔐 Securing VMs with NSG + Azure Bastion
- 📘 40 AZ-104 VM scenario questions
- 🚀 Production-ready VM architecture design
- Tell me which certification you're targeting.
Hands-on: Create a Linux VM from the Azure Portal
Goal: Deploy a small Linux VM, connect to it, install a web server, and confirm what supporting Azure resources are created.
- Create or choose a resource group named
az104-compute-rg. - Open Virtual machines > Create > Azure virtual machine.
- Set VM name
az104-linux-01, choose your lab region, choose Ubuntu Server LTS or Azure Linux, and select a low-cost lab size such asStandard_B1s. - Choose SSH public key authentication and create or use an existing key pair.
- Allow inbound SSH only from My IP.
- On the Disks tab, keep the OS disk as a managed disk.
- On the Networking tab, create a new VNet and subnet or use an existing lab VNet.
- Review and create the VM.
- After deployment, open the VM resource and identify the related resources: NIC, public IP, NSG, and OS managed disk.
- Connect with SSH:
ssh azureuser@<public-ip>
- Install nginx:
sudo apt-get update
sudo apt-get install -y nginx
systemctl status nginx
- Add an NSG inbound rule for HTTP TCP 80 from the internet.
- Browse to
http://<public-ip>and confirm nginx loads. - Stop and deallocate the VM when finished.
AZ-104 exam cue
Stopping a VM inside the guest OS does not necessarily stop compute billing. Use Stop in Azure so the VM reaches the Stopped (deallocated) state.
