Saturday 2 July 2016

Increase Size of a Virtual Hard Drive (.vhd)

If you have Virtual Machine running on Windows Server 2003. To increase the vhd disk size you need a third party tool to expand the partition. This tutorial will explain to you step by step how to increase the disk space of a Virtual Machine.

I'm Using a Windows 10 Hyper-V and running a windows server 2003 R2 virtual machine.


1. From Hyper-V Manager, Right Click on the virtual machine and select Settings. Make sure the virtual machine is Off and do not have any Checkpoints.





2. Click on Hard Drive and click Edit





3. Select Choose Action > Expand > Next





4. At Configure Disk. Change the New size and then click Finish





5. Boot up the Virtual Machine and go to Disk Management. The extended disk space will show as Unallocated.





6. There have few items you have to ready before we proceed to increase the disk space

  • ExtPart - Dell Basic Disk Expansion
  • Winrar - Compression tool



7. Download the ExtPart. Create a new folder and name it ExtPart. Compress to C:\Extpart


**Remark - It will have error during the extending disk space for x64 machine if you only run through the Self-Extractor. 




8. Open Command Prompt and type cd\extpart > Enter > extpart c: [disk size in MB]


** Remark - If you found that the error " Unable to connect to c: or it does not exist" there have some workaround you may try. 

a. Make sure there are no checkspoints
b. Stop Services for Windows Search
c. Stop Services for Indexing Service
d. Stop File Replication service
e. Stop DFS Replication service
f.  Stop Logical Disk Management services




9. To extend disk space to the Virtual Machine. the number of disk space to be add will be below or more.

  • 1 x 1024 = 1024
  • 2 x 1024 = 2048
  • 5 x 1024 = 5120
  • 10 x 1024 = 10240
** Remark - You can run ExtPart multiple times until you fill all the additional disk space you gave to the disk.




10. Go to Disk Management and check the disk space had extend to your Virtual Machine.