0
0
Azurecloud~10 mins

VM states (running, stopped, deallocated) in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - VM states (running, stopped, deallocated)
VM Created
Start VM
VM Running
Stop VM
VM Stopped
Deallocate VM
VM Deallocated
Start VM
This flow shows how a virtual machine moves between states: starting runs it, stopping pauses it, and deallocating frees resources.
Execution Sample
Azure
Create VM
Start VM
Stop VM
Deallocate VM
Start VM
This sequence creates a VM, starts it, stops it, deallocates it, then starts it again.
Process Table
StepActionVM State BeforeVM State AfterNotes
1Create VMNoneStoppedVM is created but not running yet
2Start VMStoppedRunningVM is powered on and running
3Stop VMRunningStoppedVM is powered off but resources still allocated
4Deallocate VMStoppedDeallocatedVM resources are freed, no charges for compute
5Start VMDeallocatedRunningVM is allocated resources and powered on again
💡 After step 5, VM is running and ready for use.
Status Tracker
VM StateStartAfter Step 1After Step 2After Step 3After Step 4After Step 5
stateNoneStoppedRunningStoppedDeallocatedRunning
Key Moments - 3 Insights
Why is the VM state 'Stopped' after creation and not 'Running'?
When a VM is created, it is initially in the 'Stopped' state because it is not powered on yet. This is shown in execution_table row 1.
What is the difference between 'Stopped' and 'Deallocated' states?
'Stopped' means the VM is powered off but still holds resources and incurs charges. 'Deallocated' means resources are freed and no compute charges apply, as seen in rows 3 and 4.
Can you start a VM directly from the 'Deallocated' state?
Yes, starting a VM from 'Deallocated' reallocates resources and powers it on, shown in row 5.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the VM state after step 3?
AStopped
BRunning
CDeallocated
DNone
💡 Hint
Check the 'VM State After' column for step 3 in the execution_table.
At which step does the VM free its resources and stop incurring compute charges?
AStep 2
BStep 4
CStep 3
DStep 5
💡 Hint
Look for the 'Deallocated' state in the execution_table and notes.
If you start the VM immediately after creation, what will be the VM state after that action?
AStopped
BDeallocated
CRunning
DNone
💡 Hint
Refer to step 2 in the execution_table where 'Start VM' changes state to 'Running'.
Concept Snapshot
VM states in Azure:
- Created VM starts in 'Stopped' state.
- 'Running' means VM is powered on.
- 'Stopped' means VM is off but resources held.
- 'Deallocated' means resources freed, no compute charges.
- You can start VM from 'Stopped' or 'Deallocated' to run it.
Full Transcript
This lesson shows how an Azure virtual machine changes states. When you create a VM, it starts in the stopped state, meaning it is off but ready. Starting the VM powers it on and it becomes running. Stopping the VM powers it off but keeps resources allocated, so you still pay for them. Deallocating the VM frees those resources and stops compute charges. You can start the VM again from either stopped or deallocated states to run it. The execution table traces these state changes step by step.