One of the new features of SCCM 2012 R2 is that it supports building Virtual Hard Disks from SCCM which can then be used for many different purposes such as testing a new image or using as a virtual machine template.
- System with Hyper-V role installed (used to generate the virtual machines)
- Virtual Machine Manager Console (required to upload the vhd)
Process to build a VHD from SCCM
- Build the SCCM Task Sequence
- Run the Task Sequence to build the VHD
- Upload the VHD to Virtual Machine Manager
- Open the SCCM Console and click on the Software Library – and expand Operating Systems – > Task Sequences.
- Right Click and select Create Task Sequence.
- Select the Option to install an existing package to a virtual hard disk.
- Enter the task sequence name and the Boot image and click next.
- Select the Image, product key (if needed), and set the administrator password (if desired) and click next.
- Select either workgroup or domain (this example we are doing a domain join), and enter the domain, OU and and account that can bind, and click next.
- Select the Configuration Manager Package (probably the default), and click next.
- If desired add applications to be included, and click next, and next one more time after the summary page and task will successfully be created.
- Open up the Software Library and expand Operating Systems -> Virtual Hard Disks. Right click and select create virtual hard disk.
- Enter a name and Path for the virtual hard disk and click next.
- Select the Task Sequence and click next.
- Select one of the distribution points with all of the content and click next.
- Enter Customization (if desired) and click next.
- At the summary page review and click finish. The virtual machine will start build the vhd and upload to the sccm share. Process can take an hour depending upon image complexity.
- Browse to the software library and expand Operating Systems -> Virtual Hard Disks.
- Right click on the desired VHD and click upload to Virtual Machine Manager.
- Select your VMM server and the desired library and click next.
- Click next one more time and the vhd will be uploaded to the VMM library. This process can vary can take a bit, but once completed the vhd will appear in Virtual Machine Manager Library.