I would like to create VBox from a resized image file. Because --resize seems to be supported only for VDI formats, I think I have to convert the image temporarily.
I'm using the following sequence:
$ VBoxManage internalcommands createrawvmdk -filename tmp.vmdk -rawdisk disk_v1.0.0.img
$ VBoxManage clonehd "tmp.vmdk" "tmp.vdi" --format vdi
$ VBoxManage modifyhd "tmp.vdi" --resize 2048
$ VBoxManage clonehd "tmp.vdi" "disk_v1.0.0.vmdk" --format vmdk
(In future I think I continue with creation of an appliance from that).
The clonehd "registers" the disk to Virtual Media Manager and I found no "removehd", thus I get warnings when deleting the tmp files and can run the commands only once.
How do I remove a media from Virtual Media Manager by script?