Converting VirtualBox .vdi diskfiles to Hyper-V .vhd files
If you are using Oracle Virtual Box with .vdi format for the disk image and want to move your virtual machine to Microsoft Hyper -V there is a small migration required as currently Hyper-V doesn’t read the .vdi file.
The good part is that its extremely easy as well as Virtual Box also comes with a GUI to convert .vdi files to .vhd files.
- Open Virtual Box and go to Files > Virtual Media Manager
- Select the disk file you want to migrate and click copy.
- Select the output format of the disk file (Hyper-V and VMWare support .VHD file) and click copy.
- Wait for the the copy to complete and then it can be plugged into Hyper-V
Oh yes ! there is a nerdier way of converting the file too, just locate the VirtualBox binaries and fire the following command 😉
vboxmanage clonehd <source path to vdi file> <destination path of vhd file> -format VHD
If you have any questions please feel free to PM me or leave a comment.
Hyper-V does not seem to want to import the vhd file, is it expecting an .xml config file too?
https://i.imgur.com/jIxXdDS.png
@Stuart: VHD, VDI, and others are not actual virtual machines. They are virtual disks only. You will need to create the virtual machine in Hyper-V and attach the VHD. In newer versions however, you will need a further step, and convert the VHD to VHDX (https://blogs.technet.microsoft.com/aviraj/2012/05/05/windows-server-2012-convert-vhd-to-vhdx-using-hyper-v-manager/).
There is another problem, using that method the disk identifier changes on the cloned one, so it is not the same.
Important if has an operating system that uses such id for ‘activation’, like nasty Windows.
I do not see anywhere an option no not change such Disk ID.
The identifier is referenced by other tools as the UUID.