Mastering Public IPs, Azure DNS, Managed Disks, and VM Resizing
Before scaling my resources, I need to ensure that my users can always find my application. By default, Azure Public IPs can be dynamic, which is a risk for production.
I always switch my MAHARJAN-WEB-APP Public IP from 'Dynamic' to 'Static'. This ensures that even if I stop the VM or resize it, the IP address remains the same, preventing any DNS breaks.
With a Static IP in place, I use Azure DNS to map my domain name. I create a DNS Zone and point my registrar's name servers to Azure. Then, I configure the following records:
| Record Type | Name | Value / Target | Reason |
|---|---|---|---|
| A Record | @ (Root) | Static Public IP | Maps domain to the VM |
| CNAME | www | maharjan-tech.com | Alias for web traffic |
When storage hits its limit, I follow a strict three-phase process to expand my disks without losing data.
I start by Deallocating the VM. Then, under Disks > Size + Performance, I increase the GiB capacity. Azure expands the physical container, but we aren't done yet!
After restarting, I log into the VM. In Windows Disk Management, the new space appears as 'Unallocated'. I right-click my volume and select Extend Volume to claim that space.
Sometimes CPU or RAM is the bottleneck. When my performance metrics show high usage, I perform a VM Resize.
I move from a general-purpose DS1_v2 to a memory optimized DS11_v2. This gives me much more consistent throughput for production workloads.
I always communicate these impacts to stakeholders before I hit 'Resize':
When storage gets full and requires an increase in disk size, especially when naming conventions are missing, follow these steps:
I found some organizations do not manage the Azure disk name with proper Naming Conventions, making it difficult to map with server disk partition names. To resolve this, I need to identify the correct disk via LUN Number.
1. Find the LUN in the Azure Portal
Identify which LUN is assigned to your Azure Disk: Navigate to the Azure Portal > Select VM > Settings > Disks. The LUN column shows the number (0, 1, 2, etc.) associated with each disk name.
2. Map in PowerShell
Use the following commands to match the LUN from the portal to the Drive inside Windows:
From the Azure portal, increase the disk size.
Managing Azure infrastructure requires a proactive approach to connectivity and resource management. Here are the core pillars to remember: