I had to search the internet a while to find the right solution and it was not complete, so here is my description on how to migrate the virtual machine disk format from vmdk to vdi:
cd <folder where your disk image is>
vboxmanage clonehd somename.vmdk somename.vdi --format VDI
That takes a while. After finished you need to start virtualbox and go into the settings of your virtual machine. Under "Storage" you will still find the old HD file attached to SATA (or IDE) controller. Remove the old one and attach the new .vdi file.
Try starting the virtual machine to see if everything works as intended.
Then shutdown your virtual machine, go to File->Virtual Media Manager and remove the old vmdk file even there. Now you can delete the .vmdk.