In this article we will be exploring two Windows based tools that you can use to convert VDI files to VHD format. A VDI file is a Virtual Disk Image supported by VirtualBox which is Oracle’s open-source desktop virtualization program. These files are used to start the VirtualBox VM that allows the users to run additional operating systems on a single computer system. VHD and its successor VHDX are file formats that represent a Virtual Hard Drive which contains all that is found on a Physical HDD including disk partitions, file system, files, folders and more.
This is the command-line interface to Oracle VM VirtualBox that offers you complete control of the application from the command line of the operating system. VirtualBox is a powerful x86 and AMD64 / Intel64 virtualization product for enterprise as well as home use developed by Oracle Corporation. As mentioned earlier, it allows users to run multiple operating systems including Windows, macOS, Linux, Oracle Solaris and more at the same time on a single computer.
Once you install Oracle VM VirtualBox using the link that we have provided below, the command line executable VBoxManage.exe will be located in Program Files/Oracle/VirtualBox. All that you are required to do is run the following command from the Windows command prompt:
vboxmanage clonehd “freedos 1.3.vdi” “freedos 1.3.vhd” –format VHD
where, freedos 1.3.vdi is the source filename of the VDI file and freedos 1.3.vhd is the output file name of the VHD file. You can change these filenames are per your requirement. The above command will save the output file in the same folder. If you wish to save the output file in a specified folder, such as ‘D:\Virtual’, you can use the following command:
vboxmanage clonehd “freedos 1.3.vdi” “D:\Virtual\freedos.vhd” –format VHD
You can also use the GUI of Oracle VM VirtualBox to convert VDI files to VHD format. The following are the steps for the same:
1. Launch the Oracle VM VirtualBox Manager in Windows.
2. Click on File | Tools | Virtual Media Manager or alternatively use the keyboard shortcut Ctrl + D.
3. Click on the ‘Add’ button in the toolbar at the top and add the VDI file from your system.
4. Next, choose the VDI file that you just added, click on the ‘Copy’ button, then choose VHD as the Virtual Hard Disk file type and click on ‘Next’.
5. In this screen you can choose whether the new virtual disk image file should dynamically grow as it is used or if it should be created at its maximum (fixed) size.
6. Now, click on ‘Next’, specify the destination file name, choose the folder where you wish to save the file and finally click on ‘Finish’. You can also select the size of the virtual hard disk in this screen by dragging the slider.
7. The output VHD file now be created, and you will be able to see it in the Virtual Media Manager screen.
Click here to install Oracle VM VirtualBox Manager for Windows.
2. QEMU disk image utility
This is a disk image utility for Windows that enables you to create, convert, and modify virtual disk images online as well as check their consistency. It can handle all the image formats supported by QEMU (Quick Emulator) which is a free and open-source emulator that emulates system’s processor and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems.
Just download the QEMU disk image utility from the link that we have provided below and run the following command from the Windows command prompt:
qemu-img convert -f vdi -O vpc freedos.vdi freedos.vhd
where freedos.vdi and freedos.vhd are the source and destination names respectively. ‘-f vdi’ signifies that the source file format is VDI and ‘-O vpc’ describes that the output file format should be VHD.
Click here to download the QEMU disk image utility for Windows.
Feel free to utilize either of the two methods mentioned above for transforming VDI files into VHD format. Explore both options and share your feedback with us.