Category Archives: 16968

4th Generation Hyper-V 2012 R2 Server for Around $1,200 USD – Parts List and Video!

In honor of the release of Windows Server 2012 R2, I’ve updated my latest server build using the latest components. You can use this home Hyper-V server to create your own private cloud, prototype design solutions, test new software, or run your own network like I do . Nothing provides a better learning tool than hands-on experience!

My last build used a third-generation Intel I5-3470S Ivy Bridge Quad-Core CPU. My G4 build uses a fourth-generation Intel I5-4570S Haswell Quad-Core CPU and a larger faster 360GB SSD to run active Hyper-V virtual machines. The new components result in a super-fast 7.5 second boot time!

My Design Requirements

This design is a little less cost-focused so I can use the latest Intel processor, faster SSD drives, and a sleek high-performance micro-ATX case. These new components currently add about $200 to the base $1,000 price, but as usual for high-end technology, those costs will go down.  You can probably build it for less even now.

  • Minimum of 4 cores
  • Windows Server 2012 R2 capable. Hyper-V for Windows Server 2012 R2 requires hypervisor-ready processors with Second Level Address Translation (SLAT).
  • 32GB of fast DDR3 RAM
  • Must support SATA III 6Gb/s drives
  • Must have USB 3.0 ports for future portable devices
  • Low power requirements
  • Small form factor
  • Budget: Around $1,200 USD

The processor I chose is the new Intel I5-4570S Haswell Quad-Core CPU. Even though all four cores run at a quick 2.9 GHz, it only uses 65W. The beautiful aluminum heatsink and fan included with the processor keep the CPU running at a cool 25° Celsius (77° F) at room temperature.

As before in my previous builds, RAM requirements drove most of this design. Memory is single most important component in a Hyper-V host. Pairing up a super-fast processor with quick reliable RAM is the key to a good design.

Gigabyte Motherboard – Durable enough to cut a steak on it! J

Overclocking is not longer only used by gearheads and has moved to the mainstream. Most desktop motherboards include self tuning overclocking to get every gram of power out of their rig. I don’t use any of these features, even though they’re available. I prefer stability over speed – and this server is plenty fast enough!

I’ve also found that while all SSD are fast, some are faster. Drives with high IOPS provide a noticeably faster computer especially during bootup and long drive operations, like copying ISOs and VHDXs.

This build is more stylish than previous builds, using a sleek high quality Rosewill Slim MicroATX case. Most µATX cases are designed for desktops and, as such, they usually have small 250W-300W power supplies. The included Rosewill 300W µATX power supply works just fine for my build since all the components have low power requirements. Peak power requirements for this build is only 186W, giving me plenty of power to spare. This PSU is also designed to keep the case cool by exhausting warm air at the back along with another built-in 80mm on top of the case.

I ordered everything from Amazon because they had the lowest prices. And with Amazon Prime it was all delivered in just two days. Gotta love that! You can even join Prime for free for 30 days and cancel if you want after you get your gear.

Here’s the entire parts list for this server:


Intel Core i5-4570S Quad-Core Desktop Processor 2.9 GHZ 6MB Cache- BX80646I54570S

This is a 4th generation Haswell Intel processor. It includes the newest Intel HD graphics and runs at a very low 65W. 3 year limited warranty.
1Gigabyte GA-B85M-D3H LGA 1150 Intel B85 HDMI SATA 6Gbps USB 3.0 Micro ATX DDR3 1600 Intel Motherboards GA-B85M-D3H

I chose this LGA 1150 Micro ATX motherboard over Intel because it has 4x SATA 6Gb/s and 2x SATA 3Gb/s connectors. It also uses the Intel B85 Express chipset, has an UEFI BIOS, has 2x PCI and 2x PCI-Express slots, and USB 3.0 ports. 3 year limited warranty.
2Corsair Vengeance 16GB (2x8GB) DDR3 1600 MHz (PC3 12800) Desktop Memory (CMZ16GX3M2A1600C10)

1.5V 240-pin dual channel 1600MHz DDR3 RAM with built-in heat spreaders. Lifetime warranty. 10-10-10-27 CAS Latency. Great RAM at a great price. Each package contains 2x 8GB DIMMs (16GB). Be sure to buy two packages.
1Kingston Digital 120GB SSDNow V300 SATA 3 2.5 (7mm height) with Adapter Solid State Drive 2.5-Inch SV300S37A/120G

120GB SATA 6Gb/s (SATA 3) SSD used for the Windows Server 2012 R2 operating system. 85,000 IOPS 4KB random read / 55,000 IOPS 4KB random write. 3 year warranty.
1Corsair Force Series GS Red 360GB (6Gb/s) SATA 3 SF2200 controller Toggle SSD (CSSD-F360GBGS-BK)

360GB SATA 6Gb/s (SATA 3) SSD used for active VMs (the VMs I normally have running, like a domain controller, Exchange servers, Lync servers, etc.). Toggle NAND for up to 90K IOPS random write speed. 3 year limited warranty.
2.5-inch SSD/Hard Drive to 3.5-inch Bay Plastic Tray Mount Adapter Kit

Plastic mounting kit for 2.5″ SSD drives. Holds two SSD drives, stacked on top of each other in the left drive bay.
1WD Green 2 TB Desktop Hard Drive: 3.5 Inch, SATA III, 64 MB Cache – WD20EZRX

2TB Western Digital Green (low power) SATA 6Gb/s (SATA 3) drive. Used for storing ISOs, seldom used VMs, base images, etc. I usually configure this drive to sleep after one hour to save even more power. 2 year warranty.
1Lite-On Super AllWrite 24X SATA DVD+/-RW Dual Layer Drive – Bulk – IHAS124-04 (Black)

Great quality DVD burner. It’s cheap, too. I connect this to one of the SATA2 ports on the motherboard. 1 year limited warranty.
1TRENDnet 32-Bit Gigabit Low Profile PCI Adapter, Retail (TEG-PCITXRL)

The Gigabyte motherboard includes one gigabit NIC. It’s best practice to add another gigabit NIC for Hyper-V so you can separate host and VM traffic.
1C&E CNE11445 SATA Data Cable (2pk.)

I need 4x SATA cables for this build. The Gigabyte motherboard comes with two black 18″ SATA cables. Flat (not L shaped) connectors work best for this build. FYI there’s no technical difference between SATA2 and SATA3 cables.
2StarTech 6in 4 Pin Molex to SATA Power Cable Adapter (SATAPOWADAP)

The micro ATX PSU in the Rosewill case has four power connectors for drives, which is just enough — 2x SATA and 2x Molex connectors. Use these adapters to convert the two Molex connectors to SATA. Be sure to buy two.
1Rosewill Slim MicroATX Computer Case with ATX12V Flex 300W Power Supply, Black/Silver R379-M

Sleek mirror-finished micro ATX case with removable drive bay cage for easy access. Includes quiet 300W PSU, 80mm cooling fan on top, 2x front USB 2.0, and audio ports. Excellent quality.

It took about 90 minutes to assemble everything and take these pictures. The following slideshow shows how I put it all together. Click the slideshow to open the hi-res slideshow in a new page.

The first thing you’ll need to do after building your server is install the Windows Server 2012 R2 operating system. This will take a total of about 8 minutes from DVD. Amazing!

Windows Server 2012 R2 will install default drivers for all the server components. Next, you’ll want to update the BIOS to the latest version and install the optimized drivers available for some components. The Gigabyte GA-B85M-D3H motherboard includes a utilities and drivers disk. Pop the disk in and run setup.exe in <DVD Drive>:\Utility\GIGABYTE\AppCenter.  This will install the Gigabyte AppCenter utility on Windows Server 2012 R2.

Use AppCenter to download and install the latest drivers and utilities. AppCenter can be accessed using the icon in the notification area near the clock. Select Live Update and choose the following updates:

First half of the utilities and updates to install.

Second half of the updates to install.

It will take a few minutes to download and install the software and updates. You may need to restart a couple of times to complete the installation. Live Update in AppCenter makes it a lot easier to install the necessary utilities and drivers to keep your hardware up to date.

Installing utilities and updates.
My motherboard shipped with version F4 of the BIOS. At the time of this article, the latest BIOS version is F7. The @BIOS utility in AppCenter was unable to download the latest version for some reason, so I went to and downloaded the F7 BIOS manually, then used the @BIOS utility to install it from the file.

Updating and flashing the BIOS.
Now you can run Windows Disk Management to initialize, format, and label your Corsair 360GB SSD and Western Digital 2TB drives. Be sure to check my article about Windows Server 2012 deduplication to increase your Hyper-V server density. Now you’re ready to install the Hyper-V role and start making VMs!

Here’s a short video of the beast in action!

I’ll be doing a demo of this home Hyper-V server at the MVP Showcase at the MVP Summit, November 17th, 2013.  If you’re an MVP and will be going to the Summit, please drop by the MVP Showcase to see the server in action.

As usual, if you have any questions or comments please leave them below. I hope you enjoy reading about these server builds and take the opportunity to make this investment in your career.

File-level Defragmentation of Exchange 2013 Volumes

By default, Windows Server 2012 automatically runs a weekly drive optimization (file-level defragmentation) on all drives. It also automatically optimizes new drives when they are added.

Now that you can install Exchange 2013 on Windows Server 2012 should you disable this feature as part of your server builds?

The latest information I could find from Microsoft on this subject is from Nino Bilic (2004): Do we need to file-level defragment Exchange database drives? and Mike Lagase (2011): How fragmentation on incorrectly formatted NTFS volumes affects Exchange.

Nino writes,
The bottom line really is – you do not HAVE to file-level defrag the Exchange database drives. Exchange reads and writes to it’s databases in very random fashion. Large sequential reads and writes will see much more improvement from file system defrag than Exchange databases will. But if you really WANT to do it – I would do it the old-fashioned way: move the databases off to some other volume, file system defrag the drive and then move the databases back… Or at least make sure you have a good backup, dismount the databases and file-system defrag them.
Mike writes,
Note that it is still not recommended to run disk defragmentation software on Exchange server volumes, but there are times where file level fragmentation can cause significant performance problems on a server merely by the way data is being written to the disk. If optimal and/or recommended settings are not used when creating the volumes, this file fragmentation issue can occur much quicker. The majority of Exchange files are in use so running any regular disk defragmentation programs on the server will not help with this situation. If necessary, the only way to resolve this is to take all Exchange resources offline to ensure none of the files are in use and then defragment the disk to make the files contiguous on the disk once again.

That’s Mike’s emphasis, not mine.

So, while it’s not necessarily going to break anything if you defragment your disks, it’s best practice NOT to do it.  Especially letting Windows Server 2012 do it automatically every Wednesday at midnight, as is the default.  Also consider other workloads that may be running at the same time, such as Exchange backups.

Note that this recommendation normally applies to all local disks on an Exchange server, not just the drives that contain mailbox databases and transaction logs.  That’s because the SMTP queue and temporary files are written to the same drive where the Exchange 2013 binaries are installed, usually the C: drive unless you’ve manually moved them to a different drive.

Here’s how to turn automatic drive optimization off in Windows Server 2012:

  • Using File Explorer, view the properties of the C: drive or any other local drive.
  • On the Tools tab, click Optimize.
  • You will see that all local drives are being optimized automatically every week:
  • Click the Change Settings button.
  • Clear the check box to Run on a schedule, as shown below:
  • Click OK, Close, and OK to save the settings.
Disabling drive optimization in this way will disable optimization for all drives.  It does not disable your ability to manually run a disk optimization on any drive.

Cisco Offers Free Nexus 1000V Integrated Switch for Hyper-V

Hyper-V 3.0 on Windows Server 2012 offers a new feature called an extensible virtual switch.  This feature allows you to replace the Windows integrated virtual switch in Hyper-V with a third-party switch, such as the Cisco 1000V.  You can get a quick overview of Hyper-V extensible virtual switches here.

The Cisco 1000V virtual switch provides many advanced capabilities to Hyper-V VMs such as advanced switching (private VLANs, ACLs, PortSecurity, and Cisco vPath), security, monitoring, and manageability.  Best of all it’s free to download here!

The following information comes from Cisco’s Cisco Nexus 1000V Switch for Microsoft Hyper-V website:

Features and Capabilities

The Cisco Nexus 1000V Switch for Microsoft Hyper-V:
  • Offers consistent operational experience across physical, virtual, and mixed hypervisor environments
  • Reduces operational complexity through dynamic policy provisioning and mobility-aware network policies
  • Improves security through integrated virtual services and advanced Cisco NX-OS features

The following table summarizes the capabilities and benefits of the Cisco Nexus 1000V Switch for Microsoft Hyper-V.
CapabilitiesFeaturesOperational Benefits
Advanced SwitchingPrivate VLANs, Quality of Service (QoS), access control lists (ACLs), portsecurity, and Cisco vPathGet granular control of virtual machine-to-virtual machine interaction.
SecurityDynamic Host Configuration Protocol (DHCP) Snooping, Dynamic Address Resolution Protocol Inspection, and IP Source GuardReduce common security threats in data center environments.
MonitoringNetFlow, packet statistics, Switched Port Analyzer (SPAN), and Encapsulated Remote SPANGain visibility into virtual machine-to-virtual machine traffic to reduce troubleshooting time.
ManageabilitySimple Network Management Protocol, NetConf, syslog, and other troubleshooting command-line interfacesUse existing network management tools to manage physical and virtual environments

The Cisco Nexus 1000V won the Best of Microsoft TechEd 2013 award in the Virtualization category.

If you’re interested in learning more about the Nexus 1000V extensible switch, I encourage you to view the following 2 hour session on CiscoLive365: BRKVIR-2017. – The Nexus 1000V on Microsoft Hyper-V: Expanding the Virtual Edge (2013 London).  Free registration is required.  Bennial also posted the PowerPoint slide deck for this session on ScribD here.

UPDATED Blistering Fast Hyper-V 2012 Server – Parts List and Video!

Over a year ago I wrote an article detailing how to build a Blistering Fast Windows Server for about $1,000 USD.  At that time “Windows Server 8″ hadn’t even been released yet, but I wanted to build a server that would work with “future generations” of Hyper-V.  The article proved to be extremely popular and paved the way for many fellow technologists to build their own lab servers.

Now that Windows Server 2012 has been out for a while I wanted to update that article to incorporate newer technologies, like 3rd generation Intel processors and faster DDR3 RAM.  I also made some tweaks to my initial server over the year, adding another SSD drive for active VMs and enabling sleep mode on my physical storage hard drive to save more power.  I’m including those items in this build, while maintaining the same price point as over a year ago.

Lessons Learned

I modified a few things since I built the original lab server I documented in January 2012.  Here are the lessons I learned:

  • If RAM is king, IO is queen.  The two most important things for a Hyper-V 2012 server are RAM (VM capacity) and IO (VM performance).  IO becomes even more important as you add more concurrently running VMs, which you can easily do with 32GB of RAM!
  • SSD = IO. My original design used a single SSD for the operating system and binaries.  I soon learned that VM performance was pretty poor running off a traditional mechanical hard drive, even though I was using a fast SATA III 6Gbps drive.  I ended up buying another 250GB SSD drive to host my active VMs.
  • CPU isn’t as important as I thought.  It’s important to have enough cores to share with your VMs, but most of the time my CPU is idling at 10% utilization even with 8 VMs running simultaneously.
  • Deduplication is amazing! You can increase the VM density on an SSD drive using Windows Server 2012’d built-in deduplication feature.
  • You can never have enough SATA III ports.  My first build used an Intel motherboard with two SATA III 6Gbps and two SATA II 3Gbps ports.  I ended up having to buy another SATA III controller when I added the other SSD drive.  Better to have at least 4 SATA III ports to begin with.

My Design Requirements

This build has an emphasis on cost.  Even though my budget is the same as the earlier build, I have to make it work with two SSD drives instead of one.

  • Minimum of 4 cores
  • Windows Server 2012 capable.  Hyper-V for Windows 8 requires hypervisor-ready processors with Second Level Address Translation (SLAT).
  • 32GB of fast DDR3 RAM
  • Must support SATA III 6Gb/s drives
  • Must have USB 3.0 ports for future portable devices
  • Low power requirements
  • Small form factor
  • Budget: Under $1,000 USD

As before, the RAM requirements drove most of this design.  Interestingly, I found that the newer technologies (3rd generation Intel Core I5 Ivy Bridge and DDR3 1600 RAM) actually cost less than the 2nd gen I5 and DDR3 1066 RAM in my last build.

Unlike last year’s build, I discovered that Amazon usually has the lowest price for everything.  This makes it a  lot easier to order and receive since all the components come from one place.  This should also make it easier for my European friends since they can source it all from Amazon, as well.  Another big bonus is that I have Amazon Prime which gives me free 2-day shipping on all the components.  I could even choose to spend $3.99 more to get it next day!  I love this service!

Here’s the entire parts list for this server:

Quantity Item Description
1   Intel Core i5-3470S Quad-Core Processor 2.9 GHz 6 MB Cache LGA 1155 – BX80637I53470S

This is a 3rd generation Ivy Bridge Intel processor. It includes Intel HD 2500 graphics and runs at a low 77W. 3 year limited warranty.
1   AS Rock PRO4-M LGA1155 Intel H77 Quad CrossFireX SATA3 USB3.0 A V GbE MATX Motherboard H77

I chose this LGA 1155 Micro ATX motherboard over Intel because it has 4x SATA3 and 2x SATA2 connectors. It also uses the Intel H77 chipset, supports RAID 1, 5 and 10, has 4 PCI-Express slots, USB 3.0, and has a great BIOS. See the video below. 3 year limited warranty.
2   Corsair Vengeance 16GB (2x8GB) DDR3 1600 MHz (PC3 12800) Desktop Memory (CMZ16GX3M2A1600C10)

240 pin dual channel RAM with built-in heat spreaders.  Lifetime warranty.  Latency is 10-10-10-27.  Each package contains 2x 8GB sticks (16GB).  Be sure to buy two packages.
1   Kingston SSDNow V200 128GB Bundle SV200S3B7A/128G

SATA3 SSD used for the Windows Server 2012 operating system. The package includes the drive and SATA3 cable, an external enclosure, and cables. 3 year warranty.
1   Samsung MZ-7TD250BW 840 Series Solid State Drive (SSD) 250 GB Sata 2.5-Inch

SATA3 SSD used for active VMs (the VMs I normally have running, like a domain controller, Exchange servers, Lync servers, etc.). Super-fast drive. 3 year limited warranty.
1 Kingwin 2.5 Inch to 3.5 Inch Internal Hard Disk Drive Mounting Kit

Metal mounting kit for 2.5″ SSD drives. Holds two SSD drives, stacked on top of each other.

1   WD Green 2 TB Desktop Hard Drive: 3.5 Inch, SATA III, 64 MB Cache – WD20EARX

2TB Western Digital Green (low power) SATA3 drive. Used for storing ISOs, seldom used VMs, base images, etc. I usually configure this drive to sleep after one hour to save even more power. 2 year warranty.
1   Lite-On Super AllWrite 24X SATA DVD+/-RW Dual Layer Drive – Bulk – IHAS124-04 (Black)

Great quality DVD burner. It’s cheap, too. I connect this to one of the SATA2 ports on the motherboard. 1 year limited warranty.
1   SATA Data Cable (2pk.)

I need 4x SATA3 cables for this build. The ASRock motherboard comes with a black one and the Kingston 128GB SSD comes with another read one.
1   Rosewill 40-In-1 USB 2.0 3.5-Inch Internal Card Reader with USB Port / Extra Silver Face Plate (RCR-IC001)

This is just a handy cheap addition. It slides into the floppy drive tray of the case and adds another USB 2.0 connector, SD card reader, and lots of other reader slots to the front of the computer.
1   APEX TX-381-C Black Steel Micro ATX Tower Computer Case USB/Audio/Fan

Mini ATX tower case for Micro ATX motherboards, like the ASRock. It includes a carrying handle and 2x USB 2.0 ports and audio jacks under a small door on top of the case. It comes with a fairly quiet 80mm rear case fan and clear instructions.
1   Rosewill Stallion Series 400W ATX 12V v2.2 Power Supply RD400-2-SB

Dual 12V rails. Nearly silent 120mm fan and mesh cable sleeving. Includes 4x SATA power connectors and 1x PCI-Express. 1 year limited warranty

Click the video below to hear a description of the parts I ordered for this beast:

It took about 90 minutes to assemble everything and take these pictures. The following slideshow shows how I put it all together:

Once assembled, I updated the BIOS online (very cool – see the video below) and installed Windows Server 2012 Datacenter Edition.  Installation took only 4 minutes, 50 seconds!  Amazing.

Windows Server 2012 recognized all but two of the computer’s components, but some required updating so Windows Server can use their advanced capabilities.  Do NOT install the drivers using the setup program on the included ASRock H77 Pro-4M DVD.  The ASRock setup programs will BSOD the server since they are written for a different OS.  Instead, open Device Manager, right-click the following devices, and update the driver software using the ASRock DVD.

Here are the devices that need to be updated, in this order:

System devices
  • Xeon(R) processor E3-1200 v2/3rd Gen Core processor DRAM Controller – 0150
  • PCI Express Root Complex (Becomes “PCI bus”. Requires a restart)
  • Intel(R) H77 Express Chipset LPC Controller – 1E4A (Requires a restart)
  • Intel(R) 7 Series/C216 Chipset Family SMBus Host Controller – 1E22
  • Intel(R) 7 Series/C216 Chipset Family PCI Express Root Port 8 – 1E1E (Requires a restart)
  • Intel(R) 7 Series/C216 Chipset Family PCI Express Root Port 6 – 1E1A
  • Intel(R) 7 Series/C216 Chipset Family PCI Express Root Port 1 – 1E10

Universal Serial Bus controllers
  • Standard Enhanced PCI to USB Host Controller (Becomes “Intel(R) 7 Series/C216 Chipset Family USB Enhanced Host Controller – 1E26″)
  • Standard Enhanced PCI to USB Host Controller (Becomes “Intel(R) 7 Series/C216 Chipset Family USB Enhanced Host Controller – 1E2D”)

Other devices
  • Unknown device  (Becomes “Intel(R) Smart Connect Technology Service”)

Sound controllers
  • High Definition Audio Device (Becomes “Realtek High Definition Audio”)
  • High Definition Audio Device (Becomes “Intel(R) Display Audio”)

Network adapters
  • Realtek PCIe GBE Family Controller

IDE ATA/ATAPI controllers
  • Standard SATA AHCI Controller (Becomes “Intel(R) 7 Series/C216 Chipset Family SATA AHCI Controller”. The DVD drive will probably change drive letters after this update.)
  • Standard SATA AHCI Controller (Becomes “Asmedia 106x SATA Controller”.  This one is tricky.  Restart and press F8 to boot in Safe Mode. Restart again into normal mode. You will now see new “ATA Channel 0″ and “ATA Channel 1″ controllers.)

Display adapters
  • Microsoft Basic Display Adapter (Becomes “Intel(R) HD Graphics”.  The screen flashes during installation.)

Install Intel Management Engine Components from the ASRock DVD
  • Run <DVD Drive>:\Drivers\ME\Intel\(v8.1.2.1318_1.5M)\Setup.exe
  • Accept the Intel Manageability Engine Firmware Recovery Agent license agreement
  • Check for updates. This takes a few minutes.
  • This will fix the unknown PCI Simple Communications Controller device.

I also recommend that you update the Samsung SSD 840 firmware, which includes better TRIM support:
  • Download and install the Samsung Magician 4 software.
  • Click Firmware Update and Update. Reboot to finish the firmware upgrade.

Finally, run Windows Disk Management to initialize, format and label your Samsung 250GB SSD and Western Digital 2TB drives.

Here’s a video of the Windows Server 2012 Hyper-V server in action:

I hope this article, slideshow and videos are helpful to you in your quest to build the perfect Hyper-V lab server.  This is a great investment in your IT career!

Special thanks to my ExtraTeam colleague, Aman Ayaz.  It was his need for a new Hyper-V lab server (and his Visa card) that made this article possible.  :)

Windows Server 2012 Deduplication is Amazing!

The following article describes how to use Windows Server data deduplication on an Solid State Drive (SSD) that holds active Hyper-V virtual machines.

Coloring Outside the Lines Statement:

This configuration is not supported by Microsoft.  See Plan to Deploy Data Deduplication for more information.  Use these procedures at your own risk. That said, it works great for me.  Your mileage may vary.

A while back I decided to add another 224GB SATA III SSD to my blistering Windows Server 2012 Hyper-V server for my active VMs.  The performance is outstanding and it makes the server dead silent.  I moved my primary always-on HyperV VM workloads to this new SSD:

  • Domain Controller on WS2012
  • Exchange 2010 multi-role server on WS2012
  • TMG server on WS2008 R2

These VMs took 134GB, or 60%, of the capacity of the drive which was fine at the time.  Later, I added a multi-role Exchange 2013 server which took up another 60GB of space.  That left me with only 13% free space, which didn’t leave much room for VHD expansion and certainly not enough to host any other VMs.  Rather than buy another larger and more expensive SSD, I decided to see how data deduplication performs in Windows Server 2012.

Add the Data Deduplication Feature

Data Deduplication is a feature of the File and Storage Services role in Windows Server 2012.  It’s not installed by default, so you need to install it using the Add Roles and Features Wizard (as above) or by using the following PowerShell commands:

PS C:\> Import-Module ServerManager
PS C:\> Add-WindowsFeature -Name FS-Data-Deduplication
PS C:\> Import-Module Deduplication

Next, you need to enable data deduplication on the volume.  Use the File and Storage Services node of Server Manager and click Volumes.  Then right-click the drive you want to configure for deduplication and select Configure Data Deduplication, as shown below:

Configuring Data Deduplication on Volume X:
So far, this is how you normally configure deduplication for a volume.  You would normally configure deduplication to run on files older than X days, enable background optimization, and schedule throughput optimization to run on at specified days and times.  It’s pretty much a “set it and forget it” configuration.

From here on I’m going to customize deduplication for my Hyper-V SSD.

In the Configure Data Deduplication Settings for the SSD, select Enable data deduplication and configure it to deduplicate files older than 0 days. Click the Set Deduplication Schedule button and uncheck Enable background optimization, Enable throughput optimization, and Create a second schedule for throughput optimization.

Enable Data Deduplication for Files Older Than 0 Days

Disable Background Optimization and Throughput Optimization Schedules
Click OK twice to finish the configuration.  What we’ve done is enabled data deduplication for all files on the volume, but deduplication will not run in real-time or on a schedule.  Note that these deduplication schedule settings are global and affect all drives configured for deduplication on the server.

You can also configure these data deduplication settings from PowerShell using the following commands:
PS C:\> Enable-DedupVolume X:
PS C:\> Set-Dedupvolume X: -MinimumFileAgeDays 0
PS C:\> Set-DedupSchedule -Name “BackgroundOptimization”, “ThroughputOptimization”, “ThroughputOptimization-2″ -Enabled $false
This configuration mitigates the reason why Microsoft does not support data deduplication on drives that host Hyper-V VMs.  Mounted VMs are always open for writing and have a fairly large change rate.1  This is the reason Microsoft says, “Deduplication is not supported for files that are open and constantly changing for extended periods of time or that have high I/O requirements.

In order to deduplicate the files and recover substantial disk space you need to shutdown the VMs hosted on the volume and then run deduplication manually with this command:
PS C:\> Start-DedupJob –Volume X: –Type Optimization
This manual deduplication job can take some time to run depending on the amount of data and the speed of your drive.  In my environment it took about 90 minutes to deduplicate a 224GB SATA III SSD that was 87% full.  You can monitor the progress of the deduplication job at any time using the Get-DedupJob cmdlet.  The cmdlet shows the percentage of progress, but does not return any output once the job finishes.

You can also monitor the job using Resource Monitor, as shown below:

Process Monitor During Deduplication
Here you can see that the Microsoft File Server Data Management Host process (fsdmhost.exe) is processing the X: volume.  When the deduplication process completes, the X: volume queue length will return to 0.

Once deduplication completes you can restart your VMs, check the level of deduplication, and how much data has been recovered.  From the File and Storage Services console, right-click the volume and select Properties:

Properties of Deduplicated SSD Volume
Here we can see that 256GB of raw data has been deduplicated to 61.5GB on this 224GB SSD disk – a savings of 75%!!!  That leaves 162GB of raw disk storage free.  I could easily create or move additional VMs to this disk and run the deduplication job again.

The drive above now actually holds more reconstituted data than the capacity of the drive itself with no noticeable degradation in performance.  It currently hosts the following active Hyper-V VMs:

  • Domain Controller on WS2012
  • Exchange 2010 multi-role server on WS2012
  • TMG server on WS2008 R2
  • Exchange 2013 multi-role server on WS2012
  • Exchange 2013 CAS on WS2012
  • Exchange 2013 Mailbox Server on WS2012
  • Because real-time optimization is not being performed, the VMs will grow over time as changes are made and data is added. The manual deduplication job would need to be run as needed to recover space.
  • Since the SSD actually contains more raw duplicated data than the drive can hold, I’m unable to disable deduplication without moving some data off the volume first.
  • Even though more VMs can be added to this volume, you have to be sure that there is sufficient free space on the volume to perform deduplication.
For even more information about Windows Server 2012 data deduplication, I encourage your to read Step-by-Step: Reduce Storage Costs with Data Deduplication in Windows Server 2012!

I hope you find this article useful in your own deployments and I’m interested to know what your experience is.  Please leave a comment below!

How to Shut Down, Sign Out or Restart Windows 8 the Easy Way

Here’s a quick tip on how to sign out, shutdown or restart Windows 8 or Windows Server 2012 the easy way.  Simply click the Windows Taskbar and press Alt-F4.

Windows 8 presents a dropdown dialog box like this where you can easily switch user, signout, sleep, hibernate, shutdown or restart the computer:

Windows 8 Shut Down Dialog

Windows Server 2012 presents the following dialog box where your can disconnect (if connected via Remote Desktop), sign out, shut down, or restart:

Windows Server 2012 Shut Down Dialog

That’s a heck of a lot easier than navigating through the charms, especially if your connected via RDP!

How to Boot Directly into Desktop with Windows Server 2012

I love Windows Server 2012, I really do.  But who’s bright idea was it to boot to the “Modern UI” (aka, Metro) instead of the Windows Desktop?  There’s really no reason for this, so I wrote a PowerShell script that configures Windows Server 2012 to boot directly into the Desktop after signing in.

This is not a hack.  The script simply changes rights on an existing registry key to allow the value to be changed, and changes it.

NOTE: This script does not work on Windows 8 — It only works on Windows Server 2012.  Early beta builds of Windows 8 allowed you to toggle booting to the Desktop.  Microsoft removed those hacks in the RTM build of Windows 8, sorry.  :(

You may also want to read my article, How to Enable Autologon for Windows Server 2008 Member Servers and Windows 7 Member Workstations.  Those procedures also work for Windows Server 2012 and Windows 8.

Copy and paste the following text into Notepad and save it as BootToDesktop.ps1 on your Windows Server 2012 computer:

#Take Ownership of the “HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Server” registry key
$definition = @”
using System;
using System.Runtime.InteropServices;
namespace Win32Api
    public class NtDll
        [DllImport("ntdll.dll", EntryPoint="RtlAdjustPrivilege")]
        public static extern int RtlAdjustPrivilege(ulong Privilege, bool Enable, bool CurrentThread, ref bool Enabled);
Add-Type -TypeDefinition $definition -PassThru
$bEnabled = $false
$res = [Win32Api.NtDll]::RtlAdjustPrivilege(9, $true, $false, [ref]$bEnabled)
$key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey(“SOFTWARE\Microsoft\Windows NT\CurrentVersion\Server”, [Microsoft.Win32.RegistryKeyPermissionCheck]::ReadWriteSubTree,[System.Security.AccessControl.RegistryRights]::takeownership)
$acl = $key.GetAccessControl()

#Give Full Control of the key to BUILTIN\Administrators

$acl = Get-Acl “HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Server”
$rule = New-Object System.Security.AccessControl.RegistryAccessRule(“BUILTIN\Administrators”,”FullControl”,”Allow”)

#Set the value of ClientExperienceEnabled to 0 to enable boot to Desktop

Set-ItemProperty -Path “HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Server” -Name ClientExperienceEnabled -Value 0

Optionally, you can download the BootToDesktop.ps1 script here.

Now simply run the BootToDesktop.ps1 script from an elevated Windows PowerShell prompt and reboot.  The next time you sign in Windows Server 2012 will go straight into the Desktop.

The PowerShell script does three things:

  • It assigns ownership of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Server registry key to the local built-in Administrators group.  By default this key is owned by the protected TrustedInstaller security principal.
  • Full control is given on the key to the built-in Administrators group.  By default built-in Administrators only have Read access.  Full control gives us the ability to change values in the key.
  • Changes the ClientExperienceEnabled value from 1 to 0, which configures Windows to start directly to the Desktop.

Windows Server 2012 and Windows 8 secure protected registry keys and files using the TrustedInstaller security principal.  TrustedInstaller is a core part of Windows Resource Protection (WRP) technology.  Windows usually assigns ownership of WRP protected items to TrustedInstaller and they normally cannot be modified or deleted.  This script overcomes that and allows you to change the value of the ClientExperienceEnabled value.

Since this is really just a simple registry change, you can safely use it in your server imaging process for all your Windows Server 2012 computers.  It only needs to be run once per server and affects all users who logon to that server.

How to Convert Hyper-V VHD Disks to VHDX

Windows Server 2012 Hyper-V offers a new virtual disk type called VHDX.  VHDX virtual disks have many benefits, including larger maximum disks up to 64TB, protection against data corruption, and improved alignment of the virtual hard disk format to work well on large sector disks.  See for more information about the VHDX disk type.

You can convert existing older format VHD disks to the new VHDX format using the Hyper-V Manager console.  This process will create a new VHDX disk and copy the data from the existing VHD to the new disk.  At the end of the procedure you will have two disks, the original VHD disk and a new VHDX disk with the same contents.  You can safely delete the original VHD disk once you have confirmed that the new VHDX disk is fully functional.

Here are the steps to convert an existing VHD disk to a VHDX disk:

  • Shut down the VM that is accessing the disk, if necessary.  You cannot convert a disk that is in use.
  • Open the Hyper-V VM settings, navigate to the hard drive you wish to convert, and click the Edit button, as shown below:

  • The Edit Virtual Hard Disk Wizard will start.  Select Convert from the Choose Action page and click Next.

  • Select the VHDX disk format and click Next.

  • Choose whether the new disk should be fixed size or dynamically expanding.  Note that this gives you the opportunity to change disk types from the previous disk type.  Click Next.
  • Select the name and location for the new VHDX disk and click Next.
  • Review the summary and click Finish to create the new disk.  This may take a few minutes depending on the size of the VHD and the speed of your hard drive(s).  A 30GB VHD converted in less than two minutes on my SSD drive.  The size of the new VHDX disk will be slightly larger than the original VHD disk.

  • The last step is to mount the new VHDX disk to the Hyper-V VM.  Note the new VHDX extension.

Once you have started up your VM with the new VHDX disk you can safely delete the old VHD disk.  There are no other configurations necessary.

Install and Configure Windows PowerShell Web Access in Three Easy Steps

Windows PowerShell Web Access Gateway Architecture

Windows PowerShell Web Access is a new feature in Windows Server 2012. It is an IIS application that provides a Windows PowerShell console in a web browser. The IIS application acts as a gateway between the web browser and the machines that you can connect to in your environment. These machines should have Windows PowerShell remoting enabled.

There are a number of resources that explain how to configure PowerShell Web Access, including this video.  I want to tell you how to do it in as few steps as possible. 

The following is all done from an elevated PowerShell window of the Windows 2012 server you want to install PWA on.

1.      Install
the Windows PowerShell Web Access feature

Install-WindowsFeature -Name WindowsPowerShellWebAccess -IncludeAllManagementTools

2.      Install
the Web Application in IIS

Install-PswaWebApplication [-UseTestCertificate]
Add the -UseTestCertificate  parameter if you don’t already have an SSL certificate installed on the server.  This will install a self-signed SSL certificate that will expire in 90 days.

To use an existing SSL certificate, make sure it is configured in Bindings on the Website to use that certificate.

3.      Configure
Authorization Rules

Add-PswaAuthorizationRule -UserName domain\username -ComputerName * -ConfigurationName *

This Authorization Rule will allow the specified account to connect to any computer with any configuration name.

If you are installing on a workgroup server substitute the computer name for domain.

That’s all there is to it! 

You can access Windows PowerShell Web Access from Internet Explore using the following URL: https://servername/pswa

Windows PowerShell Web Access Login

Enter your user name, password, and the computer name you want to connect to and then click Sign In


Windows PowerShell Web Access

A Windows PowerShell window will open in your IE browser, connected to the computer you targeted.


As mentioned above, the target computer must have Windows PowerShell remoting enabled.  You can do this by running the following command from an elevated PowerShell prompt:


 Enable-PSRemoting -Force

Announcing Windows Server 2012!

Corporate Vice President Brad Anderson announced today at the MMS Summit 2012 that Windows Server 8 will be officially named Windows Server 2012.

The new “cloud-optimized OS” is due out… you guessed it… later this year.

Microsoft traditionally names its Server operating systems with the year of release, unlike its desktop operating systems.

Windows Server 2012 is available now in beta, although for now it’s still called Windows Server 8 Beta.  The OS still needs to hit its Release Candidate (RC) milestone before it reachs RTM later this year.

If you haven’t worked with Windows Server 2012 yet, I encourage you to do so in a virtualized environment to get your head around the differences.  If you don’t already have a Hyper-V host server, may I recommend this one.  It’s been getting rave reviews!