Powershell deployment toolkit is a great accelerator to have your System Center POC environment up and running in a few hours. Until recently I seldom used it, but the need to prepare a “CloudOS POC in a Day” made me realign to the latest version. This post is more a collection of notes than a guide, but since the procedures described saved me a lot of time I decided to share them with the community.
The goal is to make PDT easily portable on different customer environments and remove, as far as possible, any dependency on the system drive avoiding if possible coping all the source binaries to the first VM created.
So this post is about a quick use of PDT with the default parameters including a Domain Controller setup using a custom repository for binaries. It’s by no way the final word on PDT, but if you want to have a CloudOS environment up and running without thinking about the fine tuning this is going to help.
All the actions must be accomplished on a Windows 8.1 or Windows Server 2012 R2 machine. Create a vdisk at least 50 GB in size, this will be the common repository for PDT. You can share it from a networked system or mount it directly on your VMs or host systems. Let’s call it PDT. It will be mapped/mounted as P: on the Hyper-v host and on DC01.contoso.com (i.e. the system we will use to install the environment).
As usual this post will be a work in progress and be regularly updated with my PDT experiences.
Let’s start with a few links of needed software and proper deployment:
– Other software that needs to be manually downloaded and expanded
§ Operations Manager -> OperationsManager.en (remember .en or you have to change workflow.xml)
§ Virtual Machine Manager -> VirtualMachineManager
§ Service Manager -> ServiceManager
§ Orchestrator -> Orchestrator
§ Data Protection Manager -> DataProtectionManager
§ Configuration Manager -> Configuration Manager
§ AppController -> AppController
The you must setup the environment, this need to be done once, then you can reuse the settings for all the deployments that you need:
– Create the following folders
o P: \Installer
– Change the following variables in variable.xml
o <Variable Name=”SourcePath” Value=”P:\Installer” />
o <Variable Name=”Download” Value=”P:\Installer” />
o <Variable Name=”TempPath” Value=”$SystemDrive\Temp” /> This must be left unchanged if not the installer will fail. It is used for file sharing checks, so the drive must exists on every VM.
o Set SystemCenter2012ProductKey in variable.xml, it is not marked as required but it is for DPM.
– Launch Downloader.ps1 from a powershell admin prompt
– Adjust versioning
o From P:\Installer\Prerequistes\ADK81 take note of adksetup.exe version (currently 8.100.26629) and change the corresponding entry in Workflow.xml
<Installable Name=”Windows Automated Deployment Kit 8.1″>
<Variable Name=”WindowsAutomatedDeploymentKit81Source” Value=”Prerequisites\ADK81″ />
<Argument>/silent /layout $Download\$DownloadFolder</Argument>
o Launch Downloader.ps1 –DeploymentOnly to check and process what’s needed. Repeat this step until everything is reported ok
Deploy the environment
o On the hyper-v host map P: to the file repository (so that P:\installer will contain the downloaded files)
o On the hyperv host prepare 2 base sysprepped images for Windows Server 2012 R2 and Windows Server 2008 R2. If you don’t have any ready, you can use Convert-WindowsImage.ps1 –SourcePath p:\Installer\WindowsServer2012R2\Sources\Install.wim –VHDFormat VHDX –Edition “ServerDataCenterEval” –SizeBytes 40GB –VHDPartitionStyle MBR –RemoteDesktopEnable
Same thing must be done for the Windows Server 2008 R2 media, this is needed if you want the Service manager Sharepoint based user portal. I strongly recommend to use the created vhdx to startup a VM and make a windows update or a dism offline servicing. Copy the two vhdx on your hyper-v host say in E:\PDT\VHD and name them WS12R2D.vhdx and WS08R2E-SP1.vhdx
Modify Variable.xml setting the proper paths:
o Create a Virtual Switch on you hyper-v host (it can be external or internal, better not private since it is probable you want the VMs to access the host). Remember the VM must be able to access your PDT share if you want to, if you mount the vdisk it can be completeòy isolated. Name it “PDT – Internal” (os something meaningful). Modify variable.xml to set the Virtual Switch accordingly set the VMFolder variable as well (for example to E:\PDT\VMs)
o To create the virtual machines launch VMCreation.ps1 from the hyper-v host (remember to map the P: drive)
o Once finished logon to DC01.contoso.com wait for the running powershell script to finish. It must terminate in error on the validation path steps, since it doesn’t have access to the source files.
o Map the P: drive. Launch c:\temp\setup.bat from an admin prompt. [If you want you can launch in powershell admin mode Installer.ps1 –ValidateOnly everything should be ok, if not fix it and then launch Installer.ps1 and you’ve done.]
Never modify workflow.xml, instead add one or more files named Extender*.xml with the same structure of workflow.xml in the PDT directory.
Variables defined in variable.xml take precedence over workflow.xml variables. I prefer to modify only the former.
- Daniele This posting is provided “AS IS” with no warranties, and confers no rights.