5

I have a .vhd virtual hard disk. I need to convert it to .img disk image. How can I do it? I have Windows 7 and VirtualBox at my disposal, can those tools help?

Tomáš Zato
  • 4,282
  • 14
  • 48
  • 77

1 Answers1

8

You can go with VirtualBox by converting your image using the CLI's --format raw argument:

VBoxManage clonehd disk.vdi disk.img --format raw

As long as VirtualBox can read the input disk image, you should be good to go.

planetshg
  • 96
  • 1
  • 8
  • 1
    Excuse this newbie user here: where do I insert this argument line? – Fabián Jan 25 '17 at 20:17
  • 1
    Nevermind I found it out. VBoxManage is an .exe, so I just need to enter the VirtualBox folder, and execute that line via Windows's cmd. Although...Can this be done viceversa (img > vhd)? – Fabián Jan 25 '17 at 20:24
  • 1
    Nevermind, it can be done. By executing "VBoxManage clonehd" it'll say the different possible formats. – Fabián Jan 26 '17 at 00:00