Configure Static Internal IP for Azure VMs
Your company has two on-premises servers named SRV01 and SRV02. Developers have created an application that runs on SRV01. The application calls a service on SRV02 by IP address. You plan to migrate the application on Azure virtual machines (VMs). You have configured two VMs on a single subnet in an Azure virtual network. You need to configure the two VMs with static internal IP addresses. What should you do?
Community Insight
The AZ-104 exam tests Azure Resource Manager (ARM) concepts, making classic deployment cmdlets like Set-AzureStaticVNetIP invalid traps.
Assigning a static private IP address to an Azure VM requires modifying the network interface configuration in the Azure portal, as classic PowerShell cmdlets are deprecated. This guide clarifies the correct ARM deployment method for AZ-104.
Choosing the classic Set-AzureStaticVNetIP cmdlet (Option E) because it sounds correct for older exams, but it is deprecated and does not work for ARM VMs.
Community Discussion (116 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option C is correct because in the Azure Resource Manager (ARM) model, you assign a static internal IP address by modifying the network interface properties via the Azure portal. While the option broadly says "VM properties," the setting is accessed through the VM's networking blade, which leads to the underlying NIC configuration where the private IP allocation method is set to Static.Why the Other Options Are Wrong
Option A (New-AzureRMVMConfig) is used to create a local VM configuration object, not to update an existing VM's IP configuration. Option B (Set-AzureSubnet) is not a valid cmdlet for configuring a static IP on a VM. Option D is incorrect because changing IP settings inside the Windows guest OS via Network and Sharing Center will break Azure networking. Option E (Set-AzureStaticVNetIP) is a deprecated Azure Service Management (Classic) cmdlet and does not apply to ARM VMs.Community Comment Notes
Multiple commenters point out that Option E is a legacy cmdlet for Classic VMs, as DT95 noted, "E is wrong in 2024. The Set-AzureStaticVNetIP cmdlet is part of the classic (ASM) PowerShell module". While jellybiscuit correctly observes that "static IP settings are on the network interface, not the virtual machine," Option C remains the closest valid ARM-based method among the choices, assuming "VM properties" implies the networking properties accessed through the VM blade.Official Reference
Exam Strategy
For AZ-104, always eliminate any options using Azure Service Management (ASM) cmdlets like Set-Azure* without the Az prefix, as the exam strictly tests Azure Resource Manager (ARM) deployments.
Related Analysis
Practice All AZ-104 Questions
Access 100 questions with complete answers and detailed explanations.
View Full AZ-104 Practice Test →