Over time, additional data may be added to a server, causing available free space to become unavailable. In this case, you may want to add some additional storage to a virtual hard disk that is attached to a virtual machine. This guide will step you through increasing the size of an existing virtual hard disk and allocating the additional space within Windows.
Increasing the size of a VHD or VHDx File
1. Click on Start and type virtmgmt.msc, or type Hyper-V and click the Hyper-V Manager
2. In the Hyper-V Management Console, locate the virtual machine that you will be expanding and shut it down.
3. Right Click the virtual machine and choose Settings…
4. In the Settings Window, select the Virtual Hard Disk on the left, then click Edit on the right.
5. In the Edit Virtual Hard Disk Wizard window, click Next to skip the Locate Hard Disk step
6. On the Choose Action page, select Expand and click Next
7. On the Configure Disk page, enter the desired new size of the hard disk and click Next
Note: This should be the TOTAL Size of the disk, not how much you’re increasing. For example, the original size of my VHDx was 60GB and I want to expand it to 80GB. In the prompt, I entered 80GB.
8. On the Summary Page, verify the information is correct and click Finish
9. Right Click on the virtual machine and choose Start to boot back into Windows.
Adding Storage in Windows
1. Log into the virtual machine (either through Remote Desktop or via the Hyper-V Console) as an administrative user.
2. Click Start and in the Start Search, type Diskmgmt.msc then hit Enter to open Disk Management
Or
In the Server Manager click Tools > Computer Management. Then locate Disk Management on the left.
3. In the Disk Management Console, locate the volume that you wish to expand. Right Click the existing volume and choose Extend Volume…
4. In the Extend Volume Wizard, click Next to skip the Welcome page.
5. Select the Free Space that you want to use and click Next
6. Verify the information and click Finish to expand the volume
7. The volume has now been expanded and you have full access to the additional drive space.