NullReference
NullReference

Reputation: 4484

Is there any way to have azure VM keep the same IP address?

We have an azure virtual network with a web role, worker role and a dedicated sql VM. Currently we're using the VM dns name in the database connection string. I was thinking it would be better to update the connection string to use the private ip address to skip the name resolution, mydbserver.cloudapp.net to 10.0.0.1.

Since all virtual machines have to use DHCP is there a chance the private ip will change? If so is there anyway to address this? Thanks

Upvotes: 4

Views: 5286

Answers (2)

kennydust
kennydust

Reputation: 1165

to be extra safe, you can set a static vnet IP that guarantees that it never changes: http://windowsitpro.com/windows-azure/set-azure-vm-static-ip-address

Upvotes: 1

Jim O'Neil
Jim O'Neil

Reputation: 23764

The SQL Server VM will have a persistent private IP within the Virtual Network.

From Windows Azure Virtual Network Overview:

Persistent private IP addresses: Virtual machines within a VNet will have a stable private IP address. We assign an IP address from the address range you specify and offer an infinite DHCP lease on it. So the IP address will stay with the virtual machine for its lifetime.

Upvotes: 3

Related Questions