What happens when you Sysprep a system running Hyper-V on Windows Server 2008 R2?

What happens when you Sysprep a system running Hyper-V on Windows Server 2008 R2?

  • Comments 2


I got asked this question a couple of weeks ago – and I did not know the answer.  After a bit of investigation – I now know the answer – and thought I would take the time to share it with the world (if you do not know what Sysprep is – go and read this first).  The short answer is:

Everything just works.

The long answer is as follows:

Prior to Window Server 2008 R2 (namely in Windows Server 2008) you could run into a couple of problems.  In Windows Server 2008 R2 we have implemented a Sysprep provider to ensure that everything goes smoothly.  This provider does work during two of the phases of Sysprep:

Generalize

The generalize phase of Sysprep is where an installed version of Windows is prepared to be duplicated – and all installation specific information is removed.  During this phase Hyper-V makes a couple of key changes:

  • The installation date information for Hyper-V cleared.  It will be automatically regenerated when the system image is deployed to a new system (or rebooted locally).
  • The dynamic MAC address range is cleared.  This will also be automatically regenerated when the system image is deployed to a new system.  This step is necessary to ensure that you do not get duplicate MAC addresses on multiple Hyper-V servers if they are all deployed from the same base image.

Specialize

The specialize phase is run after the system image has been deployed to a new computer.  Hyper-V makes the following change as part of this phase:

  • Enable automatic launching of the hypervisor in the boot configuration data (BCD) store.  Because a new boot configuration data store is created as part of the image deployment process, and because Hyper-V stores information in the boot configuration data store – we need to make sure this information comes across to the new system.

Cheers,
Ben

Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
  • If you plan on turning a hyper-v VM to a "boot from VCD", you also need to sysprep it.

  • Hi,

    I have deployed WDS running perfectly without problems several months ago.

    We can deploy images of Windows 7 and Windows Server 2008.

    The issue is:

    I have a computer, with windows server 2008 R2 in the host with Hyper-V enabled (obviously the virtualization techonology vt-x and DPE Data Execution Prevention features of BIOS are enabled). In Hyper-V I setup an .vhd. The host and the virtual machine runs perfectly.

    I execute sysprep and I follow the standard steps of WDS to capture and deploy the image by network.

    Now, there are two scenarios related to the configuration of the BIOS of the target machine.

    If the vt-x feature of the target machine is disable, the image is deployed without problems, but when I run the virtual machine using the hyper-v it (the virtual machine) crashes (obviously) because the vt-x is disable. If I shutdown and turn on the feature, the OS of the host doesn't boot.

    If the vt-x feature of the target machine is enabled, the images doesn't deployed correctly.

    do you know, how can I fix that issue?

    The target computers are HP 8100, and the BIOS version is 786H1 v01.05, firmware: 6.0.3.1195, management mode: AMT.

    Thanks in advanced.

Page 1 of 1 (2 items)