As I said on my blog I’m working on authoring a book about SCVMM and Private cloud below are draft Recommendation on Creating syspreped VM VHD to use with SCVMM template from my book Chapter 6: Configuring Library Resource:
Creating syspreped VM VHD Recommendation:
Creating VM template required the attachment of a VHD or VHDX file to the IDE controller in the hardware section of VM template.
The VHD or VHDX files can be an empty VHD/VHDX files to store OS files during OS installation using ISO CD or PXE installation method or the VHD / VHDX contains a syspreped OS , which is the most common use senior .
You can create a Syspreped VM VHD by installing Windows OS into a virtual machine the running the sysprep command to generalize your windows installation to use in SCVMM templates Creation.
When creating a Syspreped VM VHD it’s recommended to perform the following configuration of the VM before it get syspreped:
1. Enable File and Printer Sharing Firewall rules
2. Enable Remote Management Firewall rules
3. Enable Windows Management Instrumentation Firewall rules
4. Enable ICMP protocol
6. Set PowerShell Execution policy to remote signed
7. Enable remote desktop
8. Create A firewall rule to allow Port 1433 for MS SQL Server if you’re VM will be used for SQL sysprepd installation.
9. Install Dot net 3.5 and Dot Net 4
Configuring your VM with these option makes deploying VM in service template works as expected and allows you to monitor the execution of tasks on the VM using remote Power Shell session. After completing configuring your VM you can run the sysprep command to prepare your VM for cloning and deployment using the command:
%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /mode:vm
The /mode:vm is new switch implemented in Windows 8 /2012 OS , that would prepare your VM VHD to be deployed using Hypervisor but not for physical machine boot form VHD scenarios.
Why to implement recommendation:
Enable File and Printer Sharing Firewall rules
SCVMM use File copy operation during Service deployment to copy the VMM Agent and Application Frameworks Ports TCP 135, 445
Enable Windows Remote Management Firewall rules
SCVMM use port 5985 to communicate with VM in-guest agent (VMM to virtual machine control channel)
Enable Windows Management Instrumentation Firewall rules
SCOM used WMI for installing SCOM Agent to machine
Enable ICMP protocol
Enable ping and test network connection to new VM
Enables you connect to VM using power shell to check running process and logs during VM preparation
Set PowerShell Execution policy to remote signed
Enable running Power shell scripts if needed
Enable remote desktop
Enable you to remotely connect to VM after Deployment to check your deployment
Create A firewall rule to allow Port 1433 for MS SQL Server if you’re VM will be used for SQL sysprepd installation.
Enable connection to SQL server if you are deploying Syspred SQL VM
Install Dot net 3.5 and Dot Net 4
Although use can use the Add Role/feature setting in VM Template to install the Dot Net 3.5 in Windows 2008R2 and DOT Net 4 in Windows 2012, there is no option to install both Frameworks together as each OS would require additional External files to complete both installations.