Dedup only works on at rest files. A VM's files are not at rest. See http://www.aidanfinn.com/?p=11979 It is also not a constant process. AFAIK it "chunks" the files once per night, but you an force that to happen somehow. Not had a chance to get into it yet.
Hi Aidan, I'm not following... We are running dedup inside the guest, not on the host. Now that dedup has run inside the guest and the volume is reporting that it is only taking up 125 GB of space, shouldn't we able to shrink the vhdx file accordingly?
Hmm... not sure it has anything to do with deduplication. Took another vhdx that had 39 GB of data on it and deleted 9 GB so it is showing 30 GB used. When I try to shrink that one it finishes immediately and does not shrink at all. Perhaps vhd compacting is somehow broken in the RC?
Got some suggestions on the technet forum. Defragged and then ran a "full" optimization via powerhell and got down to 210 gigs. Defragged and compacted again and got down to 200. Still not the 125 it should be, but some progress at least.
Update - same issue on another separate installation, same configuration. After two passes of defrag/optmize-vhd was able to shrink a vhd from 350gb to 180gb (again not as small as the actual data set, but a big improvement). Looks like MS still has a bit of work to do to get the dedup benefits translated over to the virtual world!