I have my Azure account with one affinity group, one virtual network, and a bunch of VMs hanging off of it.
I’m now trying to create a second of each…basically a mirror of the first with new names/IPs/… However, it’s giving me a weird error.
The files, when run, give this error:
set-azurevnetconfig : Failed:
Cannot delete or modify virtual network while in use 'topo8vnet'.
At C:\foo\net.ps1:3 char:1
+ set-azurevnetconfig -ConfigurationPath "$pathDir\topo9.netcfg"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzureVNetConfig], Exception
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.SetAzureVNetConfigCommand
Note that the network name is topo8vnet in the error. What’s so interesting is that
the files executed never reference this name…they are referring to topo9. Topo8 does exist (that's my first one that already exists), but I’m trying to create topo9.
Why is the set-azurevmconfig command targeting the wrong affinity group? I assume I must be missing some important command which tells it which affinity group to target and so it’s picking a default of some sort, but for the life
of me I can’t find it…
Thx!