Posts Tagged ‘Master VHDX’

How to: Building the ultimate lab environment using Windows 8 Client Hyper-V

When you have to create an testlab environment with multiple servers, it is a big job to install all the servers. Even when you are using Hyper-V in this environment. You manually have to install all the servers or make clones of another virtual machine. In this scenario it is very usefull to make use of Differencing Disks within Hyper-V. A Differencing Disks are linked to an master VHD or VHDX file. This master VHD or VHDX file is a virtual machine that has been sysprepped, for example Windows Server 2012.

Basically, all of the main reads for the VMs created with a differencing disk come from the master VHD or VHDX, while any changes (writes) are written to the differencing disk. The differencing disk will remain fairly small, because the amount of change should be minimal. You’re probably looking at around a couple of GBs per differencing disk. With a differencing disk you can build multiple machines with the same parent sysprep image.

labenvironment

My laptop contains Windows 8 with the Hyper-V role enabled, so basically my virtual environment is on my laptop. Because I have only 500 GB on storage available, it is very usefull for me to use differencing disks. A lot of virtual machines with a little need of storage.

You can build this environment by following the next steps;

1.) Create a new virtual machine within Hyper-V
2.) Install the Operating System with the specific updates
3.) Optionally you can install some base applications
4.) Sysprep the virtual machine. You can use the following command:
%windir%\system32\sysprep\sysprep.exe /generalize /shutdown  
5.) Now the virtual machine is sysprepped and power off
6.) Create a new virtual machine (or multiple)
7.) Create a new VHDX file using differencing disk
8.) Navigate to the base VHDX file you’ve just created (the sysprepped virtual machine)
9.) Edit some other settings within the virtual machine (cores, memory, NIC, etc.)
10.) Boot the new virtual machine
11.) Walk through the “First Run” steps of the Operating System
12.) The new virtual machine is now ready to use
13.) Navigate to the differencing disk (VHDX) and see how big it is…right it’s really small!

TMPL_01    TMPL_02    TMPL_03

TMPL_04    TMPL_05    TMPL_06

TMPL_07    TMPL_08    TMPL_09

TMPL_10    TMPL_11    TMPL_12

TMPL_13    TMPL_14    TMPL_15

TMPL_16    TMPL_17