This involves a major reconfiguration of your virtual machine. I take no responsibility if these steps don’t work or cause a problem for you!
- Azure Powershell
- Second network interface created in Azure Portal
- Existing network security group with that network interface associated in Azure Portal
- Screenshots of key settings, especially name, size, resource group, location, and disks
- Shutdown virtual machine
- Deleted virtual machine
I didn’t need an availability set so that’s not covered here.
Start with the following script, and amend it for your needs:
To keep it easy to read, I didn’t use any variables except for the repetitive Resource Group name. You can find details of your disks in the storage account for the VM, under the “vhds” container.
Once you run this and log in, wait a few minutes for it to churn through. At the end you should be able to go into the Azure Portal and see your VM back again – now with another network interface.