0 out of 1 rated this helpful - Rate this topic

Prepare the Server Image for Uploading to Windows Azure

Updated: March 8, 2011

[The VM Role feature of Windows Azure is being retired on May 15th, 2013. After the retirement date, VM role deployments will be deleted. To move forward with your existing applications, you can use Windows Azure Virtual Machines. For more information about using Virtual Machines for your application, see Moving from VM Role to Windows Azure Virtual Machines.

For the VHD to be correctly uploaded to Windows Azure, the server image must be generalized by using the Sysprep command. For more information about using Sysprep, see How to Use Sysprep: An Introduction.

Before you complete this task, you must ensure that you have completed the tasks in the following sections:

During the process of preparing the server image for uploading to Windows Azure, you may generalize and then specialize it several times, in an iterative process. Each time you create a virtual machine from the server image, the setup process of the operating system runs and performs specialization functions for that machine. Your final task before you upload the server image to the Windows Azure image repository is to generalize the image.

The specialization pass happens again after your image is deployed to Windows Azure. Each VM Role instance that is created from the server image runs Windows Setup. Windows Setup uses configuration values from the answer file that is installed to the root directory of the server image by the Windows Azure Integration Components. For more information, see Install the Windows Azure Integration Components.

You can use the following procedure to prepare the image to be uploaded.

  1. Open a Command Prompt window as an administrator.

  2. Change the directory to %windir%\system32\sysprep, and then run sysprep.exe.

  3. In the System Preparation Tool dialog box, select Enter System Out-of-Box Experience (OOBE) for the System Cleanup Action.

  4. Ensure that Generalize is selected.

  5. Select Shutdown for the Shutdown Options.

  6. Click OK.

You can attach a VHD in Computer Management and inspect the VHD for its sysprep status.

  1. Click Start, click All Programs, and then click Computer Management.

  2. In the left pane, expand Storage, right-click Disk Management, and then click Attach VHD.

  3. Browse to the .vhd file that you want to inspect, and then click OK. The VHD is now attached and assigned a drive letter.

  4. Using Notepad, open X:\Windows\Setup\State\State.ini (where X: is the drive letter associated with the attached VHD). The value of ImageState should be IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE for an image that has been properly prepared by using sysprep.

  5. In the lower center pane of Computer Management, right-click the attached disk and then click Detach VHD.

After the server image has been generalized and the virtual machine has been shut down, you can upload the .vhd file to Windows Azure. For more information, see Upload a VHD for a VM Role in Windows Azure.

See Also

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.