Q: What's the difference between the VDI server and file server mode for data deduplication in Windows Server 2012 R2?

A: Data deduplication was enhanced in Windows Server 2012 R2 to support the deduplication of Hyper-V virtual machines when used in Virtual Desktop Infrastructure (VDI) scenarios. To provide this support, data deduplication was enhanced to support the deduplication of exclusively locked files. To enabling deduplication, you must select the General purpose file server option, as shown in the following figure.

The easiest way to see the difference between the two modes is to configure each one in turn, then look at the full configuration. For example:

                              PS C:\> Enable-dedupvolume d: -UsageType HyperV                              Enabled       UsageType     SavedSpace      SavingsRate     Volume                                                                                                                 -------       ---------     ----------      -----------     ------                                                                                                                 True          HyperV        1.64 TB         78 %            D:                                                                                                                     PS C:\> Get-dedupvolume d: | fl                              Volume                   : D:                              VolumeId                 : \\?\Volume{31e426a7-de3e-11e1-93ed-90e2ba06f9d7}\                              Enabled                  : True                              UsageType                : HyperV                              DataAccessEnabled        : True                              Capacity                 : 1.82 TB                              FreeSpace                : 1.37 TB                              UsedSpace                : 462.47 GB                              UnoptimizedSize          : 2.09 TB                              SavedSpace               : 1.64 TB                              SavingsRate              : 78 %                              MinimumFileAgeDays       : 0                              MinimumFileSize          : 32768                              NoCompress               : False                              ExcludeFolder            : {\WindowsImageBackup}                              ExcludeFileType          :                               ExcludeFileTypeDefault   : {bin, vsv, slp, xml...}                              NoCompressionFileType    : {aac, aif, aiff, asf...}                              ChunkRedundancyThreshold : 100                              Verify                   : False                              OptimizeInUseFiles       : True                              OptimizePartialFiles     : True                              PS C:\> Enable-dedupvolume d: -UsageType Default                              Enabled       UsageType     SavedSpace      SavingsRate     Volume                                                                                                                 -------       ---------     ----------      -----------     ------                                                                                                                 True          Default       1.64 TB         78 %            D:                                                                                                                     PS C:\> Get-dedupvolume d: | fl                              Volume                   : D:                              VolumeId                 : \\?\Volume{31e426a7-de3e-11e1-93ed-90e2ba06f9d7}\                              Enabled                  : True                              UsageType                : Default                              DataAccessEnabled        : True                              Capacity                 : 1.82 TB                              FreeSpace                : 1.37 TB                              UsedSpace                : 462.47 GB                              UnoptimizedSize          : 2.09 TB                              SavedSpace               : 1.64 TB                              SavingsRate              : 78 %                              MinimumFileAgeDays       : 0                              MinimumFileSize          : 32768                              NoCompress               : False                              ExcludeFolder            : {\WindowsImageBackup}                              ExcludeFileType          :                               ExcludeFileTypeDefault   : {edb, jrs}                              NoCompressionFileType    : {aac, aif, aiff, asf...}                              ChunkRedundancyThreshold : 100                              Verify                   : False                              OptimizeInUseFiles       : False                              OptimizePartialFiles     : False

As you can see, the major difference between the two modes is that using Hyper-V (the first configuration) enables the deduplication of in-use files (i.e., virtual machine virtual hard disks) and optimizes partial files. In addition, the configuration files' extensions for virtual machines are automatically excluded from deduplication. Therefore, if you want to deduplicate Hyper-V virtual machines you must choose the Hyper-V (VDI) configuration option.