Azure Power Shell - How to change network subnet Azure Power Shell - How to change network subnet azure azure

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.

  1. Login the Azure Portal
  2. In Resource groups, choose the resource group your VM is in.
  3. Choose your VM in the resources list of your resource group.
  4. in Setting blade of your VM, and choose Network Interfaces.enter image description here
  5. Select the network interface you want to change, and click IP Address.enter image description here
  6. Choose a Subnet, and specify an IP address, or choose Dynamic Assignment.enter image description here
  7. If none of the exiting subnets meets your requirement, click your Virtual network to create a new subnet.enter image description here

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.