Generating a 2008 R2 VM Template with DISM

Hi all!

Here I show how to make a new template for WS 2008 R2 EE with DISM installed in a WS 2012 R2 CU1:

Pre-requisites: WADK 8.1

Copy wim file from WS 2008 R2 EE image and paste in your local C:\W2008R2_Template

Resuming actions:

  • OS WS 2008 R2 Enterprise
  • Telnet client enabled
  • Spanish regional settings
  • UTC+1 Time Zone
  • All updates added from a repository generated with wsusoffline931
  • VHDX with 120GB
  • Boot partition 350MB
  • System Partition 119GB

Hands on:

Open DISM CMD with elevated privileges and execute

Template with Features:

dism /Mount-Wim /WimFile:C:\W2008R2_Template\VMTemplate.wim /Index:3 /MountDir:C:\W2008R2_Template\new_vm

dism /image:C:\W2008R2_Template\new_vm /Enable-Feature /FeatureName:TelnetClient

dism /image:C:\W2008R2_Template\new_vm /set-syslocale:es-ES
Dism /image:C:\W2008R2_Template\new_vm /Set-UserLocale:es-ES
Dism /image:C:\W2008R2_Template\new_vm /Set-Inputlocale:040a:0000040a

Dism /image:C:\W2008R2_Template\new_vm /Set-TimeZone:”Romance Standard Time”

Dism /unmount-wim /mountdir:C:\W2008R2_Template\new_vm /commit

Adding updates:
dism /mount-wim /wimfile:C:\W2008R2_Template\VMTemplate.wim /index:3 /mountdir:C:\W2008R2_Template\new_vm

DISM /image:C:\W2008R2_Template\new_vm /Add-Package /Packagepath:C:\WUpdates2k8R2

Dism /unmount-wim /mountdir:C:\W2008R2_Template\new_vm /commit

Open CMD with elevated privileges and execute:

Creating VHDX:

create vdisk file=C:\W2008R2_Template\vhdx\VMTemplate.vhdx maximum=122880 type=expandable
select vdisk file=C:\W2008R2_Template\vhdx\VMTemplate.vhdx
Attach vdisk

Create partition primary size=350
Format quick fs=ntfs
Assign letter=M
Create partition primary
Format quick fs=ntfs
Assign letter=V

Open DISM CMD with elevated privileges and execute


dism /apply-image /imagefile:C:\W2008R2_Template\VMTemplate.wim /index:3 /applydir:V:\

V:\windows\system32\bcdboot V:\windows /s M:

Open CMD with elevated privileges and execute:

Select vdisk file=C:\W2008R2_Template\vhdx\VMTemplate.vhdx
Detach vdisk


I´m awarded with MVP Directory Services!!!!

Hi folks,

I´m proud to announce that I have been awarded for first time by Microsoft with MVP Directory Services. Thanks Microsoft and Technical Communities for that 🙂

This is the official overview from mvp website:

The Microsoft Most Valuable Professional (MVP) Award is our way of saying thank you to exceptional, independent community leaders who share their passion, technical expertise, and real-world knowledge of Microsoft products with others. It is part of Microsoft’s commitment to supporting and enriching technical communities. Even before the rises of the Internet and social media, people have come together to willingly offer their ideas and best practices in technical communities.

At Microsoft, we recognize the vital role these individuals play in the adoption and advancement of technology—and in helping our customers do great things with our products. This was the inspiration for the Microsoft MVP Award. Nearly two decades ago, we awarded 37 technical community leaders as MVPs.
Today, there are more than 4,000 MVPs worldwide. They represent more than 90 countries, speak over 40 languages, answer more than 10 million questions a year, and are awarded in almost 90 Microsoft technologies—reflecting the breadth of our products and our global communities.
Banner del Programa MVP de Microsoft