Do you know how to expand your VHD's when you are low on space?
Last updated by Steven Andrews [SSW] about 3 years ago.See historyOccasionally when you estimate the size of a VHD that you will be using in a server, you can get it wrong and you will need to give the Virtual Machine some more space. Instead of adding a bigger data disk in the Virtual Machine and migrating data, you can expand the existing disk.
- Open the Hyper-V Manager on the server hosting the Virtual Machine
- Shutdown the virtual machine (only required for Gen1 VMs)
- Click Edit Disk... in the Actions pane of the Hyper-V Manager
You expand a VHD from the Actions Menu | Edit Disk - In the Edit Virtual Hard Disk Wizard window, choose the VHD you want to edit and choose Next.
- Select Expand and click Next
- Enter the new size of the VHD and click Next
You will now have a resized VHD. Next step is to boot up into the virtual machine and tell disk manager to resize the partition on the VHD to use the free space which has been added at the end of the VHD. Windows Server 2008 makes this very simple:
- Boot into the virtual machine
- Open Computer Management and choose Disk Management
- Right click on the partition sitting at the front of the newly resized disk and click on Extend Volume...
The first partition on the disk needs to be expanded to use up the unallocated space created when expanding the VHD - You will have to use all the available space when you extend the volume as it is a Simple Volume. (See Rule: Do you use Basic Volumes inside VHD’s?) When you are asked to select your disks just click Next
- Click Finish
The disk is now using all the available space inside the VHD
Love it
0
Agree
0
Disagree
0
No way
0