Hydration – Build a lab with ConfigMgr 2007 SP2

Here is a download for deploying a few different servers in a datacenter, all fully automated. The servers are two domain controllers, one deployment server with WDS, and one ConfigMgr 2007 SP2 R2 server…

Big thanks to Ben Hunter and Michael Niehaus (Both Microsoft) who started the Hydration Era more five years ago by creating hydration structures and scripts… Microsoft DDPS partners knows this, rest of the world – probably not (until now  🙂  )…

Screenshot of the server roles and configuration
The Task Sequence for the CM01 – ConfigMgr 2007 SP2 Server

View the Video that shows the setup


Hydration – Automating builds in your datacenter
https://www.youtube.com/watch?v=MndJwtMXCT0

Downloads
Download the Hydration solution (72 kb) 

Hydration installation instructions

Step 1 – Download the necessary software

On your Hyper-V host, create the C:\Downloads folder and download the following software:

  • ConfigMgr 2007 R2
  • ConfigMgr 2007 with SP2
  • ConfigMgr 2007 Toolkit V2
  • PowerShell Management Library for Hyper-V
    (http://pshyperv.codeplex.com/releases/view/38769)
  • SQL Server 2008 R2 Enterprise x64

  • SQL Server 2008 R2 Express x64 with Management Tools

  • Windows Server 2008 R2 Enterprise

Step 2 – Prepare the Hydration environment

  1. Configure Execution Policy in PowerShell, by typing the following in a PowerShell prompt:

    Set-ExecutionPolicy Unrestricted

  2. Extract the HydrationMDT2010.zip file to C:\HydrationMDT2010
     
  3. Edit the C:\HydrationMDT2010\Hydration\Source\Applications\ConfigMgr 2007 SP2\ConfigMgrUnattend.ini and add the real PID (AAAAA-BBBBB-CCCCC-DDDDD-EEEEE is the place holder), To find out what PID you have, start the ConfigMgr 2007 Setup on a Server, and a few steps into the setup wizard the PID will be displayed. Please note that the setup needs to be executed on a domain member server, otherwise you will only be able to install the ConfigMgr console, and the PID will not be displayed.  
  4. Create the Hydration Deployment Share by running the 1_CreateHydrationDeployment.ps1 script  
  5. Copy the following folders C:\HydrationMDT2010\Hydration\Source to C:\Hydration, replace any existing files.

    Applications
    Control
    Operating Systems
    Scripts

  6. Copy the ConfigMgr 2007 Toolkit V2 installation files (ConfigMgrTools.msi) to the C:\Hydration\Applications\ConfigMgr 2007 Toolkit V2\Source folder.  
  7. Copy the ConfigMgr 2007 SP2 installation files to the C:\Hydration\Applications\ConfigMgr 2007 SP2\Source folder.  
  8. Create the C:\Tmp\PreReqs folder, and run the C:\Hydration\Applications\ConfigMgr 2007 SP2\Source\SMSSETUP\BIN\I386\Setup.exe file with the /Download C:\Tmp\PreReqs command line option.  
  9. Move the content of the C:Tmp folder to the C:\Hydration\Applications\ConfigMgr 2007 SP2\Source\PreReqs folder.
  10. Copy the ConfigMgr 2007 R2 installation files to the C:\Hydration\Applications\ConfigMgr 2007 R2S\ource folder. 
  11. Copy the C:\Hydration\Applications\ConfigMgr 2007 SP2\Source\SMSSETUP\BIN\I386\EXTADSCH.exe to C:\Hydration\Application\sExtend ConfigMgr 2007 Schema\Source
  12. Copy the SQL Server 2008 R2 installation files to the C:\Hydration\Applications\SQL Server 2008 R2\Source folder.  
  13. Copy the SQL Server 2008 R2 Express installation (en_sql_server_2008_r2_express_with_management_tools_x64.exe) files to the C:\Hydration\Applications\SQL Server 2008 R2 Express\Source folder.  
  14. Copy the Windows Server 2008 R2 Enterprise files to C:\Hydration\Operating Systems\Windows Server 2008 R2 x64
  15. Create the HydrationServers media item by running the 2_CreateHydrationMediaItem.ps1 script  
  16. Copy the C:\HydrationMDT2010\Media001\Control folder to C:\Hydration\Servers\Content\Deploy, replace existing files  
  17. Update the HydrationServers media item by running the 3_UpdateHydrationServersMedia.ps1 script

Step 3 – Create and deploy the virtual machines

  1. Install the PowerShell Management Library for Hyper-V by running the install.cmd script, ignore any errors about .NET Framework  
  2. Verify that the files are not having any alternative data streams, if they do, remove it (using explorer or streams from Sysinternals).  
  3. Create the virtual machines by running the 4_CreateVirtualMachines.ps1 script.  
  4. Using Hyper-V Manager, start the DC01 virtual machine, and wait until the setup is complete.  
  5. Start the DC02 virtual machine, and wait until the setup is complete.
  6. On DC01, verify that AD replication works with DC02.
  7. Start the MDT01 virtual machine, and wait until the setup is complete.
  8. Start the CM01 virtual machine, and wait until the setup is complete.

Done… Good luck with your hydrations…

/ Johan

About the author

Johan Arwidmark

0 0 votes
Article Rating
Subscribe
Notify of
guest
33 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Admin
Admin
7 years ago

That script was written to use the PowerShell Management Library for Hyper-V, for Hyper-V on Windows Server 2008, at a time were core Hyper-V was missing decent cmdlets…. for Windows 8.1 and for Windows Server 2012 R2 you should be using the native cmdlets instead.

Just create the virtual machines manually, or download some of the later hydration kits (like ConfigMgr 2012 R2) to find PowerShell scripts that are using the native cmdlets.

/ Johan

SteeveWilliam
SteeveWilliam
7 years ago

where are you specify the WMI name space variable for createVirtualmachines.ps1 script?
regard

SteeveWilliam
SteeveWilliam
7 years ago

i think have a answer about my last post:
all this class are not supported until windows 8.1 and srv 2012 R2 :
MsVM_VirtualSwitchManagementService
Msvm_ComputerSystem class
Msvm_VirtualSystemManagementService

SteeveWilliam
SteeveWilliam
7 years ago

hi

i have invalide class object when i run the createVirtualmachines.ps1 script.
i'm usin windows 8.1 plateform with Hyperv manager rôle.

Get-WmiObject : Classe non valide « MsVM_VirtualSwitchManagementService

any idea?
thk

Admin
Admin
7 years ago

I have no idea what the error message says, but you do need to have Hyper-V installed to run the script.

/ Johan

SteeveWilliam
SteeveWilliam
7 years ago

hi ,i'm new on the blog and first i want to thanks community member about her job.i try to create my lab using Hydration method but i have a problem when i execute the CreateVirtualMachines.ps1. i'm on Windows 8.1 ps version 4.0 PS D:ASauvegarderHydrationHydrationMDT2010> .4_CreateVirtualMachiness.ps1Get-WmiObject : Classe non valide « MsVM_VirtualSwitchManagementService »Au caractère C:Program FilesmodulesHyperVNetwork.ps1:262 : 26+ $SwitchMgtSvc = Get-WmiObject -ComputerName $Server -NameSpace $HyperV …+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidType: (:) [Get-WmiObject], ManagementException + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand Impossible d'appeler une méthode dans une expression Null.Au caractère C:Program FilesmodulesHyperVNetwork.ps1:264 : 13+ $result=$SwitchMgtSvc.CreateSwitch( $virtualSwitchName , $virtualSwi …+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation : (:)… Read more »

galicea
galicea
7 years ago

Hello, I have been able to use the Hydration kit for SCCM 2012 perfectly. However, I have attempted to re-create the same level of success using the Hydration Kit for SCCM 2007. The host which my hypervisor (Hyper-V) sits on is using MDT 2013. I am using the TS's and folder content from your Hydration Kit for 2007. My issue seems to begin when I boot the VM guests (DC01) into WinPE off of the Media created via the Hydration PoSH scripts. It seems I am stuck in an infinite loop. There are no errors to note, other than the… Read more »

Admin
Admin
8 years ago

The ISO works fine in VMWare as well. As for the BOOTMGR is missing error I have not seen the hydration media give that error.

Review the bdd.log and look for issues with partitioning/bcdedit/bcdboot.

/ Johan

jdelvasto
jdelvasto
8 years ago

After the task applies OS for DC1 and reboots I get the dreaded.

"BOOTMGR is missing"

Any Ideas. I can see the image was applied to "D" Drive.

Any help will be greatly appreciated.
JZD

jdelvasto
jdelvasto
8 years ago

Is there a way to port over to VMWARE?

Admin
Admin
9 years ago

This already supports VMWare… Just create the VM's in VMWare, and mount the hydration ISO file (which is bootable).

/ Johan

cfalletta
cfalletta
9 years ago

This is great! I am curious if this can be ported over to use VMWare?

cfalletta
cfalletta
9 years ago

This is great! I am curious if this can be ported over to use VMWare?

Ultranoob
Ultranoob
9 years ago

Sorry it takes me so long between posts but work does get in the way… Getting a message 'Configuration Manager cannot determine the sie mode for this site.' in the site database. Not sure what to do from here as nothing seems to be useable… I.E. I can't added an OS, drivers, applications. I know this important but can't find documentation that tells me how to set the site mode or what I'm supposed to do? It seems like should have been done during the SCCM install. I would prefer to just use a mixed mode that way I don't… Read more »

Ultranoob
Ultranoob
9 years ago

Actually I just had to set the files to unblocked and it worked fine. But when trying to run 4_CreateVirtualMcahines.ps1 I received errors and found out that it all worked, it seems I did not let it sit long enough to complete tasks as I came out the next morning and ran it again and all the files got created.

Thanks for the great write up. I also created this in a VHD that I sysprep'd and now have a Hydration Kit ready for when I need it.

I will be testing the new 2012 version next… thanks again.

Admin
Admin
9 years ago

In general the dism errors can be ignored from the install.cmd of the Hyper-V library… If you can't get the library to work, just create the virtual machines manually, and set the correct macaddress statically in the virtual machine

/ Johan

Ultranoob
Ultranoob
9 years ago

Actually missed some of the error post: Error: 0x800f080c Feature name NetFx2-ServerCore is unknown.A Windows feature name was not recognized.Use the /Get-Features option to find the name of the feature in the image and try the command again. The DISM log file can be found at C:WindowsLogsDISMdism.log Deployment Image Servicing and Management toolVersion: 6.1.7600.16385 Image Version: 6.1.7600.16385 Error: 0x800f080c Feature name MicrosoftWindowsPowerShell is unknown.A Windows feature name was not recognized.Use the /Get-Features option to find the name of the feature in the image and try the command again. The DISM log file can be found at C:WindowsLogsDISMdism.log Are these caused… Read more »

Ultranoob
Ultranoob
9 years ago

Sorry to say I just found this site so if you are not helping anymore I understand, but if so…

I'm getting some errors in trying to run Step 3 number 1.

First error,

Import-Module : There were errors in loading the format data file:
Microsoft.PowerShell, , C:Program FilesmodulesHypervhyperv.Format.ps1xml : File skipped bec
ause of the following validation exception: File C:Program FilesmodulesHypervhyperv.Format.
ps1xml cannot be loaded. The file C:Program FilesmodulesHypervhyperv.Format.ps1xml is not d
igitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details…
At line:1 char:14
+ Import-Module <<<< 'C:Program FilesmodulesHyperv'
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

Is there a way to edit the install.cmd to set the powershell to ignore signing?

Then I also get an error

Error: 0x800f080c

Feature name MicrosoftWindowsPowerShell is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.

The DISM log file can be found at C:WindowsLogsDISMdism.log

Jonce
Jonce
10 years ago

@jrandom42

I just ran into the same thing (continually reboots without running the task sequence) and it turns out that you need to make sure you the VM-Bus Network Adapter in the VM settings is enabled. Default value for the Network is "Not Connected", change it to Local Area Connection – Virtual Network.

Right click on VM > Settings > VM-Bus Network Adapter > Network: Local Area Network – Virtual Network > Apply.

dtjones2
dtjones2
10 years ago

I'll get those logs posted soon because I'd like to get the automated build running. However, in the meantime I copied the ConfigMgr install folder to D: and ran the install script from there and it installed fine.

Admin
Admin
10 years ago

Can you please zip together and upload the bdd.log, InstallConfigMgr2007SP2 and ConfigMgrSetup.log files somewhere, and post the link. You can also add a pause to the task sequences, just before the "Install ConfigMgr 2007 SP2" action, and instead run the script interactively from the command prompt.

/ Johan

dtjones2
dtjones2
10 years ago

I'm havin some slight issues just on the CM01 sequence. ConfigMgr is not installing and I'm getting an access denied message out of the install script. I'm not the best at scripting so I haven't been able to decipher where the error is/what is causing it. I get
Line 2501
Char 5
Permission Denied
800A0046
VBS runtime error

Admin
Admin
10 years ago

The VM's need to have the exact matching macaddress as the customsettings.ini file in the Media folder, otherwise they can't find the task sequence to deploy and just reboots.

/ Johan

jrandom42
jrandom42
10 years ago

I've tried using your solution, but all I get are VMs that continually reboot.

gatoradecoupons
gatoradecoupons
10 years ago

For great hydration check out http://www.gatorade-coupons.org

Admin
Admin
10 years ago

I don't know if there are any switches or properties you can set on the commandline to also create the client update package unattended. What I do know is that you can script the creation of that package using normal configmgr 2007 scripting. See the How to Create a Package and How to Create a Program code snippets in the ConfigMgr 2007 SDK./ Johan

Charles
Charles
10 years ago

Johan, First off all…. great tool you made here!! Thanks for sharing. I'm trying to update the install of the sccm server(CM01) with the hotfix kb77384 in the task sequence.I managed to install it (copy/change .wsf files so that it can install with the logging options of mdt) and then R3.. all went fine. But when i open the console i don't see the package. So it actually installed the hot fix and R3 but did not make the package in the sccm console. Question:Is it possible to install this hot fix silently so that it will make the package… Read more »

etrekel
etrekel
10 years ago

Johan,

I figured it out why I was getting the error, there was not a BCD file in that path (C:HydrationServersContentEFImicrosoftboot) for some reason. So by copying the one in located in the C:HydrationServersContentBoot to that folder, now the 3_UpdateHydrationServersMedia.ps1 and runninig the update manually using the Deployment Workbench both work.

Thanks

etrekel
etrekel
10 years ago

Johan, If I run it from within the Deployment Workbench, it still gernates the same error Starting MDT Media UpdateOpened the media deployment share.Folders to be copied to the media deployment share: 5Copied: DS001:ApplicationsCopied: DS001:ApplicationsHydration ServersCopied: DS001:Operating SystemsWindows Server 2008 R2 x64Copied: DS001:Task SequencesHydration ServersCopied: DS001:Selection ProfilesCopied: DS001:Applications with Replace optionCopied: DS001:ApplicationsHydration Servers with Replace optionCopied: DS001:Operating SystemsWindows Server 2008 R2 x64 with Replace optionCopied: DS001:Task SequencesHydration Servers with Replace optionCopied: DS001:Selection Profiles with Replace optionCopied standard folders.Boot images updated.Setting up x64 boot image.Error detected running command: 'C:Windowssystem32bcdedit.exe -store "C:HydrationServersContentEFImicrosoftbootbcd" /create "{d76e1814-e5eb-4bbd-9134-de81b70512df}" -d "Litetouch Boot [MEDIA001] (x64)" -application OSLOADER' Exit… Read more »

Admin
Admin
10 years ago

Yep, if the path is different, or the deployment share number (DS001) is different you get simliar error… Try running the update manually on the media item using the deployment workbench.

/ Johan

etrekel
etrekel
10 years ago

Johan, Again it is very much appreciate the information you pass along, I first used the guide and video for ZTI01 (Installing the server for MDT 2010 Zero Touch and ConfigMgr 2007 R2) which was wonderful, but this new process has made it so easy. Thank you again.I do have a question when running the 3_UpdateHydrationServersMedia.ps1 script, I get the following error, Error detected running command: 'C:Windowssystem32bcdedit.exe -store"C:HydrationServersContentEFImicrosoftbootbcd" /create "{088369ca-56f5-44da-9dd9-e80735cb5d69}" -d "Litetouch Boot [MEDIA001] (x64)" -application OSLOADER' Exit code is: 1VERBOSE: Error text is: The boot configuration data store could not be opened. The system cannot find the file specified.Update-MDTMedia… Read more »

mmarable
mmarable
10 years ago

Johan,

This is brilliant! I've been trying to use MDT to automate building an AD controller for my labs but could never get it quite right. This is perfect.

I'm sure in your opinion you just wrote a few PowerShell scripts and leveraged the built-in capabilities of Hyper-V and MDT, but I think it's amazing. This has opened so many new potentials for me to use MDT.

Thanks
Mike

LaZZon
LaZZon
10 years ago

Gillar detta skarpt!
Fick Hydration pack på USB när jag var på springboard om deployment hos MS.

Dina script underlättar dock användandet!

mvh
Anders


>