To easily move a virtual machine (VM) from an on-premise virtualization host to the public cloud is a “dream scenario” for cloud architects and customers. Difficult to achieve to date, this feature is key to helping create a more robust hybrid cloud ecosystem by making it easier to move workloads between clouds.
Microsoft has delivered this feature in System Center 2012 Service Pack 1 (SP1). The upgrade to the App Controller component includes a true “deploy to public cloud” button. This article covers the steps to deploy a VM from a Microsoft private cloud on premise to the Azure public cloud by creating a cloud service using System Center 2012 SP1 App Controller.
Introducing System Center 2012 SP1 App Controller
App Controller is a cloud management product that is included with the System Center 2012 suite, and this little application unleashes the immense power of the public cloud to Microsoft private cloud operators. I’ve written about a beta release of App Controller previously, and eagerly waited for the opportunity to try out the move-to Azure features in the second-generation release of App Controller, available with System Center 2012 SP1.
In App Controller in System Center 2012 Service Pack 1 (SP1), the following new Azure-specific features are available:
- Upload a virtual hard disk or image to Windows Azure from a System Center Virtual Machine Manager (SCVMM) library or network share
- Add a VM to a deployed service in Windows Azure
- Start, stop, and connect to VMs in Windows Azure
- Migrate a VM from Microsoft private cloud (SCVMM) to Windows Azure
- Deploy a VM in Windows Azure to create a cloud service
Figure A shows the App Controller interface, which is a Silverlight-powered web UI that runs in your browser. This App Controller instance has access to 24 VMs in the private cloud and 4 VMs in the public cloud. There are a number of ways to move a VM into Azure, either just the VHD, or the whole VM. The VM can be deployed as a stand-alone VM, or a scalable cloud service in Azure can be created to contain the migrated VM.
Figure A
System Center 2012 SP1 App Controller, the cloud manager component of System Center. (Click to enlarge)
Steps to deploy a VM to Windows Azure and create a cloud service
In this article, I’ll check out the new feature listed in the last bullet above, which is to create a cloud service from a VM running in your private cloud on-premise. This is a sophisticated task that bridges the gap between the scalable, elastic worker-role Platform as a Service (PaaS) features of Windows Azure (inherent in the cloud service model), and the conventional Infrastructure as a Service (IaaS) features in Azure (which don’t otherwise require a cloud service).
1. Prepare your Azure image VM in your private cloud as you want it to look when it wakes up in Azure. Install necessary software and otherwise prepare the VM, and just log out of the VM that will become the Azure VM image.
a. Do not run sysprep! If you want to make an image of the VM for reuse in Azure, run the ‘sysprep’ step in Azure after you create the cloud service and upload the VM virtual hard disk (VHD).
b. The network settings of the VM will be automatically modified to use Azure DHCP. When the VM wakes up in Azure it will have either a random Azure IP address, or if you deployed the VM to an Azure virtual network, an IP address in the server subnet you specify when you define the cloud service.
2. Shut down the image VM and place a copy of the VHD file in an SCVMM library. (Azure does not support the Windows Server 2012 “VHDX” file format VHD, so if necessary perform a VHDX to VHD migration using Hyper-V VHD editing tools.)
3. Create a new VM template and select the image VM’s VHD as the hard disk.
4. Log into App Controller with credentials authorized to manage the cloud, selecting the VM Template, and push the Deploy button (Figure B).
Figure B
An SCVMM template can be deployed to a private cloud or the Azure public cloud.
5. A graphical design surface will appear where you select the Azure cloud (subscription) you will be migrating the VM to. Also you will name the Azure cloud service and the deployment. You can think of the deployment as the ‘N-tier’ that is scalable if desired.
6. As a final step, configure the actual VM instance that will be created by the upload:
a. Provide a virtual machine name.
b. Select an instance size (Large is recommended for uploaded VMs).
c. You must select an existing availability set or create a new one.
d. Browse to select the storage blob container in Azure for the VHD.
e. If you are deploying to a virtual network, select the desired server subnet.
f. Specify network endpoints (other than RDP) that need open to the VM. Leave an outside port entry blank to auto-select a random/ephemeral high-numbered port.
g. Provide local Administrator and if applicable, domain credentials.
h. Push the Deploy button (Figure C). This pops up a ribbon message at the bottom of the web page “Windows Azure VM deployment started.”
Figure C
Define your cloud service and upload a VM at the same time.
7. You can check on the progress of the upload on the App Controller Jobs view, where duration and percentage upload counters give you an idea of how long the upload will take. (A 35-GB upload took a little over an hour for me.) SCVMM will also show a job in progress with the name “Exporting physical resource to client”.
8. After the upload from your on-premise infrastructure completes, the Azure management portal will show an instance of your application in Provisioning status.
9. When provisioning is complete, the on-premise SCVMM is done and loses visibility of the new VM in Azure. However App Controller’s VM list contains a merged view of on-premise and Azure VMs, including the newly uploaded VM, see Figure D.
Figure D
VMs running in Azure, viewed by on-premise App Controller; the Azure1 VM was moved into Azure.
After completing the deployment of the cloud service and VM from App Controller, these items can also be viewed and managed in the Azure management portal. Log into the Azure management portal, select the new VM and push the Connect button to establish an RDP session with the VM that was moved to Azure.