93

I have a .img file for Windows 10, and I need to turn it into something which I can use in VirtualBox, such as an ISO, or turning it into a bootable virtual disk for an ICT project.

1
  • 4
    If this was Linux, I'd suggest qemu-img convert. On Windows, it's more fun to install Win1 yourself from floppy images Commented Feb 20, 2013 at 16:05

2 Answers 2

143
  1. Select a virtual machine by clicking its name in the VirtualBox window
  2. Click the Machine menu at the top of the VirtualBox window, and click Settings
  3. Click the Storage category in the Settings window
  4. Right-click in the storage tree pane, and click Add Floppy Controller
  5. Right-click the Floppy Controller device, and click Add Floppy Device
  6. Click the Choose Disk button in the prompt window that appears
  7. Navigate to the floppy disk image file (.IMG) on your computer and double-click it

If that doesn't work, try renaming the .IMG as .ISO and mount it.

If that too doesn't work, use VBoxManage's convertfromraw command as follows:

VBoxManage convertfromraw --format VDI [filename].img [filename].vdi

Mount the VDI as a hard disk.

9
  • 2
    Thanks so much! It worked, and a few days before the project was due.
    – Anthony
    Commented Feb 21, 2013 at 11:05
  • 2
    Is this reversible? Commented Sep 2, 2014 at 23:46
  • 4
    @ThorSummoner: Try VBoxManage clonehd --format RAW [filename].vdi [filename].img (syntax help for clonehd here).
    – Karan
    Commented Sep 5, 2014 at 23:58
  • Thanks! Renaming .img to .iso worked in my case, I had SharePoint 2013 Server. Commented Feb 20, 2016 at 10:12
  • 2
    Just a note it will not work if the image file converted is built for a different architecture. For example, you cannot convert a Raspian (ARM) image for use in VirtualBox (x86) using this method.
    – vhs
    Commented Jun 20, 2018 at 11:56
3

Windows 10 can mount .img files as a drive. This drive can then be accessed by a virtual machine.

  1. In Windows Explorer, right click on the .img file, select Mount.
  2. Start the virtual machine
  3. In the Devices menu => Optical Drives => select the Host Drive created in step 1.
3
  • 2
    sometimes it wont , for e.g. i tried to mount an octopi img file in windows 10 and it said the image file is corrupt
    – Gurpreet
    Commented Feb 13, 2020 at 20:31
  • 1
    I'm also experiencing a "corrupted image file" which came from a raspberry pi.
    – GChuf
    Commented Apr 1, 2020 at 16:29
  • 2
    The Rasberry Pi images might be ARM processor based, instead of x86-based. Commented Oct 21, 2021 at 15:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .