In the world of virtualization, VMDK and VDI are two important disk file formats. VMDK is used by VMware Workstation, while VDI is used by Oracle VirtualBox. In this article, we will show how to convert a VMDK file to VDI, and vice versa. This process will come in handy if you want to move a virtual machine from VMware Workstation to VirtualBox (or vice versa). Let’s get started!
I have done the demonstration of converting a working virtual machine from VirtualBox to VMware by changing the file formats.
There are some articles on the internet showing similar steps in Linux or Solaris environments. But in this article, we will focus on how to convert VMDK to VDI file format on Windows 10, 11/8.1 OS by using built-in VirtualBox command. Therefore you should have Oracle VirtualBox on the computer.
What is VMDK file Format?
The VMDK file format is a disk image format used by VMware Workstation. It is the default disk image format for VMware, and it allows you to create, edit, and delete virtual disks. VMDK files are usually large in size, and they can be used with both VMware Workstation and VMware Player.
What is VDI file Format?
The VDI file format is a disk image format used by Oracle VirtualBox. It is the default disk image format for Oracle VirtualBox, and it allows you to create, edit, and delete virtual disks. VDI files are usually smaller in size than VMDK files.
What is the difference between VDI and VMDK?
The VMDK file format belongs to VMware, while VDI is used by Oracle VirtualBox. VMDK files are usually larger in size, and they can be used with both VMware Workstation and VMware Player. VDI files are usually smaller in size than VMDK files. Both file formats contain the virtual hard disk content for virtual machines in respective software.
2 Ways to Convert VMDK to VDI
1) Technically it’s not required to convert VMDK to VDI to open VMware virtual machines in VirtualBox, because VirtualBox supports VMDK disk image files natively.
VMDK files can be added to the VirtualBox media manager very easily. Read the earlier guide about attaching and opening the VMDK files in VirtualBox.
After successfully added the VMDK file to the VirtualBox media manager, you can boot the virtual machine OS from the VMDK file by following steps;
- Create a new virtual machine in VirtualBox with the correct Operating System which is on the disk file.
- Instead of creating a new hard disk, select the existing VMDK disk file and process the normal steps. Do not worry about the VMX file which is having VMware virtual machine configuration only.
This is the quick solution to use the VMDK file in VirtualBox without converting it to a VDI file format. Let’s go to the second step if you really need to change the disk format from VMDK to VDI.
2) This step is to convert the .vmdk file to .vdi and get the real output.
As mentioned earlier, this step can be done on a computer that has VirtualBox installed to use a few VirtualBox commands. Also, it is advisable to copy the VMDK file if you really need the original VMDK file intact. Though the conversion command will not affect the original file, it is a good practice to backup if the VM on the VMDK file is so important.
We will be using Vboxmanage clonehd command which is located under C:\Program Files\Oracle\VirtualBox\.
“C:\Program files\Oracle\Virtualbox\vboxmanage” clonehd <VMDK file location> <VDI file location> –format VDI
“C:\Program files\Oracle\Virtualbox\vboxmanage” clonehd windows10.vmdk windows10vb.vdi –format VDI
It will provide the output VDI file to the destination you mentioned.
Now the converted VDI file is ready to use in Oracle VirtualBox or VDI virtual disk supported platforms.
VDI to VMDK in Windows Environment
We can use the same VBoxManage command to convert a VDI file to VMDK. Make sure that the virtual machine doesn’t have any snapshots or child VDI files. If you have the snapshots of the virtual machine, usually the latest virtual machine will run from the child VDI file, not from the original VDI. So, converting the base VDI file will not give the current state of the virtual machine in the VMDK file.
“C:\Program files\Oracle\Virtualbox\vboxmanage” clonehd <VDI file location> <VMDK file location> –format VMDK
“C:\Program files\Oracle\Virtualbox\vboxmanage” clonehd windows2019.vdi windows2019.vmdk –format VMDK
I managed to migrate an old Windows XP machine from VirtualBox to VMware by converting the virtual hard disk by the above commands.
Same VM on VMware Player.
We hope that this article helped you understand the VMDK and VDI file formats and how to convert them. Please don’t hesitate to leave a comment if you have any queries.