How to Capture an Image of a Virtual Machine Running Windows Server
You can use images from the Image Gallery to easily create virtual machines, or you can capture and use your own images to create customized virtual machines. An image is a virtual hard disk (.vhd) file that is used as a template for creating a virtual machine. An image is a template because it doesn’t have the specific settings that a configured virtual machine has, such as the computer name and user account settings. If you want to create multiple virtual machines that are set up the same way, you can capture an image of a configured virtual machine and use that image as a template.
-
Connect to the virtual machine by using the steps listed in How to Log on to a Virtual Machine Running Windows Server 2008 R2.
-
Open a Command Prompt window as an administrator.

-
Change the directory to %windir%\system32\sysprep, and then run sysprep.exe.
The System Preparation Tool dialog box appears.

-
In System Cleanup Action, select Enter System Out-of-Box Experience (OOBE) and make sure that Generalize is checked. For more information about using Sysprep, see How to Use Sysprep: An Introduction.
-
In Shutdown Options, select Shutdown.
-
Click OK.
-
Sysprep shuts down the virtual machine, which changes the status of the machine in the Management Portal to Stopped.

-
Click Virtual Machines, and then select the virtual machine from which you want to capture an image.
-
On the command bar, click Capture.

The Capture Virtual Machine dialog box appears.
-
In Image Name, enter the name for the new image.
-
All Windows Server images must be generalized by running the Sysprep tool. Click I have run Sysprep on the virtual machine to indicate that the operating system is prepared to be an image.
-
Click the check mark to capture the image. When you capture an image of a virtual machine, the machine is deleted.
The new image is now available under Images.
When you create a virtual machine by using the From Gallery method, you can use the image that you captured by clicking My Images on the Select the virtual machine operating system page.