This is probably a stupid question but I am going to ask anyway.
I have a VM running on Azure. I go into network connections and change the IP and gateway and I loose connection.
What options do I have to undo this change, is there any way to reconnect to an Azure VM?
bad news for you there: you can not change the address on the "Physical NIC", you need to do it either in the Ibiza portal and change it there, upon configuration during creation, to a static IP. This will create a reserved lease on the Azure DHCP scope for you.
If you change it in the VM itself then you're lost and you will not be abe to reconnect the VM anymor. in tha case --> recreating the VM is the only option sorry!!
I was able to fix this by changing the IP address settings to a static IP. Then de-allocating and starting the VM again. This was done in the Azure RM portal, haven't tested in Classic.
Open your VM in the portal > Network Interfaces > Select your Nic > IP configurations > ipconfig1 (or whatever you called it) > changed to static and assigned an address not currently in use.
on new azure portal, Redeploy the VM. it will keep all data, but net configuration will reset.
I sadly did the same and after panicing like mad and scratching my hair out I found that going into Virtual Machines -> -> Networking Interfaces -> -> IP Configuration -> ipconfigx (where x is the config number(default is 1)) -> and set to static -> Click on SAVE at the top
The VM will reboot and you should hopefully be able to reconnect again.