What is a Virtual Machine (VM)?
A Virtual Machine in Azure is just like a server in your on-premises datacenter, but hosted in the cloud.
You can choose the OS (Windows/Linux), VM size, and configuration — Azure provides the hardware and virtualization.
VM Sizes
Azure offers VM sizes for different workloads:
-
General Purpose (D-series, B-series): Balanced CPU/memory. Good for dev/test and small apps.
-
Compute Optimized (F-series): High CPU-to-memory ratio. Best for batch processing or web servers.
-
Memory Optimized (E-series, M-series): Large memory capacity. Ideal for databases, in-memory analytics.
-
Storage Optimized (L-series): High disk throughput. For big data, NoSQL, or heavy I/O.
-
GPU VMs (NC, NV): For AI, ML, rendering workloads.
-
High Performance Compute (H-series): For simulations and scientific workloads.
Exam trick: If you see “cost-efficient dev/test,” → B-series burstable VMs. If you see “memory-intensive database,” → E-series.
Disks in VMs
-
OS Disk:
-
Stores the operating system.
-
Default = 127 GB managed disk.
-
Persistent across reboots.
-
-
Data Disks:
-
Attached for apps/databases.
-
Up to 32 TB each.
-
Multiple data disks per VM.
-
-
Temporary Disk:
-
Comes free with most VMs (D: drive on Windows,
/dev/sdb1on Linux). -
Used for caching/swap.
-
Not persistent → data is lost if VM is stopped/deallocated.
-
VM Extensions
Small applications that run inside a VM to provide management/automation.
Examples:
-
Custom Script Extension: Run scripts after VM deployment.
-
Azure Monitor Agent: Collect logs and metrics.
-
Desired State Configuration (DSC): Ensure VMs meet configuration requirements.
Confusion Buster 🚨
-
Temporary Disk vs Data Disk
-
Temporary disk = ephemeral, don’t store important data.
-
Data disk = persistent, survives reboots/stops.
-
-
OS Disk vs Image
-
OS Disk = the actual running OS of a VM.
-
Image = template used to create multiple VMs.
-
Simple Example
A company deploys:
-
B-series VMs for their dev/test environment (low cost).
-
E-series VMs for their production SQL database.
-
They attach multiple Premium SSD data disks to improve performance.
-
A Custom Script Extension installs security updates on each VM after deployment.
Exam Tip
-
If a scenario mentions ephemeral storage, the answer is Temporary Disk.
-
If it mentions standard dev/test VMs, answer is B-series.
-
If it mentions memory-heavy databases, pick E-series or M-series.
-
For automation after deployment, think VM Extensions.
What to Expect in the Exam
-
Direct Q: “Which disk is wiped when VM is deallocated?” → Temporary Disk.
-
Scenario: “You need a cost-effective VM for dev/test workloads.” → B-series.
-
Scenario: “A SQL server needs lots of memory and fast IOPS.” → E-series + Premium SSDs.
-
Trick Q: “VM extensions are used to resize VM hardware.” (False — resizing is done from the portal, not extensions).