]> Posts for October 2022 🌐:aligrant.com

Resizing a VHDX without Hyper-V

Alastair Grant | Monday 24 October 2022

I use VHDX files for storing backups on removable storage, because I can easily apply BitLocker on them, and move them about independently of the underlying storage.  But occasionally I hit the need to expand that virtual disk.  Unfortunately, it's not as simple as load disk management and clicking extend.  The solution is our trusty 'diskpart' tool.

Run from an administrative command prompt:

select vdisk file="X:\MyDisk.vhdx"
expand vdisk maximum=<size in MB>

This will only extend the disk, not the volume or partitions inside that disk.  You will have to do that in the usual fashion, if your VHDX is encrypted, that means mounting it first and decrypting it.

Once decrypted you can extend the partition either through disk management, or again through 'diskpart'.  If using diskpart, you need to first identify the volume you're working with:

list volume

You should see your mounted virtual disk listed, probably the volume with the highest number.  You need to select this volume before you can extend it; just use the number itself when selecting the volume

select volume <number>

The 'extend' command on its own will extend the volume to the rest of the remaining space.

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.

Entries for: October 2022

Previous Next