there are two options of how to create a disk image:
An image file will be created on your host system which has roughly the same size as the virtual disk's capacity. So, for a 10G disk, you will have a 10G file.
With two tools:
)
VBoxManage.exe list hdds
.............................
UUID: 75f8ad10-ea21-4428-8963-3e8b039c0843
Parent UUID: base
State: inaccessible
Type: normal (base)
Location: D:\tmp\resized.vmdk
Storage format: vmdk
Capacity: 40960 MBytes
Encryption: disabled
...................
VBoxManage.exe closemedium disk <uuid> --delete
The modifyhd works only with VHI and VHD format for vmdk, you need to clone it first.
VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi
# VBoxManage.exe clonemedium /home/Users/gerard/.docker/machine/machines/default/disk.vmdk disk.vdi --format vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone medium created in format 'vdi'. UUID: 7daa25c4-4297-4b72-bf61-11077fbfc2bf
VBoxManage.exe modifyhd cloned.vdi --resize 40960 # 40Gb
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone medium created in format 'vmdk'. UUID: 75f8ad10-ea21-4428-8963-3e8b039c0843