Monday, 13 August 2018

How to Reduce a Virtual Disk Size In Hyper-V

                                         
Execute following steps.
  1. Shut Down Virtual Server from Hyper V console on Physical Host
  2. Execute following Power shell command line on Physical Host
    1. Resize-VHD -Path 'Virual machine folder location path’ -ToMinimumSize
    2. Reference link (https://docs.microsoft.com/en-us/powershell/module/hyper-v/resize-vhd?view=winserver2012-ps)
  3. Inspect the Current file size after PS command execution.
  4. Go to Hyper-V Console, VM properties> Select the Virtual Hard Disk> Click on Edit > Select Compact> Next>Finish and OK.
  5. Power ON VM Physical Host
  6. Go to Disk Management and confirm the change.