Migrating a Hyper-v VM to Azure. What about the static IP Address?

When you have an on premises environment you normally configure the virtual machines with static IP’s ( at least in most cases ). But what happens when you want migrate to Azure?

Well some things will need to ensure first:

  • The Hyper-V Virtual Machine was created as Generation 1 VM.
  • The Hyper-V Virtual Machine disk was created with VHD disk and not VHDX (if you have a VHDX, convert it with the Convert-VHD Windows PowerShell cmdlet) and confirm it sizes is less than 1023GB.
  • The Hyper-V Virtual Machine has only ONE network adapter and that it is of type synthetic and NOT legacy.
  • The network connection is configured to obtain its IP address automatically (static IP addresses within the VM will not work).

Last February Microsoft announced the support for static IP’s on the Virtual Machines. The Virtual Network static IP feature is now available through Windows Azure PowerShell (available at the Window Azure website.) . For the steps to  install Windows Azure PowerShell, see: http://www.windowsazure.com/en-us/documentation/articles/install-configure-powershell/

The commands to setup the IP are:

#Get the Virtual Machine name
PS C:\> $VM = Get-AzureVM -ServiceName YourCloudServiceName -Name VMWeb01

#Update the Virtual Machine (in my case VMWeb01) with a static IP (10.1.2.30)
PS C:\> Set-AzureStaticVNetIP -VM $VM -IPAddress 10.1.2.30 | Update-AzureVM

Also ,

#Get the assigned IP address of a Virtual Machine
PS C:\> Get-AzureStaticVNetIP -VM $VM

#Removes the static IP address of the VM
Remove-AzureStaticVNetIP – VM $VM

#Confirm availability of a certain static IP address
Test-AzureStaticVNetIP -VNetName WebServersVNet -IPAddress 10.1.2.30

syntax: Test-AzureStaticVNetIP -VNetName <network name> -IPAddress <IP address string>

NOTES :

  • The virtual machine guest operating system still have to be configured  to get IP from DHCP (obtain IP address automatically)
  • The configuration of a static IP address can only be done by using Windows Azure PowerShell. There is no GUI
  • The Virtual Machine must be part of an Azure Virtual Network.
  • As oppose of what many blogs says, you can specify the static IP at any time as long as the VM is stopped. The information that you can only configure a static IP address in the context of the CREATION of the Virtual Machine is not correct

Also Microsoft is now offering VIP Reservation for a virtual Machine, which means that the virtual IP address (public IP) won’t change for example if you move the VM to a different region (e.g. USA to Singapore) or removing and redeploying the services. This together with the ExpressRoute MPLS connections, will open many scenarios like SharePoint Hybrid, External Monitoring, Database backend…

About Alessandro Cardoso
Virtualization and Management passionate. Infrastructure products and solutions knowledge with management and hands on experience; Project Leader, with deep knowledge and expertise in a variety of Microsoft Infrastructure technologies in areas such as Virtualization and Management with product skill sets ranging from, Hyper-V, System Center, Windows Server, SQL Server, Active Directory, Exchange, SharePoint, IIS and Forefront; Plus knowledge in Quest Migration Manager, Linux Infrastructure, Networking, Security Solutions (such as VPN, Firewall) and VMware in complex and large scenarios; Strong knowledge of industry-related datacenter processes, strategies, industry regulations and requirements. Selected as Microsoft Brazil IT Hero, in 2007 and Microsoft IT Heroes Happen in Los Angeles, in 2008. selected as Bussiness Case, further virtualization project for a Governmental Institution. I am also a well known speaker in IT events (e.g. Microsoft TechEd 2007, 2008, 2010 and 2011). MVP since 2009, in Virtual Machine. I have experience developing, planning, organizing, and leading complex initiatives as well business case development skills, acquired in 23 years of experience in IT, working in segments spanning from Government, Health, Education and IT. Well-known speaker in IT events like TechEd, Sage-AU, CNASI. Proven Multitasking skills, presentation skills and analytical skills and problem determination ability; Belief in providing the highest quality of service; Good listener and communicator; Know how to prioritize the work and perform under pressure. Continuously seeking innovative ways to improve productivity and a resourceful problem-solver with focus on customers. Microsoft Most Valuable Professional : Virtual Machine Certifications : Australia Computer Society Certified Professional, MCITP: Enterprise, MCSE: Security, MCSA, MCT, MCTS:SQL, MCTS:SharePoint, MCTS:Vista, Linux Conectiva Professional, Modulo Certified Security Officer Blogs : http://virtualizationandmanagement.wordpress.com http://virtualizacaoegerenciamento.wordpress.com

One Response to Migrating a Hyper-v VM to Azure. What about the static IP Address?

  1. Pingback: vzAddict | Migrating a Hyper-v VM to Azure. What about the static IP Address?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 988 other followers

%d bloggers like this: