AZURE Day 27: Deploying Virtual Machines in a Private Virtual Network

Hi,

I am facing the same issue with the “Deploying Virtual Machines in a Private Virtual Network” lab task. Despite configuring the Network Security Group (NSG) exactly as requested to restrict traffic to the VNet’s CIDR block, the validation script continues to fail.

The Error:
The task fails with the following message:

NSG ‘xfusion-priv-nsg’ does not allow access from the VNet’s CIDR block ‘10.0.0.0/16’

What I have tried:
I understand the requirement is to allow access only from the VNet’s CIDR (10.0.0.0/16). To achieve this, I used the CLI to:

Create an Allow rule for 10.0.0.0/16 with Priority 100.

Create a Deny rule for * (Internet/Any) with Priority 200 to satisfy the “only” condition.

Associated the NSG with the Subnet.

I also tried the solution suggested in this GitHub repository

https://github.com/Srikanth0824/kodekloud-engineer/blob/main/100_Days_of_Cloud-Azure/assets/day27.md

This is a good issue to check on recent questions on this forum. Here’s one that may help you.

Unfortunately still not working with me not sure why

I’m consistently getting AllocationFailed when I try to create the VM, so I’m not sure you can do this task right now. I’ll see what I can find out.

Found something interesting: if I allocate all resources to CentralUS, the lab works using Srikanth’s instructions. The lab says “EastUS”, but since that does not work, ignore that.

Hi,
Thanks for your effort. I tried centralus and westus just in case also tried different size Standard D2s v3 and Standard D2s v3 but still the corrector refuses and the task fails.

Not sure where you’re going wrong, TBH. Do make sure that you’re setting the correct disk type (StandardHDD) and other parameters besides the region specified in the task. I’ve done this task enough in the last week to be sure that you can get the VMs to deploy and get the grader to accept your answer.

This is the solution

Put this CIDR Block in source and destination, not source only " 10.0.0.0/16."

1 Like

this solution worked for me thanks for it @Devops_97