You can only resize the virtual hard disk of a running virtual machine if:
- It is a .VHDX file
- It is connected to a SCSI controller
These restrictions mean that people often ask me if you can resize the boot disk of a virtual machine. And the answer is: Yes, if it is a Generation 2 virtual machine. Generation 2 virtual machines only have SCSI controllers, and boot off of the SCSI controller.
Meanwhile, Windows has supported shrinking and expanding the boot partition since Windows 7 / Windows Server 2008 R2. So you can easily resize the boot partition after you have expanded the virtual hard disk.