What I have read so far on the web is that there is no way to add a reserved IP to an existing VM (unless I recreate the VM which I am trying to avoid). However, I have noticed that external IP of my VM and the cloud service is same.
Reserved IP Addresses page explains how to "To use a Reserved IP with Cloud Services". I have looked everywhere in the Azure Management Portal but couldn't find a configuration setting for Service Configuration Schema.
I am using the Azure scheduler to turn-off the VMs at night and on the weekends. From the following I understand is that there is something that I need to write in the scheduler script to re-assign the Reserved IP when the VM starts in the morning. Did I get it right?
Shutdown VM - Previously, when all the Virtual Machine instances in a cloud service were moved to the Shutdown state (stop/deallocated), the public IP would be released and a new public IP would be assigned when one of the Virtual Machines instances was started. However, with this release, if the VM uses a Reserved IP, then the Reserved IP can be used when re-deploying the VMs.
P.S. Is Stack Overflow the best place to ask this sort of questions relating to Azure or shall I use Server Fault in the future? I have seen Azure questions in both websites.
All you have to do is to go to Azure Portal >> Navigate to All Services >> Reservations >> Click Add >> Define a scope and create. And here's how you pay for it: For Enterprise Agreement (EA) customers, Azure Monetary Commitment can be used to purchase Azure Reserved VM Instances.
In order to assign existing reserved IP to an existing VM, you can use the following command:
Set-AzureReservedIPAssociation -ReservedIPName MyReservedIP -ServiceName TestService
At Build 2015 they announced this is now possible and VERY easy. Simply open Azure powershell and run this:
New-AzureReservedIP -ReservedIPName "ipname" -Location "West US" -ServiceName "somevm"
If you run this it will reserve an IP named "ipname" and associate it with the already deployed instance "somevm.cloudapp.net"
Step by step to create Reserved IP and using it on Azure VM. Here you can go
Reserved IP Creation
I have done the Elastic IP Automatic scheduling on AWS.Here is the reference link Elastic IP Automation on AWS script.
Between needs to check about How can I write a script for automating the reserved IP for Azure.If you had done it earlier, Kindly share the script this will be very useful. Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With