Q: I have a Windows Server 2012 R2 Hyper-V VM where I created the Virtual Hard Disk (VHDX) using the default size of 127 GB. Now the VHDX only has 10% free space and I need to make it bigger. How do expand the VHD size? Do I need to bring the VM off-line?
A: Beginning with Windows Server 2012 R2 you can expand a VM’s VHDX files online while the VM is still running. However, there are a couple of requirements. The virtual hard disk must use the VHDX format – it can’t be a VHD. Plus, the virtual hard has to be attached to the virtual SCSI controller – it can’t be attached to the virtual IDE controller.
To expand a VHDX use the Hyper-V Manager and click on Edit Disk on the Actions pane. This will launch the Edit Virtual Hard Disk Wizard. First, you use the Locate Disk page to browse to the location where your VHDX is stored. Next, the Choose Action page to either Compact or Expand the VHDX. To increase the size of the VHDX select the Expand option. This will display the Configure Disk dialog that you can see in Figure 1.
Enter the new size for the VHDX and then click Finish to resize the disk. After resizing the VHDX file you need to go into the VM itself and use Disk Manager to expand the VM’s disk storage. The new space will be shown as an unallocated disk volume. Use Disk Manager’s Extend Volume Wizard to expand the existing volume to include the new space.