Share via


Moving my on-premises servers to the Cloud with Windows Azure Virtual Machines

One of the big new features of the Windows Azure Spring Release is the Windows Azure Virtual Machines feature, and as you has saw in the previous posts Hello World! Windows Azure Spring Release is Here! (IaaS, Media Services, Web Sites…) Part I and Part II deploy a new VM is pretty easy and fast, really, really fast. But one the great new features included with Windows Azure Virtual Machines is the ability to move your VHDs to and from Windows Azure (yes, imagine the incredible set of new options that enable us that feature).

And maybe (as me) the first scenario that you are imaging is move your applications to the cloud without any change, yes, yes, yes!. Another scenario for example for a small or medium company is move their servers infrastructure to the cloud to reduce fix costs. So, we can start with a mix of both, imagine a company with an application based in Sharepoint that want move to Windows Azure Virtual Machines, for our “demo” propouse the infrastructure will be simple: 1 Domain Controller, 1 Standalone Sharepoint Server 2010, the servers are in the 10.0.0.0/20 subnet in the on-premise datacenter and I want keep the same IP assigment.

image image
myDC (DC Server) mySP (Sharepoint Server)

To move te application I follow the following steps:

Prepare the VHDs:

You don’t need any speciall preparation for your VHDs, but if you need apply any update is recommended do it before move the VHDs to Windows Azure. Check that the Remote Desktop is enable and the Windows Firewall is configured to allow Remote Desktop connections to the VM. Also the VHD need be fix sized (with Virtual Machines the OS disk is limited to 128 GB regardless of VM size).

Prepare the Virtual Network:

As I want keep the same IP address assigment, I need configure a new Virtual Network:

1.- From the Windows Azure Manager portal go to Networks. Then select Virtual Networks –> Create a Virtual Network. image
2.- Assing a name to the Virtual Network, select the region where you want keep your Virtual Network and Create a new affinity Group (any Virtual Network need be assigned to a affinity group).   For this example the Virtual Network wont be connected to our on-premise network (one option is connect the Window Azure VMs to our on-premise network,, but in this case I’m cutting fixed cost so I don’t want a VPN server in my on-premise datacenter :)…). image
3.- Add the address range 10.0.0.0/20. image
4.- Don’t choose a DNS server (the DC VM had the DNS service enabled for internal name resolution). image
5.- Accept and create the new Virtual Network.  

Configure the Storage:

Create a storage account and choose the Region/Affinity Group that have created before (MyBackEndServers).

Upload the VHDs to your Windows Azure Storage:

With your VHD prepared, your next step is to upload the VHDs to the Windows Azure Storage account created before, you can use any tool to upload the VHD, I use CloudXplorer (tip: remember upload the VHD as Page Blob, and group the VHDs in containers).

Create the Virtual Machines:

1.- In the Windows Azure Portal select Virtual Machines –> Disks –> Create Disk. image
2.- In Create disk from VHD window, introduce the disk name, of the Domain Controller VHD, select the VHD, mark the option “This VHD contains an operating system” and the Operating System Family “Windows”. Accept and create the disk. Repeat the same process to create the disk for the Sharepoint server. image
3.- Click on Create –> Virtual Machine –> From Gallery. image
4.- Select “My disks” and then select the disk created for the Domain Controller. image
5.- Specify the VM name and size.  image
6.- Introduce a DNS name for the VM, select the storage account where are the VHDs and associated with the Affinity Group and select the Virtual Network created before. Go to the next windows and create the Virtual Machine. image
7.- Wait a few minutes for the VM provisioning. Now repeat the same steps to create the second VM (the Sharepoint server).  
8.- Once the Sharepoint VM is up and running, we have all our environment hosted in Windows Azure, you can connect to the VMs and check if all it’s OK.  
image image

myDC (on Windows Azure)

mySP (on Windows Azure)

Ok, now we have our servers running over Windows Azure, without do anything else than upload our VHDs and configure the Virtual Network, Storage and VMs, and as you can see the more longest process is upload the VHDs (depends of your Internet connection bandwith). But, maybe you are asking yourself: how can my users access the application?. If you remember I didn’t create a cross-premises connection with my virtual network (not for this case), because I’m trying to cut as much costs as I can Guiño … so, I pretend give access to the users to the application directly from Internet, and for that you need go to the Endpoint menu in the mySP VM dashboard and add a new Endpoint to the port 80 (see image).

 

image

Image: Endpoint configuration to allow http connection directly from Internet.

Now you can give to your users the new URL https://[yourdnsname].cloudapp.net (or configure a custom DNS name), to connect to your application, the security is the same than in your on-premises network (ok, if you doesn't create the cross-premises connection you loose the SSO for your AD users).  

image

Now you have your application in the Cloud!!!! Use it, Love it! Sonrisa 

image

Comments

  • Anonymous
    July 17, 2015
    When you move a Server to the Cloud, what is the terminology?
    Do you "Evaporate it"?
  • Anonymous
    October 28, 2015
    Thanks for sharing this information. Will try this.
  • Anonymous
    January 18, 2016
    How do you move SQL Agent Jobs which are getting generated dynamically?