I had to increase disk size on a Windows 10 VM. They way to do this is to resize the VDI file.
First turn off the VM. Then open Terminal and run the following commands to show the current disk size and then change it with VBoxManage.
Check the disk space has changed after running the command with showmediuminfo
[cci_bash]VBoxManage showmediuminfo “/home/iq/VirtualBox VMs/Win10Ent-CU/Win10Ent-CU.vdi”
VBoxManage modifymedium disk “/home/iq/VirtualBox VMs/Win10Ent-CU/Win10Ent-CU.vdi” –resize 26000[/cci_bash]
Once this is complete start the VM and run the disk Cmdlet to extend the partition:
[cci_powershell]Get-Disk
Get-Partition
Resize-Partition -DiskNumber 0 -PartitionNumber 2 -size 30930894848 -Verbose[/cci_powershell]
1