Azure virtual network - How to change localnetworksite address space?

2.8k Views Asked by At

I need to change the address space prefix in my virtual network configuration. How can I do this?

<LocalNetworkSites>
<LocalNetworkSite name="xxx-xxx-DC">
<AddressSpace>
<AddressPrefix>xx.xx.15.0/24</AddressPrefix>
<AddressPrefix>xx.xx.67.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>xx.xxx.xx.xx</VPNGatewayAddress>
</LocalNetworkSite>
</LocalNetworkSites>
3

There are 3 best solutions below

2
On

Your extract shows the local network definition whilst your question seem to refer to the virtual network itself, but actually it doesn't really matter as the answer is the same - You can't change the address space for either on a created network.

You will have to

  1. Export the configuration
  2. Make the changes you require (make sure to change subnets as well)
  3. Delete the network
  4. Re-create the network by importing the modified configuration
  5. Re-deploy your services
0
On

Yossi, Is this a Microsoft supported solution?. The reason I ask is apart from having to create the vm's I also have to change the config on the local vpn side as the IP address of the gateway and shared key changes. Fortunately I only have 3 vm's but lets say I had 20, this would not be a sustainable solution at all.

0
On

I agree with user3120398 that this is not a viable and sustainable solution and it still seems to be modus operandi more than a year later :-(