How to mount disk image taken in linux and run in virtual box

Select a virtual machine by clicking its name in the VirtualBox window
Click the Machine menu at the top of the VirtualBox window, and click Settings
Click the Storage category in the Settings window
Right-click in the storage tree pane, and click Add Floppy Controller
Right-click the Floppy Controller device, and click Add Floppy Device
Click the Choose Disk button in the prompt window that appears

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

Finally, mount the VDI as a hard disk.


Attaching a raw disk image should be possible by creating a raw vmdk.

In the VirtualBox images directory (like /home//VirtualBox)

VBoxManage internalcommands createrawvmdk -filename rawtest.vmdk -rawdisk /path/to/disk.img

Attaching the virtual disk to a virtual virtual machine should be possible after that. The path /path/to/disk.img can also point to a partition or a loop device.