A short tutorial on shrinking a Microsoft Windows Server Hyper-V 2012 (R2) VM virtual disk and Windows Guest Operating System.
Note that these actions are applicable on Windows Server 2012 (r2) and Windows 8/8.1 But should also work with Windows 7 and Server 2008 (r2) guest OS in a similar fashion. This tutorial will cover the shrinking aspects of a VM virtual disk and guest operating system, extending a disk works in a same manner. (When extending, first start at extending the VM disk, then the OS)
1) Open Hyper-V Manager, Select a VM and open the Console.
2) Right click on the Start Button (windows) and select ‘Disk Management’.
3) Select the volume you would like to shrink, and click on ‘Shrink Volume…’
4) Define the amount of MB’s to which you would like to reduce the volume with.
5) Click ‘Shrink’ and note the ‘unallocated’ free disk space.
6) Shutdown the VM.
7) Edit the ‘Settings…’ of the VM.
8) Select the corresponding Hard Drive. Click ‘Edit’
9) Click ‘Shrink’
10) Select the New VM Disk Size. (NOTE: This is the total disk size. Not the amount you would like to reduce with)
11) Click Finnish.
The VM virtual disk and the Guest OS volume are now reduced in size.