Managing VNets with Virtual Network Manager
Complete the full lesson to earn 25 points — 50 with Pro
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks, the wait, and see fewer ads — read each lesson on a single page with Pro
Managing VNets with Virtual Network Manager: A Comprehensive Guide
Introduction: Why Network Management Matters
In modern cloud environments, infrastructure grows quickly. What starts as a single Virtual Network (VNet) for a pilot project often evolves into a complex web of interconnected networks, subnets, and security boundaries. As an organization scales, managing these network resources manually becomes prone to human error, configuration drift, and security gaps. This is where centralized orchestration becomes essential.
Virtual Network Manager (VNM) acts as a control plane for your cloud network architecture. Instead of configuring security rules or connectivity peering on a per-VNet basis, you define policies at a higher level. This allows you to enforce consistency across subscriptions, regions, and environments. Whether you are managing a small startup footprint or a global enterprise architecture, understanding how to control your network topology and security posture from a central point is vital for maintaining a secure and performant environment.
This lesson explores how to use Virtual Network Manager to simplify network administration, enforce security baselines, and manage connectivity at scale. By moving away from decentralized management, you reduce the risk of misconfiguration and ensure that every VNet in your organization adheres to the same security standards.
Understanding the Core Concepts of VNM
Before diving into the configuration, it is important to understand the hierarchy and the components that make up the Virtual Network Manager service. VNM operates on a scope-based model, meaning you define the boundaries where your network policies apply.
The Management Group and Subscription Scope
VNM policies are tied to a specific scope. You can apply these policies to Management Groups or individual Subscriptions. When you apply a policy at a Management Group level, it automatically cascades down to all subscriptions and VNets contained within that group. This is the most effective way to ensure "compliance by default" for new resources.
Connectivity Configurations
Connectivity configurations define how your VNets talk to each other. Instead of manually creating VNet peering connections between every pair of networks, you define a topology in VNM. The two primary topologies are:
- Hub-and-Spoke: A central hub VNet connects to multiple spoke VNets. This is the industry standard for isolating workloads while allowing controlled communication through a central point.
- Mesh: Every VNet in the group is directly peered with every other VNet in the group. This is useful for small, flat environments where high-speed, direct communication is required, but it can become expensive and complex as the number of VNets increases.
Security Admin Configurations
Security Admin configurations allow you to define network security rules that override standard Network Security Group (NSG) rules. These rules are applied at the VNet level and are evaluated before the standard NSG rules. This gives security teams the ability to enforce "deny" rules that developers or application owners cannot remove or bypass, effectively creating a "guardrail" for the entire network.
Callout: VNM vs. Standard NSGs A common point of confusion is the relationship between VNM Security Admin rules and standard Network Security Groups (NSGs). Think of VNM Security Admin rules as the "global policy" layer that sits above the "local configuration" layer of NSGs. If a VNM rule says "Deny traffic on port 22," it will block that traffic regardless of what the local NSG allows. This makes VNM an essential tool for enforcing organization-wide security policies.
Setting Up Your First Virtual Network Manager Instance
To begin managing your networks, you must first deploy the VNM resource. This involves choosing the correct scope and selecting the features you intend to use.
Step-by-Step Deployment
- Search for Virtual Network Manager: In your cloud portal, search for "Network Manager" and select the service.
- Create Resource: Click the "Create" button. You will be prompted to select a subscription and a resource group.
- Define Scope: Choose the Management Group or Subscription that will be managed by this instance.
- Select Features: Choose between "Connectivity," "Security Admin," or both. If you are just starting, it is common to enable both to get full control over your environment.
- Deployment: Once deployed, the service will appear in your resource list. Note that the initial setup might take a few minutes as the service discovers the existing VNets within your selected scope.
Note: The scope you select during creation cannot be changed later. If you need to manage a different set of subscriptions, you will need to create a new VNM instance. Choose your scope carefully to align with your organizational structure.
Configuring Connectivity: The Hub-and-Spoke Model
The Hub-and-Spoke model is the most common architecture for cloud networking. It provides a clean separation of concerns: the hub handles shared services (like firewalls, VPN gateways, or inspection appliances), while the spokes handle specific application workloads.
Defining a Network Group
Before you can configure connectivity, you need to group your VNets. You can do this manually or by using dynamic membership. Dynamic membership is highly recommended because it scales automatically.
Example: Dynamic Membership Query
You can define a rule where any VNet with a specific tag (e.g., Environment: Production) is automatically added to a specific Network Group.
{
"groupQuery": "resource.tags['Environment'] == 'Production'",
"groupName": "Production-VNets"
}
Creating the Connectivity Configuration
Once your Network Group is established, follow these steps:
- Navigate to Configurations: Inside your VNM instance, select "Configurations" and click "Add."
- Select Connectivity: Choose "Connectivity configuration."
- Define Topology: Select "Hub-and-Spoke."
- Select Hub: Choose the VNet that will serve as the hub.
- Select Spokes: Select the Network Group you created earlier.
- Direct Peering: Decide if you want spokes to communicate directly with each other. In most secure architectures, you should leave this disabled to force traffic through the hub.
Tip: Always enable "Gateway Transit" if your hub VNet contains a VPN or ExpressRoute gateway. This allows your spoke VNets to access on-premises resources through the hub without needing their own individual gateways.
Implementing Security Admin Rules
Security Admin rules are your primary weapon against misconfiguration. By defining these rules at the VNM level, you ensure that even if a user creates a new VNet and forgets to apply an NSG, the global security baseline remains in effect.
Rule Collections and Priority
Security Admin rules are organized into collections. Each collection contains a set of rules. Rules are processed based on their priority—the lower the number, the higher the priority.
Example: Blocking SSH Access Globally If you want to ensure that no VNet in your production environment allows SSH access from the internet, you can create a high-priority "Deny" rule.
- Create Rule Collection: Name it "Global-Deny-Rules."
- Add Rule:
- Name: Deny-SSH-Internet
- Priority: 100
- Direction: Inbound
- Action: Deny
- Protocol: TCP
- Source: Any
- Destination Port: 22
- Apply to Group: Target your "Production-VNets" network group.
The Power of "Deny" Rules
Unlike standard NSGs, where "Allow" rules often take precedence, VNM Security Admin "Deny" rules are evaluated before any other rule. This is critical for security. If a developer accidentally opens a port on their local NSG, the global VNM "Deny" rule will still catch and block that traffic.
Best Practices for Managing Network Scale
Managing hundreds of VNets requires a structured approach. Without discipline, your VNM configuration can become as messy as the network it is supposed to manage.
1. Use Consistent Tagging
VNM relies on metadata to group resources. Implement a strict tagging policy across your organization. If you use tags like Project, Environment, and Owner, you can build dynamic network groups that automatically adapt as you provision new infrastructure.
2. Prioritize "Least Privilege"
When creating Security Admin rules, start with the most restrictive posture possible. Use "Deny All" as your baseline and add specific "Allow" exceptions only where absolutely necessary. This reduces the attack surface of your entire cloud footprint.
3. Maintain Documentation of Hierarchy
Since VNM policies can cascade down from Management Groups, it is possible for a lower-level administrator to be confused by rules they did not create. Maintain clear documentation regarding which Management Group level is responsible for which security policies.
4. Leverage "Dry Run" Capabilities
Before committing a new configuration, use the validation tools provided in the VNM portal. These tools check for conflicts with existing peering or NSG rules, helping you avoid accidental connectivity outages.
Warning: Be extremely careful when editing existing Connectivity Configurations. If you remove a VNet from a Hub-and-Spoke group, VNM will automatically delete the peering connections. This can result in an immediate loss of connectivity for production workloads. Always verify the impact before applying changes.
Common Pitfalls and How to Avoid Them
Even with a powerful tool like VNM, mistakes happen. Understanding these common pitfalls will help you maintain a stable network.
The "Over-Peering" Problem
In a mesh topology, adding too many VNets can lead to an exponential increase in the number of peering connections. This not only consumes IP address space but can also hit resource limits.
- The Fix: Use Hub-and-Spoke whenever possible. It keeps the number of peering connections linear rather than exponential.
Configuration Drift
Sometimes, administrators will manually edit individual NSGs, forgetting that VNM is the source of truth.
- The Fix: Use Infrastructure as Code (IaC) tools like Terraform or Bicep to manage your VNM instances. By keeping your network configuration in version control, you ensure that any manual "drift" can be easily reverted by re-deploying the code.
Ignoring Rule Priority
When you have multiple rule collections, it is easy to lose track of which rule is evaluated first.
- The Fix: Use a standardized numbering scheme for priorities (e.g., 100, 200, 300). Leave gaps between priorities so you can insert new rules in the future without having to re-number everything.
Comparison: VNM vs. Manual Peering vs. NSG Management
| Feature | Manual Peering | Standard NSGs | Virtual Network Manager |
|---|---|---|---|
| Scope | VNet-to-VNet | Subnet/NIC | Subscription/Management Group |
| Automation | Manual | Manual/Scripts | Automated (Dynamic Groups) |
| Security | None | Local Control | Centralized "Guardrails" |
| Scalability | Low | Low | High |
| Complexity | High (n^2 connections) | High (per-resource) | Low (central policy) |
Advanced Automation with Infrastructure as Code
While the portal is great for learning, production environments should always be managed via code. Using Terraform or Bicep allows you to treat your network topology as a versioned product.
Example: Defining a VNM Hub-and-Spoke in Bicep
This snippet shows how you would define a basic VNM connectivity configuration using Bicep.
resource connectivityConfig 'Microsoft.Network/networkManagers/connectivityConfigurations@2022-09-01' = {
name: 'prod-connectivity-config'
parent: networkManager
properties: {
connectivityTopology: 'HubAndSpoke'
hub: {
resourceId: hubVnet.id
}
isGlobal: true
appliesToGroups: [
{
networkGroupId: networkGroup.id
}
]
}
}
By using code, you ensure that every team member is deploying the same network architecture. It also provides a clear audit trail of who changed the network, when they changed it, and why.
Troubleshooting Connectivity Issues
When things go wrong, the first instinct is to check the VNet peering status. However, with VNM, you have an extra layer to investigate.
- Check Configuration Deployment: Ensure the configuration has been successfully deployed to the target region. Sometimes, a configuration will show as "pending" if there is a conflict.
- Validate Network Groups: Check if the VNet you are testing is actually a member of the Network Group. If you are using dynamic membership, verify the tags on the VNet.
- Review Security Admin Logs: If connectivity is blocked, check the "Security Admin" logs. These logs will explicitly state which VNM rule caused the traffic to be dropped.
- Check for Overlapping IP Ranges: Even with VNM, you cannot peer VNets if they have overlapping CIDR blocks. VNM cannot fix an architectural flaw like IP address overlap.
Frequently Asked Questions (FAQ)
Q: Can VNM manage VNets in different regions?
A: Yes. By setting the isGlobal property to true in your connectivity configuration, you can peer VNets across different geographic regions.
Q: Does VNM cost extra? A: VNM typically charges per managed VNet per hour. Check your cloud provider's official pricing page for the most current rates, as these can change based on the region and the number of managed resources.
Q: Can I use VNM to manage VNets in other subscriptions? A: Yes, as long as the VNM instance is created at the Management Group level that includes those subscriptions.
Q: What happens if I delete the VNM resource? A: Deleting the VNM resource will remove the connectivity configurations and security admin rules it manages. This will cause all VNet peerings created by VNM to be deleted, potentially causing a major network outage. Always plan carefully before removing the service.
Key Takeaways for Network Administrators
- Centralize Control: Virtual Network Manager is the most effective way to move from manual, per-VNet management to a centralized, policy-driven model.
- Dynamic Membership is Key: Use tags to define your network groups dynamically. This ensures that your network policies automatically apply to new resources as they are created.
- Security Guardrails: Use VNM Security Admin rules to enforce a global "deny" baseline. This provides a safety net that protects your environment even if local NSG configurations are incorrect.
- Hub-and-Spoke Efficiency: Favor the Hub-and-Spoke topology to minimize complexity and keep your network architecture manageable at scale.
- Audit and Version Control: Always manage your network configurations through code. This prevents configuration drift and provides a clear history of your network's evolution.
- Plan for Overlap: Remember that VNM cannot solve fundamental networking issues like overlapping IP address ranges. Proper IP address management (IPAM) remains a prerequisite for any cloud network.
- Monitor and Validate: Use the built-in validation tools and logging features to ensure your configurations are applied correctly and to troubleshoot connectivity issues efficiently.
By mastering Virtual Network Manager, you move from being a reactive network operator to a proactive cloud architect. You gain the ability to enforce standards, reduce the risk of security breaches, and simplify the management of complex, multi-region infrastructures. Start small by onboarding a single non-production environment, and as your confidence grows, expand your VNM reach to your entire organizational footprint.
Reach the last section to complete this lesson and earn points — you're on section 1 of 10.
- Understanding Azure Built-in Role Assignments
- Understanding Azure Built-in Role Assignments5q
- Managing Custom Azure Roles
- Managing Custom Azure Roles5q
- Creating Custom Microsoft Entra Roles
- Creating Custom Microsoft Entra Roles5q
- Planning Privileged Identity Management
- Planning Privileged Identity Management5q
- Configuring PIM Settings and Assignments
- Configuring PIM Settings and Assignments5q
- Implementing Multi-Factor Authentication
- Implementing Multi-Factor Authentication5q
- Implementing Conditional Access Policies
- Implementing Conditional Access Policies5q
- Advanced Conditional Access Scenarios
- Advanced Conditional Access Scenarios5q
- Managing Enterprise Application Access
- Managing Enterprise Application Access5q
- Managing OAuth Permission Grants
- Managing OAuth Permission Grants5q
- Configuring App Registration Permission Scopes
- Configuring App Registration Permission Scopes5q
- Managing Service Principals
- Managing Service Principals5q
- Managing Managed Identities
- Managing Managed Identities5q
- Planning and Implementing NSGs
- Planning and Implementing NSGs5q
- Implementing Application Security Groups
- Implementing Application Security Groups5q
- Managing VNets with Virtual Network Manager
- Managing VNets with Virtual Network Manager5q
- Implementing User-Defined Routes
- Implementing User-Defined Routes5q
- Configuring VNet Peering and VPN Gateway
- Configuring VNet Peering and VPN Gateway5q
- Implementing Virtual WAN and Secured Hub
- Implementing Virtual WAN and Secured Hub5q
- Securing VPN and ExpressRoute Connectivity
- Securing VPN and ExpressRoute Connectivity5q
- Monitoring with Network Watcher
- Monitoring with Network Watcher5q
- Implementing Service Endpoints
- Implementing Service Endpoints5q
- Implementing Private Endpoints
- Implementing Private Endpoints5q
- Implementing Private Link Services
- Implementing Private Link Services5q
- Network Integration for App Service and Functions
- Network Integration for App Service and Functions5q
- Network Security for ASE and SQL Managed Instance
- Network Security for ASE and SQL Managed Instance5q
- Implementing TLS for Applications
- Implementing TLS for Applications5q
- Planning and Implementing Azure Firewall
- Planning and Implementing Azure Firewall5q
- Managing Firewall Policies with Azure Firewall Manager
- Managing Firewall Policies with Azure Firewall Manager5q
- Implementing Azure Application Gateway
- Implementing Azure Application Gateway5q
- Implementing Azure Front Door and CDN
- Implementing Azure Front Door and CDN5q
- Implementing Web Application Firewall
- Implementing Web Application Firewall5q
- Implementing Azure DDoS Protection
- Implementing Azure DDoS Protection5q
- Remote Access with Azure Bastion
- Remote Access with Azure Bastion5q
- Implementing Just-in-Time VM Access
- Implementing Just-in-Time VM Access5q
- Configuring AKS Network Isolation
- Configuring AKS Network Isolation5q
- Securing and Monitoring AKS
- Securing and Monitoring AKS5q
- AKS Authentication Configuration
- AKS Authentication Configuration5q
- Security Monitoring for Container Instances and Apps
- Security Monitoring for Container Instances and Apps5q
- Managing Access to Azure Container Registry
- Managing Access to Azure Container Registry5q
- Configuring Disk Encryption Options
- Configuring Disk Encryption Options5q
- Security for Azure API Management
- Security for Azure API Management5q
- Configuring Storage Account Access Control
- Configuring Storage Account Access Control5q
- Managing Storage Account Access Keys
- Managing Storage Account Access Keys5q
- Configuring Access to Azure Files
- Configuring Access to Azure Files5q
- Configuring Access to Azure Blob Storage
- Configuring Access to Azure Blob Storage5q
- Data Protection with Soft Delete and Versioning
- Data Protection with Soft Delete and Versioning5q
- Configuring BYOK and Infrastructure Encryption
- Configuring BYOK and Infrastructure Encryption5q
- Enabling Microsoft Entra Database Authentication
- Enabling Microsoft Entra Database Authentication5q
- Enabling Database Auditing
- Enabling Database Auditing5q
- Implementing Dynamic Data Masking
- Implementing Dynamic Data Masking5q
- Implementing Transparent Data Encryption
- Implementing Transparent Data Encryption5q
- Using Azure SQL Always Encrypted
- Using Azure SQL Always Encrypted5q
- Creating and Assigning Azure Policies
- Creating and Assigning Azure Policies5q
- Interpreting Azure Policy Initiatives
- Interpreting Azure Policy Initiatives5q
- Configuring Key Vault Network Settings
- Configuring Key Vault Network Settings5q
- Configuring Key Vault Access Policies and RBAC
- Configuring Key Vault Access Policies and RBAC5q
- Managing Certificates Secrets and Keys
- Managing Certificates Secrets and Keys5q
- Configuring Key Rotation and Backup
- Configuring Key Rotation and Backup5q
- Implementing Backup Security Controls
- Implementing Backup Security Controls5q
- Using Secure Score and Inventory
- Using Secure Score and Inventory5q
- Managing Compliance Standards
- Managing Compliance Standards5q
- Adding Custom Standards to Defender
- Adding Custom Standards to Defender5q
- Connecting Multi-Cloud Environments
- Connecting Multi-Cloud Environments5q
- Using External Attack Surface Management
- Using External Attack Surface Management5q
- Enabling Cloud Workload Protection Plans
- Enabling Cloud Workload Protection Plans5q
- Configuring Defender for Servers
- Configuring Defender for Servers5q
- Configuring Defender for Databases and Storage
- Configuring Defender for Databases and Storage5q
- Implementing Agentless VM Scanning
- Implementing Agentless VM Scanning5q
- Managing Vulnerability Management for VMs
- Managing Vulnerability Management for VMs5q
- Configuring DevOps Security
- Configuring DevOps Security5q
- Managing Security Alerts
- Managing Security Alerts5q
- Configuring Workflow Automation
- Configuring Workflow Automation5q
- Configuring Data Collection Rules
- Configuring Data Collection Rules5q
- Configuring Sentinel Data Connectors
- Configuring Sentinel Data Connectors5q
- Enabling Analytics Rules in Sentinel
- Enabling Analytics Rules in Sentinel5q
- Configuring Automation in Sentinel
- Configuring Automation in Sentinel5q
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles the points you earn on every lesson and quiz so you progress twice as fast, unlocks half of every practice exam — plus full case studies — with the Learn & Exam study modes, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× points per lesson & quiz
- ✓ 50% of every exam unlocked
- ✓ Learn & Exam modes
- ✓ Distraction-free lessons