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
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.
- Sign in to the Windows virtual machine.
- Open the Command Prompt window as an administrator. Change the directory to %windir%\system32\sysprep, and then run
- 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.
- In Shutdown Options, select Shutdown.
- When Sysprep completes, it shuts down the virtual machine.