Unit 6 - Route traffic through the NVA (Subnet publicsubnet) does not exist

Anwaruddin Tokhy 0 Reputation points
2023-11-21T10:26:26.7633333+00:00

Hi,

I am in unit 6 of "Route traffic through the NVA" but cannot create an public VM because I get the following error:

when I run the command:

az vm create \
    --resource-group learn-b23ce92d-ght5-4c6b-8f95-5196f6a798ce \
    --name public \
    --vnet-name vnet \
    --subnet publicsubnet \
    --image Ubuntu2204 \
    --admin-username azureuser \
    --no-wait \
    --custom-data cloud-init.txt \
    --admin-password <password>

I get the following error:

Subnet(publicsubnet) does not exist, but failed to create a new subnet with address prefix 10.0.0.0/24. It may be caused by name or address prefix conflict. Please specify an appropriate subnet name with --subnet or a valid address prefix value with --subnet-address-prefix.

As per the error, it says obviously that the subnet does not exist and could not create a new one. I have not created any other subnets with this name so how come I get this error. Is this something that you have also had? Looking forward to hearing from you.

Best regards,

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,646 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anwaruddin Tokhy 0 Reputation points
    2023-11-21T14:11:49.4233333+00:00

    Hi @Luis Arias , Thanks for your time to answer my question. It is actually solved by logging out and re-login.

    and yes it is a course on MS learn:
    https://learn.microsoft.com/en-us/training/modules/control-network-traffic-flow-with-routes/6-exercise-route-traffic-through-nva

    Best regards,

    Anwar


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.