Raw disk image file

This is for discussing general topics about how to use VirtualBox.
Post Reply
Kitter
Posts: 1
Joined: 15. Feb 2012, 20:44

Raw disk image file

Post by Kitter »

Hello all,
I've got 1:1 hard disk copy (~40GB) in a file. I want to use this raw disk image as a hard disk for a VirtualBox guest. Is it possible ?

I went through VBoxManage commands like convert(from/to)raw, createrawdisc, storageattach, but no success - the first one attempts to recreate entire 40GB file, that is not suitable for me. When i want to use my physical disk however, it works. I even found this (google it please, i can't post URLs)

Code: Select all

raw2vmdk-mount-raw-hard-disk-dd-images-as-vmdk-virtual-disks
and it would be a solution for me, but it is not working in VirtualBox as the resulting file throws an error like 'Strange format' - VERR_NOT_SUPPORTED.

My OS is Windows XP 32bit, VBox version 4.1.8
I think that this all works in Linux, but i cannot use Linux...
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Re: Raw disk image file

Post by stefan.becker »

Torrentware? If yes, forget it. We dont support this.
Duhhh
Posts: 28
Joined: 18. Feb 2010, 04:51
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 7, Windows Vista

Re: Raw disk image file

Post by Duhhh »

I just did this - I took a HD (okay, it was a USB stick) and dumped it to a raw file, then used VBoxManage convertfromraw to make a VDI image of it. Since the default is a dynamically-allocated disk, I got a VDI that was considerably smaller than the raw image. Did you remember to zero unused sectors before you started?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Raw disk image file

Post by mpack »

On Windows hosts, CloneVDI with "compact" option enabled would be the easiest way to convert a raw image (see CloneVDI sticky in "Windows Hosts" forum). Ditto on Linux and Mac hosts, however Wine would be needed to run it there.
Post Reply