Generalize a Windows virtual machine using Sysprep

This section shows you how to generalize your Windows virtual machine for use as an image. Sysprep removes all your personal account information, among other things, and prepares the machine to be used as an image. For details about Sysprep, see How to Use Sysprep: An Introduction.

Make sure the server roles running on the machine are supported by Sysprep. For more information, see Sysprep Support for Server Roles

Important

If you are running Sysprep before uploading your VHD to Azure for the first time, make sure you have prepared your VM before running Sysprep.

  1. Sign in to the Windows virtual machine.
  2. Open the Command Prompt window as an administrator. 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), and make sure that the Generalize check box is selected.
  4. In Shutdown Options, select Shutdown.
  5. Click OK.

    Start Sysprep

  6. When Sysprep completes, it shuts down the virtual machine.

Next Steps