We already covered how to create vhd in Disk Management, we haven’t gone very deep in how to resize vhd disk partitions, extend or shrink them, we’ll do that in this page
Open Disk Management and check the disk map, if you can see the blue disk icon, then the VHD is listed, otherwise, click Active and Attach VHD
I create a 10M VHD, it becomes 9M after initialized and turns to 7M when creating a partition, so I can't shrink this volume, I'll make it to 1G in the extending volume example
BTW, creating 1G VHD takes me 1 min, 10 G takes about 5 mins
Virtual disks are widely used on the Server side, mostly a VHD means a single user and an individual system, so it’s likely to get some partition running out of space, extend volume in Disk Management can be a helper, do the followings to enlarge a VHD partition:
Or if it’s No, or there’s no such space, we can delete the adjacent partition and make that space available, so do this instead:
Backup the about-to-delete partition first to other partition or other external storage media before we proceed to delete, and don’t forget to create this partition again when we have left enough unallocated space after extending the other drive
We don’t really have to delete any partition to extend another volume, we can simply resize the small volume without data loss, I mean, without formatting or deleting.
In Partition Expert we can perform operations below:
If the large partition is not right next to the small partition, don’t worry, use the Resize/Move Volume function to move unallocated space ahead and next to the small partition
Let’s assume the small partition is C: Drive and the large partition is D: Drive, we can easily enlarge C Drive without data loss in D Drive
The above-mentioned method is to create unallocated space first and then merge that space to the small partition, or C: Drive, i.e., easy to understand but a little bit troublesome, can we just make it simpler?
Sure thing, we can use Partition Extender instead.
In Partition Extender, steps are easy to follow:
Then you increased the small partition size and decrease the other partition at the same, one step for two operations
Detach the VHD so that it doesn’t show in Disk Management and File Explorer
Detach won’t delete partitions and data in it
But we can still access the disk by directly navigating to the folder that contains this file, the .vhd
format file, once you double-click the file, the VHD attaches itself automatically in Disk Management
If you don’t want to any user to check the files on a detach VHD, you can make the disk offline
Then when you try to access this .vhd
file, you’ll get an error
When you directly access this file (double-click) right after creating, you’ll get this error message
Steps to fix this issue, we’ll:
Then the disk becomes unallocated space, right-click on it and choose New Simple Volume and follow the wizard to create a new partition, and finally, you can access the volume, it will auto pop up after it finishes formatting
Next time you run Disk Management, it will auto pop up the initialize window if you forget the VHD disk after creating
When you try to delete the VHD and you don’t detach it from Disk Management, you’ll get this message
To fix this, we try to:
Now you can delete the .vhd
file like the way deleting other files, press the Delete button and it will go to recycle bin, press Shift + Delete and it gone, can’t be restored from recycle bin