How to convert .img file to VM hard drive file.

Brian Read

Renowned Member
Jan 4, 2017
130
11
83
76
I have a .img file (actually designed to be copied to an SD drive), which I'd like to test in a VM. So I need a procedure that will take that .img and create a VM hard drive file which I can then connect to a VM.

Anyone got any ideas?
 
THis is what file says:

volumio-2.348-2017-12-22-x86.img: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,1), end-CHS (0x3ff,254,63), startsector 1, 7987199 sectors

I'm trying this on my fedora desktop (I'll try to run it in VirtualBox first)

vboxmanage clonemedium disk volumio-2.348-2017-12-22-x86.img volumio-2.348-2017-12-22-x86.vdi --format VDI

However it says that it can't identify the type of the input file.