Reference Link: https://www.cnblogs.com/platero/p/4105808.html
Enter the Virtualbox installation directory, for example: "D:\ software \virtualbox", start cmd. If the cmd input command "vboxmanage" error, then in the VirtualBox installation directory to find the execution file, double-click the execution of the file, re-enter the command "Vboxmanage", error disappears.
1. Perform the following command to convert the VMDK to VDI
" SOURCE.VMDK " " Cloned.vdi " --format VDI
where "SOURCE.VMDK" is the vmdk file location, VDI is the target location
2. Enlarge the size of the VDI drive
40960
Note that the last parameter is the unit m, such as the hard disk you want to 40G, then the 1024x768 m * 40 = 40960.
3. First find the path of the VDI file, then open the VirtualBox, the software to the right will list the system information, open storage, the original point to the VMDK deleted, re-added as the newly generated VDI file.
4. Restart the virtual machine, in Disk Management, you should already be able to see that the newly added partition is an idle partition, so you have to allocate in the virtual machine on the line.
Adjust VMDK format disk space in VirtualBox