There's a tantalizingly-named ImageMounter/VBoxFUSE, which is probably
not what that implies.
It would be great to be able to access vdi files without having to
waste time and space converting them to raw image files.
_______________________________________________
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulat...@freebsd.org"
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de
>Is there any hope of a utility like mdconfig that would allow mounting a
>vdi file directly?
>
>There's a tantalizingly-named ImageMounter/VBoxFUSE, which is probably
>not what that implies.
>
>It would be great to be able to access vdi files without having to
>waste time and space converting them to raw image files.
-Alex
IMPORTANT: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email.
> Is there any hope of a utility like mdconfig that would allow mounting a
> vdi file directly?
>
> There's a tantalizingly-named ImageMounter/VBoxFUSE, which is probably not
> what that implies.
>
> It would be great to be able to access vdi files without having to waste
> time and space converting them to raw image files.
>
Not that I'm aware of, all tools that do so depend on having a fixed size
image.
You could use a sparse file for the raw format :P I use some other methods
for getting data from VM's to host and other machines. One place I do work
for is a linux shop with a couple Win 2k8 VM's. All disk's are mapped to
LVM's including 2k8's "dedicated" backup drive. The backup drive(lvm) is
then mapped via kpartx and mounted read-only in the host system so tarsnap
archives can be generated against it. I actually don't know how you'd do
this under FreeBSD since I'm not aware of any equivalent functionality to
kpartx under FBSD.
--
Adam Vande More
> On Mon, Jul 5, 2010 at 9:58 PM, Warren Block <wbl...@wonkity.com> wrote:
>
>> Is there any hope of a utility like mdconfig that would allow mounting a
>> vdi file directly?
>>
>> There's a tantalizingly-named ImageMounter/VBoxFUSE, which is probably not
>> what that implies.
>>
>> It would be great to be able to access vdi files without having to waste
>> time and space converting them to raw image files.
>>
>
> Not that I'm aware of, all tools that do so depend on having a fixed size
> image.
>
> You could use a sparse file for the raw format :P I use some other methods
> for getting data from VM's to host and other machines. One place I do work
> for is a linux shop with a couple Win 2k8 VM's. All disk's are mapped to
> LVM's including 2k8's "dedicated" backup drive. The backup drive(lvm) is
> then mapped via kpartx and mounted read-only in the host system so tarsnap
> archives can be generated against it. I actually don't know how you'd do
> this under FreeBSD since I'm not aware of any equivalent functionality to
> kpartx under FBSD.
>
Actually just had another idea if you're using ZFS. Just put the raw image
on it's on FS, and set it compressed. Problem solved ;)
--
Adam Vande More
# truncate -s 2G img
or a preallocated one
# dd if=/dev/zero of=img bs=1m count=2048
, then create a character device for it
# mdconfig -a -t vnode -f img -u 4
, and wrap it with a vmdk container
# VBoxManage internalcommands createrawvmdk -filename
Img.vmdk -rawdisk /dev/md4
After that you may use Img.vmdk as any other disk image in VirtualBox, and
mount /dev/md4* from the host machine. Just remember you'll need to run
mdconfig after reboot, the md* devices are not preserved magically, and
umount /dev/md4* before starting VBox.
That's how i work with -current FreeBSD snapshots - they're cross-compiled and
cross-installed in the host system (which is faster), then run in the VBox.
--
Regards, Mirya
ICQ #313898202
In article <20100706032...@stlux503.dsto.defence.gov.au> you write:
> 0n Mon, Jul 05, 2010 at 08:58:58PM -0600, Warren Block wrote:
>
> >Is there any hope of a utility like mdconfig that would allow mounting a
> >vdi file directly?
> >
> >There's a tantalizingly-named ImageMounter/VBoxFUSE, which is probably
> >not what that implies.
> >
> >It would be great to be able to access vdi files without having to
> >waste time and space converting them to raw image files.
>
>Try: http://libguestfs.org/
Well that looks like major work to port, but there is a much simpler
fusefs tool in debian called vdfuse that I now finally made a port
of. I don't know how stable this is on FreeBSD or if there still
may be bugs, so please give this a good test and post your results
here. Here's a simple example:
# vdfuse -r -f ~nox/.VirtualBox/HardDisks/win7-64.vdi /mnt
# mdconfig -a -f /mnt/Partition2 -o readonly
md0
# mount -o ro -t ntfs /dev/md0 /mnt2
# ls -l /mnt2
...
# umount /mnt2
# mdconfig -d -u 0
# umount /mnt
I was also able to write onto ntfs using sysutils/fusefs-ntfs, tho
I had to apply a fix to sysutils/fusefs-kmod from this PR first to
get rid of a panic:
http://www.freebsd.org/cgi/query-pr.cgi?pr=149674
# vdfuse -a -f ~nox/.VirtualBox/HardDisks/win7-64.vdi /mnt
# mdconfig -a -f /mnt/EntireDisk
# ntfs-3g /dev/md0s2 /mnt2
# ls -l /mnt2
...
Of course only do any of this while the guest is completely shut
down... (That's because at least all the `regular' filesystems
cannot be mounted more than once at a time or you'll get corruption.)
And here is the shar:
http://people.freebsd.org/~nox/tmp/virtualbox-ose-fuse.shar
Happy testing! :)
Juergen
> ...there is a much simpler fusefs tool in debian called vdfuse that I
> now finally made a port of. I don't know how stable this is on
> FreeBSD or if there still may be bugs, so please give this a good test
> and post your results here. Here's a simple example:
>
> # vdfuse -r -f ~nox/.VirtualBox/HardDisks/win7-64.vdi /mnt
> # mdconfig -a -f /mnt/Partition2 -o readonly
> md0
> # mount -o ro -t ntfs /dev/md0 /mnt2
> # ls -l /mnt2
> ...
> # umount /mnt2
> # mdconfig -d -u 0
> # umount /mnt
It works for a .vdi of a UFS drive. The BSD partitions show up on the
md0 device (md0a, etc). Just a trivial test, but looks promising!
Ok that sounds promising... Someone want to do more tests or should I
just commit the port? :)
Thanx,
> On Mon, 13 Sep 2010, Juergen Lock wrote:
>>>
>>> Dumping the partitions of that FreeBSD system worked just now. Not what
>>> I'd call a thorough test, but it did read everything in the filesystem
>>> without problems.
>>
>> Ok that sounds promising... Someone want to do more tests or should I
>> just commit the port? :)
>
> Testing writes has not been as successful. fdisk and bsdlabel work fine, as
> does writing individual files. But trying to restore onto a vdfuse/mdconfig
> partition just goes away. The machine is idle, restore waits in wdrain, and
> further access to that device does not respond. I think I saw fuse in a
> fuse_msg state, but can't verify that now.
Further information: copying a single file onto the mounted filesystem
works. More than one, with restore or just cp, and vdfuse and the
copying process go to wdrain forever.
Testing writes has not been as successful. fdisk and bsdlabel work
fine, as does writing individual files. But trying to restore onto a
vdfuse/mdconfig partition just goes away. The machine is idle, restore
waits in wdrain, and further access to that device does not respond. I
think I saw fuse in a fuse_msg state, but can't verify that now.
That was all before applying the fusefs-kmod patch; now other processes
also stop responding.
In any case, I'd rather have a port that is not 100% than no port at
all. Announcing possible problems in the pkg-message would be
appropriate.
Hm ok... Which FreeBSD version was this btw?
Thanx, :)
Juergen
> I'm in the process of rebuilding my system ATM (kernel, world, and
> ports), but I will test further when I'm back up again...
Ok that should be interesting then.
Thanx, :)
> On Tue, Sep 14, 2010 at 01:21:26PM -0600, Warren Block wrote:
>> On Tue, 14 Sep 2010, Warren Block wrote:
>>
>>> On Mon, 13 Sep 2010, Juergen Lock wrote:
>>>>>
>>>>> Dumping the partitions of that FreeBSD system worked just now. Not what
>>>>> I'd call a thorough test, but it did read everything in the filesystem
>>>>> without problems.
>>>>
>>>> Ok that sounds promising... Someone want to do more tests or should I
>>>> just commit the port? :)
>>>
>>> Testing writes has not been as successful. fdisk and bsdlabel work fine, as
>>> does writing individual files. But trying to restore onto a vdfuse/mdconfig
>>> partition just goes away. The machine is idle, restore waits in wdrain, and
>>> further access to that device does not respond. I think I saw fuse in a
>>> fuse_msg state, but can't verify that now.
>>
>> Further information: copying a single file onto the mounted filesystem
>> works. More than one, with restore or just cp, and vdfuse and the
>> copying process go to wdrain forever.
>
> Hm ok... Which FreeBSD version was this btw?
8.1-stable as of Monday, 32-bit i386.
During my first (and only) testing session, I wasn't able to mount the
md(4) device after I created it. Further, after a few attempts each
time, vdfuse would segfault.
Image was form Windows XP 32-bit (1 Partition, NTFS).
I'm in the process of rebuilding my system ATM (kernel, world, and
ports), but I will test further when I'm back up again...
-Brandon
Well if we can establish that readonly works consistently at least
for `some' versions of FreeBSD then that might be an option.
Thanx,
Juergen