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,