mount vdi

Andrey V. Elsukov bu7cher at yandex.ru
Mon Jul 25 07:07:11 UTC 2011


On 25.07.2011 10:18, Joe Sciulli wrote:
> Is it possible to mount virtualbox vdi file on the FreeBSD host?  This appears to be doable on
> windows and linux hosts, which basically is done in two steps: 1. find offset in the image. 2.
> mount the image with that offset.
> 
> I'm trying to do the same thing on FreeBSD, and found the undocumented and deprecated command
> still works:
> 
> VBoxManage internalcommands dumphdinfo freebsd_home.vdi
> 
> I got the following for the virtual disk image holding the /home (no root hence no MBR) disk for
> a FreeBSD guest:
> 
> Header: offBlocks=4096 offData=28672
> 
> Then attempt to mount it:
> 
> mdconfig -a -t vnode -f /tmp/freebsd_home_56.vdi -u 0 mount /dev/md0 /tmp/aaa/ mount -t cd9660
> /dev/md0 /tmp/aaa/
> 
> unfortunately both the above two mount commands failed with "Invalid argument".  I tried
> skip=28672 to no avail as well.  Anything did I do wrong?

I have not any Vbox images with fixed size, but i tried this:
# mdconfig -f 10G_GPT_UFS.vdi
# gnop create -v -o 41472 /dev/md0

where 41472 is offData value. After that md0.nop was tasted and reports about invalid GPT.
So, i think if your image is fixed size disk yout can try this method and mount UFS (not cd9660).

-- 
WBR, Andrey V. Elsukov


More information about the freebsd-emulation mailing list