This content originally appeared on DEV Community and was authored by Isaiah Izibili
🚀 Step 1: Create Your First Virtual Machine (VM)
The journey begins with setting up a VM in the Azure Portal — think of it as building the foundation of your cloud house.
1. Sign in to Azure Portal
Head over to portal.azure.com and sign in with your Azure account.
2. Launch a New VM Wizard
In the left-hand menu, click Create a resource.
Under Compute, select Virtual Machine.
3. Configure the Basics
Here’s where you define the identity of your VM:
- Subscription – Choose the subscription under which resources will be billed.
- Resource group – Group related resources for easy management (create new or reuse).
- VM Name
- Region – Select a region close to your users for lower latency.
- Availability options – Choose redundancy level (e.g., single zone, availability zone).
- Image – Pick your operating system (Windows Server, Ubuntu, etc.).
- Size – Select based on CPU/RAM needs.
- Authentication – Password or SSH key (SSH is more secure for Linux).
4. Networking Setup
By default, Azure creates a new VNet and subnet.
You can customize if you already have a network design.
5. Management, Security, and Advanced Settings
- Enable auto-shutdown to save costs.
- Turn on boot diagnostics for easier troubleshooting.
6. Review + Create
- Double-check everything, then click Create.
Azure will deploy your VM in a few minutes. 🎉
đź’ľ Step 2: Enhance the VM (Add Storage, Security & Monitoring)
Now that your VM is alive, let’s give it more power and visibility.
1. Attach a Data Disk
- Go to your VM → Disks → Add data disk.
- Specify size, name, and caching preferences.
Hit Save.
đź’ˇ Pro Tip: Keep OS disk for system files only. Store applications/data on attached data disks for better performance and scalability.
2. Configure Networking
- NSG Rules: Allow only required traffic (e.g., RDP 3389 for Windows, SSH 22 for Linux).
- VNet/Subnet: Ensure your VM lives in the right subnet for connectivity.
3. Enable Monitoring
- Under Monitoring, turn on Azure Monitor / Log Analytics (via AMA + DCRs).
- This enables performance tracking and log collection for health insights.
4. Install Software and Extensions
Connect to your VM (RDP/SSH).
Install apps or use Extensions for automation (e.g., Custom Script Extension).
đź–Ľ Step 3: Capture Your VM as a Reusable Image
Before scaling, you need a template image — this ensures all future VMs start with the same setup.
1. Prepare the VM
Install apps, apply patches, and configure settings.
Remove temporary files, browser history, or unique identifiers.
2. Generalize the VM (Windows)
- RDP into VM → open Command Prompt (Admin).
%windir%\system32\sysprep\sysprep.exe /oobe /generalize /shutdown /quiet
⚠️ Note: /oobe ensures the VM boots into first-time setup mode.
📦 Step 4: Build a Shared Image Gallery
Think of this as your central library of VM images.
1. Create the Gallery
- Go to Create a resource → Compute → Shared Image Gallery.
- Enter name, region, resource group → Create.
Inside the gallery, click + Image Version.
Select the captured image as source.
Define versioning (e.g., 1.0.0).
3. Capture the VM
In Portal: VM → Operations → Capture.
- Name your image.
- Choose “Yes” to delete VM after capture.
- Select Create a managed image.
⚖️ Step 5: Deploy a Virtual Machine Scale Set (VMSS)
VMSS = automatic scaling army of VMs built from your golden image.
1. Create VMSS
Portal → Create a resource → Compute → Virtual Machine Scale Set.
2. Basic Settings
- Pick resource group, region, and name.
- For Image, select your Shared Image Gallery image.
- Choose size and instance count.
3. Networking
Attach to existing VNet/Subnet.
Add load balancer if traffic distribution is needed.
4. Scaling
Configure auto-scaling rules (CPU %, schedule-based).
Review + Create.
âś… Step 6: Test Your Scale Set
- Scale Up → Increase instance count and watch Azure deploy new VMs.
- Scale Down → Reduce instances and see cost optimization in action.
This content originally appeared on DEV Community and was authored by Isaiah Izibili

Isaiah Izibili | Sciencx (2025-08-20T01:15:40+00:00) Step-by-Step Guide: From Virtual Machine to Scale Set in Azure Porta. Retrieved from https://www.scien.cx/2025/08/20/step-by-step-guide-from-virtual-machine-to-scale-set-in-azure-porta/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.