Some time ago we explained how to convert an .vmdk file to a XEN compatible RAW file, today we are going to review how to convert one .vmdk to a virtualbox compatible .vdi disk.
First, create a virtual disk from preallocated to growable as we already saw. I will use one XPSP2 vmware disk.
# vmware-vdiskmanager -r XPSP2.vmdk -t 0 hardrive-preallocated.vmdk
Convert the file again to a .bin file with the help of quemu like:
# qemu-img convert hhardrive-preallocated.vmdk hardrive-raw-file.bin
And in the end, use virtual box converter to create a compatible disk .vdi, in this example, I’m using MacOS VirtualBox binaries.
# VBoxManage convertdd hardrive-raw-file.bin hardrive-virtualbox.vdi
Now create a new virtual machine in Virtual Box and assign it this new hardrive-virtualbox.vdi file.
Method 2, actually is not a conversion, is using a vmdk in VirtualBox:
- Start Virtualbox
- Inside the Virtualbox Menu click: File > Virtual Media Manager
- Click on the Add button.
- Locate and select the VMware .vmdk file you would like to convert.
- Click Open.
- Verify your disk image has been added to the list of images and that the virtual and actual sizes appear accurate.
- Click OK
- Create a new virtual machine profile, selecting your imported image for the storage.
- Boot your new virtual machine.