The Active Network
ActiveMac Anonymous | Create a User | Reviews | News | Forums | Advertise  
 

  *  

  Hyper-V How To: Shrink a VHD File
Time: 00:16 EST/05:16 GMT | News Source: Microsoft | Posted By: Kenneth van Surksum

Jeremy Hagan: One problem I have had when trying to do my first round of P2Vs for my Hyper-V implementation that I didn’t notice in testing is that you can’t size the VHD of the VM smaller than the corresponding physical disk of the original machine. Since it is best practice to have one LUN per VM and it is also best practice to have fixed VHDs, this can cause a lot of wasted SAN space. In my planning for the P2V process I monitored the target servers for 1 month so that I could get an idea of the CPU and memory use, but also the data growth. I decided to plot the percentage of data growth, extrapolate this for 3 years and then add a 15% premium on top of this then rounded up to the nearest 5 GB. This ended up being the SAN LUN size for each VM. The problem I then had was that I didn’t have enough SAN space available to P2V my machines.

What I decided I needed to do was to P2V each machine to a sufficiently large scratch LUN, then shrink down the VHDs to be the size I wanted then migrate the VM off the scratch LUN to the desired LUN. Easy right? Well maybe not. After much searching I have managed to come up with a recipe for doing this. See the example below. In this case it was a Windows XP machine with a 40 GB hard disk, but only 9.5 GB of data. If you want to play with this I recommend making a copy of the VHD file as a backup rather than taking a snapshot. Snapshots will interfere with final step using VHDResizer to create the final fixed VHD file.

Write Comment
Return to News

  Displaying 576 through 577 of 577
Prev | First
  The time now is 8:52:52 AM ET.
Any comment problems? E-mail us
#576 By 4240821 (82.115.4.230) at 7/27/2025 6:49:28 PM
https://moanio.com/video.php?id=1855
https://moanio.com/video.php?id=3526
https://moanio.com/video.php?id=4542
https://moanio.com/video.php?id=1724
https://moanio.com/video.php?id=3840
https://moanio.com/video.php?id=5866
https://moanio.com/video.php?id=5771
https://moanio.com/video.php?id=2654
https://moanio.com/video.php?id=4168
https://moanio.com/video.php?id=5359

#577 By 4240821 (82.115.4.230) at 7/29/2025 8:26:33 AM
https://justpaste.me/aCX03
https://justpaste.me/fIzS2
https://justpaste.me/ddJN1
https://justpaste.me/c37T
https://justpaste.me/eJeF2
https://justpaste.me/c37T
https://justpaste.me/Z1zA
https://justpaste.me/dHVP3
https://justpaste.me/a162
https://justpaste.me/Zz7O2

Write Comment
Return to News
  Displaying 576 through 577 of 577
Prev | First
  The time now is 8:52:52 AM ET.
Any comment problems? E-mail us
User name and password:

 

  *  
  *   *