Azure Power Shell - How to change network subnet
Changing the Virtual Network for an exiting ARM deployed VM is not possible. But, changing the subnet for a VM is quite easy.
- Login the Azure Portal
- In Resource groups, choose the resource group your VM is in.
- Choose your VM in the resources list of your resource group.
- in Setting blade of your VM, and choose Network Interfaces.
- Select the network interface you want to change, and click IP Address.
- Choose a Subnet, and specify an IP address, or choose Dynamic Assignment.
- If none of the exiting subnets meets your requirement, click your Virtual network to create a new subnet.
If you really want to change the Virtual Network of your VM, you can backup your OS Disk, and create a new VM with the OS Disk, and of course with the desired Virtual Network.