Page 1 of 1

loopback devices based on files in shared folder

Posted: 4. Dec 2013, 22:07
by mannyk
I tried to make a loopback device based on a file in a shared folder. The loopback device
doesn't work, it doesn't provide block device access to more than a bit of the beginning of the file.
Has anyone tried this?

For example, in a shared directory on the guest I tried the following

Code: Select all

truncate -s 1M test1m.img
losetup -f --show test1m.img 
  # /dev/loop0
hexdump -C test1m.img | less 
   # Only shows a line or two before getting to an apparent end. Attempts to use
   # this as a block device have failed for me so far
Is 'losetup' supposed to be supported for files in shared folders?

Guest: linux, debina wheezy. Host OS X.

Re: loopback devices based on files in shared folder

Posted: 6. Dec 2013, 23:09
by noteirak
Shared folders are not proper file implementations. Rather, they are the minimum needed to emulate it. Don't expect any advanced stuff to work with them.

Re: loopback devices based on files in shared folder

Posted: 24. Feb 2016, 22:48
by 8ohmh
Hello,
I've the same problem. So far the current only solution is to copy back the file to your guest, edit it or whatever and copy back to host shared (rsync)

BTW:

Hey Guys (@Oracle), here why don't you put a build environment-VM for building the VirtualBox (look at https://developer.mozilla.org/en-US/doc ... ing_the_VM)