Convert VM disk format
Convert VHDX To VMDK
Virtual Box to convert
Open Command Prompt as admin and run this command:
1
cd C:\Program Files\Oracle\VirtualBox
Next run the following command with the correct paths to the vhdx file and where you want to store the copy
1
.\VBoxManage.exe clonehd --format vmdk C:\temp\My-VM.vhdx С:\temp\My-VM.vmdk
QEMU-IMG
Windows Download
Linux
1
sudo apt-get install qemu-utils
Open a Command Prompt as Admin to the location of the program and you can run this command to view the disk info:
1
qemu-img.exe info c:\temp\My-VM.vhd
Here is an example of how to convert a vhdx file:
1
qemu-img.exe convert -p c:\temp\My-VM.vhdx -O vmdk c:\temp\My-VM.vmdk
Converting VMDK to the ESXi format
Upload the converted VMDK file to the datastore of ESXi
Enable SSH access on your ESXi host (Manage > Services > TSM-SSH)
Go to the directory where the VMDK was uploaded cd /vmfs/volumes/SSD2/converted
Use vmkfstools to convert VMDK to ESXi format.
1
vmkfstools -i My-VM.vmdk My-VMthin.vmdk -d thin
As you can see on the directory, the conversion with vmkfstools has completed successfully and two new files have been created:
My-VMthin-flat.vmdk
My-VMthin.vmdk
Importing a VMDK disk to a VM on ESXi
Select Virtual Machines and hit Create/Register VM.
Select creation type > Create a new virtual machine. Click Next on each step to continue.
Select a name and guest OS
Select storage.
Customize settings. Delete the virtual disk that was created by default with the new VM. Then, click Add hard disk > Existing hard disk.
Select the converted My-VMthin.vmdk
Start your Virtual Machine now.
Additional
You can download the vCenter Converter to do as well This tool is easy to do P2V and V2V process