Q: I configured my Windows Azure IaaS virtual machine with a static IP address, and now I've lost connectivity to it. What can I do?
A: Windows Azure IaaS doesn't support statically assigning an IP address to a virtual machine. All IP addresses must be assigned through DHCP by Windows Azure. Even if you statically assign the same IP address that was dynamically assigned via DHCP by Windows Azure, you'll lose connectivity at some point as Windows Azure updates its routing. If you want control of the IP addressing, you should create virtual networks with specific virtual subnets in Windows Azure—which will allocate IP addresses to virtual machines from your defined IP ranges.
At this point, if you've lost the ability to communicate with your virtual machine, there's no way to reestablish that communication or change its IP address. The only course of action is to delete the virtual machine but keeps its virtual hard disk and then create a new virtual machine using the existing VHD.
- In the Windows Azure portal, navigate to the Virtual Machines view.
Select the virtual machine and then select Delete, Keep the attached disks, as the following figure shows.
- Click Yes to confirm the deletion.
- After the virtual machine is deleted, create a new virtual machine and use the existing disk by selecting New, Virtual Machine, From Gallery.
Select My Disks, then select the VHD from the virtual machine that was deleted, as the following figure shows.
- Enter the remainging details for the virtual machine, and click Create.
After the virtual machine is created, you'll be able to connect again.