grandeduc - Fotolia

Can you create a dynamically expanding virtual hard disk?

If you build a dynamically expanding VHD it is important to remember to set the size to match the maximum possible storage space it will use.

When you create a virtual hard disk, it is a good idea to make it a dynamically expanding virtual hard disk. The advantage of a dynamically expanding VHD is that the host PC sees the disk as the size you assign it -- say a 50 GB hard disk -- but the disk actually only uses as much storage space as it needs.

In this example, there is a 50 GB VHD attached to the host PC, assigned as drive W:. Figure A shows the host Windows 10 OS seeing the dynamically expanding VHD as a 50 GB hard disk. Figure B shows the VHD file properties instead, which shows it is still empty because the VHD file on the host PC's hard disk drive (HDD) is only 260 MB.

How the host OS sees the VHD
The host Windows 10 OS sees the dynamically expanding VHD as a 50 GB hard disk.
VHD file properties
The VHD file properties are still empty.

Although the VHD file size is just under 10 GB, even after installing Windows 10, you must store it on a physical internal HDD or solid-state drive partition with free space greater than or equal to its total size -- 49.8 GB in the example above.

This is important to understand. That is, you can create a 1,024 GB VHD on a physical partition with only 30 GB free space. You can even install Windows on it by applying an image. But when you try to boot it up, you will get a blue screen of death.

Always remember the physical partition that contains your dynamically expanding virtual hard disk file must have sufficient free space to let it expand to its maximum size. Meaning if you assign 50 GB to your dynamically expanding virtual hard disk, make sure the partition where you place it has at least 51 GB free.

Dig Deeper on Windows OS and management

Virtual Desktop