1 out of 2 rated this helpful - Rate this topic

Create the Base VHD for a VM Role in Windows Azure

Updated: June 23, 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.

A server image that is used for the VM Role in Windows Azure consists of a base VHD and an optional differencing VHD. The base VHD acts as the initial template for the VM Role instances that are created in Windows Azure. The base VHD contains the operating system, any operating system customizations, and your applications. You can use Hyper-V Manager to create the base VHD. For more information about using Hyper-V Manager to create server images, see Hyper-V. For more information about using a differencing VHD, see Change the Server Image for a VM Role in Windows Azure.

The Windows Server 2008 R2 media or a previously created VHD must be available for you to create a base VHD. When creating a new virtual hard disk, a name and storage location is required. The disks are stored as .vhd files, which makes them portable but also makes them vulnerable to unwanted changes. You should mitigate this risk by taking precautions such as storing the .vhd files in a secure location. Do not create the virtual hard disk in a folder that is marked for encryption. Hyper-V does not support the use of storage media if Encrypting File System has been used to encrypt the .vhd file.

It is recommended that you put as much into the base VHD as possible, which makes the differencing VHD relatively small. What you put on the base and differencing VHD is completely up to you. Because the base VHD and differencing VHD must be considered a set that define the server image, you should keep a local copy of the base VHD in a secure location.

ImportantImportant
It is recommended that you set the permissions on the base VHD to read only.

The operating system that is installed on the base VHD can be one of the following:

  • Windows Server 2008 R2 Enterprise (English only)

  • Windows Server 2008 R2 Standard (English only)

noteNote
Windows Web Server 2008 R2 is not supported.

Instances of VM Role that you create inherit some web role and worker role restrictions that may affect the way the application works in Windows Azure. You should consider the following information when creating a VM Role:

  • The Windows Azure Service Level Agreement requires at least two identical virtual machine instances, and deploying your virtual machines in different fault domains is good practice because one will always be available.

  • If the hardware on which the VM Role instance is running fails, any runtime changes to the operating system of the virtual machine cannot be considered durable.

  • You are limited to one public IP address per cloud service.

  • Windows Azure knows about the availability of your virtual machines, but it does not know the health of any applications or services running in the VM Role instance. Some management tasks are available to you from the Management Portal for troubleshooting your cloud services.

noteNote
In the following procedure, the source server is the server where you run Hyper-V Manager and create the server image that you upload to Windows Azure.

  1. On the source server, ensure that the Windows Server 2008 R2 media is available to Hyper-V Manager.

  2. Click Start, click All Programs, click Administrative Tools, and then click Hyper-V Manager.

  3. In the Actions pane of Hyper-V Manager, click New, and then click Virtual Machine.

  4. In the New Virtual Machine Wizard, click Next to create a virtual machine with a custom configuration.

  5. Provide a name and a location for the virtual machine, and then click Next.

    noteNote
    The name that you provide must be between 1 and 512 characters, where the characters are A-Z, a-z, 0-9, the dash character, and the period character. The last character cannot be a dash.

  6. Specify the amount of memory that you want the virtual machine to use, and then click Next.

  7. Select the network adapter that you want the virtual machine to use, and then click Next.

  8. On the Connect Virtual Hard Disk page, select Create a Virtual Hard Disk. Provide the following information in the page:

    • Name: the name of the .vhd file. This is the file that you upload to Windows Azure.

    • Location: the folder where the .vhd file is located. You should store the base VHD file in a secure location because it must be matched with differencing disks that you might use later.

    • Size: the size of the virtual machine. You must ensure that the size of the virtual machine is one of the values in the following table and that the size corresponds to the size that you choose for the VM Role. The following table lists the allowable sizes of VHDs in Windows Azure.

      ImportantImportant
      For dynamic disks, the sizes in the table are the maximum sizes that the VHD can grow to as additional space is required.

       

      Windows Azure VM size Maximum mounted VHD size

      Extra Small

      15 GB

      Small

      35 GB

      Medium, Large, or Extra Large

      65 GB

  9. On the Installation Options page, select Install an Operating System from a Boot CD/DVD –ROM media, and then choose the method that is appropriate for your installation media.

  10. Finish the wizard to create the virtual machine.

After the virtual machine is created it is not started by default. You must start the virtual machine to complete the installation of the operating system.

  1. In the center pane of Hyper-V Manager, select the virtual machine that you created in the previous procedure.

  2. In the Actions pane, click Start.

  3. Click Connect to open the window for the virtual machine.

  4. Finish the installation of the operating system. For more information about installing the operating system, see Install and Deploy Windows Server

    noteNote
    The tested scenario for creating partitions in the image is to create a single Windows partition and a recovery partition.  This is the normal configuration when you install the operating system by using Windows Setup. You can also use wim2vhd, which creates a single Windows partition and no recovery partition. Multiple Windows partitions are not supported and may cause errors or warnings when you run the CSUpload Command-Line Tool. You can possibly get past these errors or warnings if you use the skipverify option, but it is not recommended.

When the operating system installation finishes, you must also complete the following tasks:

  • Enable network connectivity

  • Install all required updates

  • Disable automatic Windows Updates

    ImportantImportant
    In this release, Windows Update is not compatible with Windows Azure because it may cause some or all of your instances to restart simultaneously. Uncoordinated restarts of the operating system can cause service interruption.

  • Install the .NET Framework 3.5.1 Features

  • It is not recommended that you use a specialized image (not sysprepped), but if you do, you must ensure that the system time zone is set to (UTC) Coordinated Universal Time.

After the operating system starts and you complete the installation tasks, you must install the Windows Azure Integration Components that enable the virtual machine to run in Windows Azure. To do this, see Install the Windows Azure Integration Components.

See Also

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.