Map raw image file to VirtualBox

In the attempt to restore data off a failing hard drive I use ddrescue to make raw copy of a hard disk. But I wanted to attempt to boot the system in a virtual box for a more simple data recovery. Because the VirtualBox GUI does not have the ability to make raw device mapping you must do it by VBoxManage command. I just open up a terminal, cd into my VirtualBox storage folder and run:

VBoxManage internalcommands createrawvmdk -filename my_raw_mapping.vmdk -rawdisk /path/to/backup.img

Now map the newly created vdmk file to your VM and off you go.

Leave a Reply