Creating syspreped VM VHD Recommendation

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

5. Enable-PSRemoting

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.

About Hikmat Kanaan

I’m big fan of technology; I have worked almost with every MS windows OS up to Windows 8 and server 2012 including OS deployment, AD and almost every MS OS service included major MS products ISA ,TMS, Exchange, System center ,Sharepoint ,SQL , Storage system, Networking, security, Cisco, HP, and Checkpoint products. Designing and Architecting IT solutions and infrastructure . I do admire automation and working based on best practices toward building highly reliable solution that provide the required services to Business. I also run the Jordan IT professionals user Group
This entry was posted in Private cloud, VMM2012 and tagged , , . Bookmark the permalink.

3 Responses to Creating syspreped VM VHD Recommendation

  1. blackduke77 says:

    Look forward to seeing you book, it is a fantastic subject with lots of gotcha’s
    On this post how do you get around the sysprep re-arm limit?
    I do as you have suggested above but I can only do this about five times per image. As I need to service mine often for patches or adding files to images. Have you got any tricks?

    • I don’t know if this suite your case but the best tip I use is to keep the original VM and sysprep a copy of it . so it goes like this:
      1. Create Gold VM , install everything you need and shut it down
      2. Copy the Gold VM and Attach it as new Silver VM then Sysprep it, you can now use it in SCVMM library
      3. When I need to update the VM I start my Gold VM update it and go to step 2

      this is kind of tedious process , but keeps things working , I have only single re-arm level
      This keep me safe for anther 4 re-arms if I can’t use the gold VM

  2. Pingback: Deploying MS PetShop 4 using SCVMM 2012 service template | Private Cloud & Virtulazation

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s