Getting Started with Developing a Server Image for a VM Role

[This topic provides preliminary content for the beta release of the Windows Azure VM role feature. To apply for participation in the beta, log on to the Management Portal, click Home, and then click Beta Programs.]

An image of the Windows Server 2008 R2 operating system is needed for a VM role in Windows Azure. You use several tools and procedures to create and configure the server image. You can get started creating the server image that is uploaded to Windows Azure by performing the tasks listed in the following table.

  Step Reference
Check box

Ensure that the required prerequisites are met.

Overview of the Windows Azure VM Role

Check box

Create the base VHD - You can use standard Windows image creation technologies to create your custom Windows Server 2008 R2 image, which is uploaded in a base VHD to Windows Azure. You can use Hyper-V Manager to create the base VHD. You must have your Microsoft Windows Server 2008 R2 media or a previously created VHD available to complete this step. For more information about the process of creating a Windows image, see Windows Automated Install Kit (Windows AIK).

How to Create the Base VHD for a VM Role in Windows Azure

Check box

Install the Windows Azure Integration Components - After the base VHD has been uploaded to Windows Azure, the Windows Azure Integration Components handle integrating the VM role instance with the Windows Azure environment. These components are automatically started each time the virtual machine starts.

How to Install the Windows Azure Integration Components

Check box

Install applications and make operating system configuration changes - You can install applications and configure the operating system to fit your needs.

Windows Server

Check box

(Optional) Develop an adapter - When you develop and upload a custom server image, you are installing and configuring software applications to run in the dynamic environment of Windows Azure. In many cases, you may need to provide configuration information for your application that is not available at development time, and must be gathered at runtime. The recommended way to configure your applications for the dynamic environment is by writing an adapter that interacts with Windows Azure and prepares and runs your application.

How to Develop an Adapter for a VM Role in Windows Azure

Check box

Configure the firewall - As part of the process of preparing the server image, you should configure Windows Firewall to open any ports that your application needs after it is running on the VM role instance in Windows Azure. It is recommended that your hosted service use fixed local ports. You can specify port numbers for endpoints that you define for any role – web, worker, or VM.

You can configure the firewall in any of the following ways:

  • Manually configure the firewall in Windows Firewall during the process of preparing the server image.

  • Programmatically configure the firewall by using the Windows Firewall API.

  • Configure the firewall by using the Windows Installer XML (WiX) toolset. If you are writing an installer to install software to your VM role instance, you can use WiX to open a port in the firewall when the installer runs.

Windows Firewall

Overview of Enabling Communication for Role Instances

Check box

Prepare the server image to be uploaded - After you complete the previous steps, you prepare the server image to be uploaded by running sysprep.exe. This preparation generalizes the server image, which prepares the operating system image for duplication, so that the server image may be deployed to one or more VM role instances in Windows Azure. Consult the documentation for your software application for information about its compatibility with Sysprep.

How to Prepare the Server Image for Uploading to Windows Azure

Check box

Save the base VHD to a secure folder.

After you create, customize, and prepare the server image, you upload the base VHD for the image to Windows Azure. To do this, see Uploading VHDs for a VM Role in Windows Azure.

See Also

Concepts

Overview of Creating a Server Image for a VM Role in Windows Azure