1 out of 2 rated this helpful - Rate this topic

Change a Server Image for a VM Role by Using a Differencing VHD

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

When you first create a cloud service that contains running instances of a VM Role, the VM Role instances use only the base virtual hard disk (VHD). As time progresses, applications might need to be revised or the configuration of the operating system might need to be updated. You make these changes and updates by creating and uploading a differencing VHD.

The differencing VHD should contain any updates to applications and the operating system. You create the differencing VHD by using Hyper-V and the base VHD. You should keep the differencing VHD as small as possible. For more information about differencing disks, see Using Differencing Disks

noteNote
Although Hyper-V allows the use of multiple differencing VHDs, Windows Azure only allows one differencing VHD for a VM role.

noteNote
In the following procedure, the source server is the server where you run Hyper-V Manager and update the server image that you upload to Windows Azure. You must be able to access the base VHD that you used to create the VM Role instances.

  1. On the source server, open Hyper-V Manager.

  2. In the left pane, select the node for the source server.

  3. In the Actions pane, click New, and then click Hard Disk.

  4. On the Choose Disk Type page, select Differencing, and then click Next.

  5. Provide a name and location for the differencing VHD, and then click Next.

  6. On the Configure Disk page, provide the name and location of the base VHD that this differencing VHD will be associated with, and then click Next.

  7. Review the Summary page, and then click Finish.

You must start the differencing VHD in a virtual machine to make changes to applications and the operating system. It is recommended that you use the virtual machine that you used to create the base VHD if possible to prevent corruption of the base VHD by accidentally starting it.

  1. In the center pane of Hyper-V Manager, right-click the virtual machine that you want to use, and then click Settings.

  2. In the Hardware pane, under IDE Controller 0, select Hard Drive, and then in the center pane, under Media, click Browse.

  3. Select the differencing VHD that you created, and then click Open.

  4. In the Settings dialog box, click OK.

If the virtual machine that you used for creating the base image does not exist, use the following procedure to create a new virtual machine.

  1. In the Actions pane, click New, and then click Virtual Machine.

  2. On the Specify Name and Location page, enter a name and location for the new virtual machine, and then click Next.

  3. On the Assign Memory page, enter the amount of RAM you want to allocate for this virtual machine, and then click Next.

  4. On the Configure Networking page, select the appropriate connection, and then click Next. To apply Windows updates, you must select a connection that is Internet connected.

  5. On the Connect Virtual Hard Disk page, select Use an existing virtual hard disk, browse to the new differencing VHD image, and then click Next.

  6. Review the Summary page, and then click Finish.

When you create a new virtual machine, it is turned off by default. You must start the virtual machine to prepare and deploy it to Windows Azure. You will be required to enter the password that you used when you installed the Windows Azure Integration Components.

  1. In the center pane of Hyper-V Manager, right-click the new virtual machine, and then click Start.

  2. In the Actions pane, click Connect to open a window for the virtual machine.

  3. Enter the Administrator password.

After logging on to the differencing virtual machine, you can make your changes and then prepare the image for deploying to Windows Azure by running sysprep.exe.

You must change the configuration of the cloud service to enable it to use the new differencing disk. To do this, see Change the Configuration of a VM role.

See Also

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.