網頁

2011年12月4日 星期日

Shrink Volume and Resize VHD disk

When I convert physical disk "500GB" to virtual disk by "VHD2DISK" tool, I find out the virtual disk size has 500 GB but I just want the system partition (about 60 GB) to boot it on Hyper-V.

How to do it? Shrink next Resize it!
[Shrink Volume]

  • In the Server Manager of Windows Server 2008 R2, please right-click "Disk Management" to select "Attach VHD".

  • Click "Browse..." button


  • Select the converted disk next to click "Open" button


  • Click "OK" button


  • You will see a new "Disk 7" mounted


  • Right-Click this disk next to select "Shrink Volume..." in menu


  • Shrink Processing now!


  • I want to keep 60 GB system disk so that the disk size is 60*1024= 61440 MB after shrink. 

What size need to be shrinked? About 415497 MB (Caculation: 476937-61440= 415497 MB)
After write down this value, please click "Shrink" button.

  • You will see the two partition: one is system partition, the other is data partition.


  • Right-Click Disk 7 to "Detach VHD"


  • Click "OK" button

  • So do that the mounted VHD disk is release!


[Shrink Disk]
Download a good utility "VHDResizer" from this URL: http://vmtoolkit.com/files/folders/converters/entry87.aspx

  • To extract and execute it, the VhdResizer windows will pop up and you can click "Open" button for selecting source VHD file.


  • Select the Shrinked VHD next to click "Open" button


  • You will see the VHD disk information as Type and Size(mb). And it will tell you the min size of destination VHD will be 60 GB.


  • Click "saves as" button for selecting the VHD location of Destination vhd.


  • Key in the vhd file name next to click "Save" button


  • After changing disk type to "Fixed" and writing down 61 GB in "new size" field, please click "resize" button.


  • Resize Processing now!


  • Click "No" to disable Resize another disk.


After finishing the above procedure, you can mount this VHD file on Hyper-V and the disk size only has 60 GB, not 500 GB as the physical disk size.

沒有留言:

張貼留言

Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.