Once you have installed virtualbox, you have command line tools that come with it to allow virtual drives file formats translation:
$ VBoxManage internalcommands converthd [-srcformat VDI|VMDK|VHD|RAW]
[-dstformat VDI|VMDK|VHD|RAW]
<inputfile> <outputfile>...