One way to optimize disk space and reduce the number of times that you have to install and update a released operating system is to create parent child configurations using differencing disks in Hyper-V. For example, if you need to install a test lab that
will employ three Windows Server 2008 R2 installations: one configured as a domain controller, another configured as an Exchange Server, and a third configured as a SQL Server, you could use a Parent-Child Differencing disk configuration to save the time of
installing and updating the Windows Server 2008 R2 installation for all three of those virtual machines. The basic order for performing this task is to perform the following activities.

In Hyper-V Manager, right-click the virtual server on which you want to create the configuration.

Click New, and then click Virtual Machine. If the
Before You Begin page appears, review it and then click
Next.

On the Specify Name and Location page, in Name, enter an appropriate name, but don't think too much about it because you will be deleting this one.

In Location, you can choose the default, or if you want to store the virtual machine in a different location (instead of default location
%programfiles%\Microsoft\Windows\Hyper-V\ or starting in Windows Server 2008 R2
%programdata%\Microsoft\Windows\Hyper-V\, then select Store the virtual machine in a different location and enter the full file path. Again, this is something you will be deleting, so you might not want to worry too much about
it. When you are ready, click Next.

On the Assign Memory page, enter the amount of memory you want to dedicate to the virtual machine. The number you choose depends on the requirements of the operating system you are installing. You can always increase this later, so it isn't
necessary to do a lot of planning here. Click Next.

On Configure Networking, determine whether you want the machine connected to a network to start with. This is a personal choice, but if you want to run Windows Update and install specific tools or applications from a network, you may want
to set Connection to an appropriate virtual network interface adapter that will allow you to connect to the network and/or Internet. Click
Next.

On Connect Virtual Hard Disk, you will leave the Create a virtual hard disk selected. Unlike the virtual machine configuration earlier, this is something you will keep. You need to be sure you pick a Location that has enough
disk space and one that you will remember. This will be your parent.vhd, so for Name you might want to type a descriptive name. For example, you might enter the name
WS2008R2Parent.vhd as the name for an image of Windows Server 2008 R2. For
Size, remember that Hyper-V is not going to consume the default 127 GB of disk space. The disks grow dynamically, so this is the maximum size that you ever want your vhd to grow to - people commonly leave the default setting for
Size. Click Next.

On Installation Options, determine how you want to install the operating system. If you have an ISO image of the operating system or even a physical CD or DVD, you can set that up. There are other options and these really depend on how
you want to actually install the operating system. Click Next.

On Completing the New Virtual Machine Wizard, review your selections and then click
Finish.

2. Install the Operating System, updates, and common software

Install the operating system and anything else you want on the virtual machine that you just created. Typically people will run
Windows Update and get all the latest updates. If you are using a non-Microsoft operating system, you will have to figure out how to do the equivalent or skip it. Another idea is to place any common tools and drivers on the image as well. Once
that is all done, you are ready to generalize your installation

3. Generalize the installation

To ensure that you create a new machine identity, you should generalize your installation.

To do that for Microsoft operating systems, that means running sysprep. If you are using a non-Microsoft operating system, you will have to figure out how to do the equivalent or skip it. Sysprep is a built-in utility for most current Microsoft
operating systems. Instead of launching into an entire instructional on sysprep, you can see
How to Use Sysprep: An Introduction. The simple usage of the tool is to simply type sysprep from an
elevated Command Promptor the Run dialog box and read the dialog box. Review the Sysprep dialog box, select the appropriate options, and then run it. Leave the virtual machine shut down/off.

4. Prepare the parent virtual hard disk

You no longer need the parent virtual machine configuration files or folders. In Hyper-V manager, right-click the entry for the virtual machine and then select
Delete. Confirm the deletion by clicking Delete. This should remove all the extraneous files, leaving you only with the virtual hard disk. However, you can go check the file path to ensure the folders and .xml files were removed.
Just be sure not to remove the .vhd file, because that is the one you want. That is your parent virtual hard disk from which you will create the differencing disks.

Locate the virtual hard drive file, vhd, and set that as read-only. To do so, right-click the actual file, click
Properties, then select the Set the virtual hard drive (.vhd) file as read only. This will help prevent you or someone else from accidentally modifying it.

5. Create the differencing disks

The work that you've done up to this point is about to start paying dividends. You can now install multiple versions of the operating system, not eat up nearly as much disk space, and not have to actually install that operating system again to get a bunch
of different systems. For example, if you installed Windows Server 2008 R2 and fully updated it, you can now create a differencing disk for an Active Directory Domain Services (AD DS) domain controller, another for SQL Server, another for Exchange, and so
on. You don't have to keep installing the base operating system. Just be absolutely sure that you make and save a copy of that parent virtual hard disk, if that file becomes corrupted or otherwise damaged (even started up and modified) you lose all the virtual
machines that have differencing drives associated with it.

Create new differencing disk for each virtual machine that you plan to install. In this scenario, you will be creating three and pointing each new differencing disk (child) to use the one that you marked as read-only on the parent.

On Specify Name and Location, type an appropriate name. For example, APP1.vhd and then enter a specific location where you want to store the virtual hard disk. For example, you might store the vhd to
C:\virtual\vhds\. Click Next.

On Configure Disk, in Location, type or browse to the file path to the parent vhd that you created previously and then click
Next.

On Completing the New Virtual Hard Disk Wizard, review your selections and then click
Finish.

Repeat this procedure for the additional virtual machines you want to create that use the same parent (base) virtual hard disk.

6. Create virtual machines that use the differencing disks

The final activity in this process are to create virtual machines that you will keep. This is very similar to the first activity in this article, except here you will be selecting an already existing virtual hard disk, which is one of the differencing disk
you created in the previous activity. Also, you will be keeping these, so selecting a file and folder structure that makes sense to you is more important.

In Hyper-V Manager, right-click the virtual server on which you want to create the configuration.

Click New, and then click Virtual Machine. If the
Before You Begin page appears, review it and then click
Next.

On the Specify Name and Location page, in Name, enter an appropriate name.

In Location, you can choose the default, or if you want to store the virtual machine in a different location (instead of default location
%programfiles%\Microsoft\Windows\Hyper-V\, or starting in Windows Server 2008 R2
%programdata%\Microsoft\Windows\Hyper-V\, then select Store the virtual machine in a different location and enter the full file path. Click
Next.

On the Assign Memory page, enter the amount of memory you want to dedicate to the virtual machine. The number you choose depends on the requirements of the operating system and applications that you plan on installing. Click
Next.

On Configure Networking, determine whether you want the machine connected to a network to start with. This is a personal choice, but if you want to connect to a network, select an appropriate Connection. You can also change
this option even when the operating system is running through the Settings of the virtual machine, so it is not absolutely critical that you figure all of this out immediately. Click
Next.

On Connect Virtual Hard Disk, select Use an existing virtual hard disk. In
Location, enter or Browse to the differencing virtual hard disk that you created for this virtual machine. For example, if you are setting up APP1, then you would enter the full file path to the APP1.vhd (including the name of the VHD, in this
case App1.vhd). Click Next.

On Completing the New Virtual Machine Wizard, review your selections and then click
Finish.