mounting an ubuntu 14.04 bhyve image as a filesystem for editing

Lars Engels lars.engels at 0x20.net
Sun Nov 13 09:55:47 UTC 2016


On Fri, Nov 11, 2016 at 04:09:09PM +0000, Gary Palmer wrote:
> On Fri, Nov 11, 2016 at 03:30:59PM +0000, tech-lists wrote:
> > On 10/11/2016 15:26, Lars Engels wrote:
> > > On Thu, Nov 10, 2016 at 12:32:07PM +0000, tech-lists wrote:
> > >> Hello list,
> > >>
> > >> [originally sent to virtualization@ but got no replies, probably
> > >> because, thinking about it, the fact that it's a bhyve image is incidental]
> > >>
> > >> [snipped stuff about bhyve]
> > >>
> > >> Is there a way of taking an ubuntu VM image that normally runs as a
> > >> bhyve guest, mounting it on some mountpoint on the freebsd host and
> > >> directly editing the files within it?
> > >>
> > >> Alternatively, is there a way of making grub boot the image into
> > >> single-user-mode like one can with freebsd?
> > >>
> > >
> > > That should work (provided sysutils/fusefs-ext4fuse is installed):
> > >
> > > # mdconfig -t vnode -f $ubuntu_img
> > > # ext4fuse /dev/md0 /mnt
> > >
> > 
> > Hi, thanks for looking at this.
> > 
> > Unfortunately it didn't work:
> > 
> > root at host0:/vms/138# mdconfig -t vnode -f ubuntu138.img
> > md2
> > 
> > root at host0:/vms/138# ext4fuse /dev/md2 /mnt
> > Partition doesn't contain EXT4 filesystem
> > 
> > root at host0:/vms/138# ls -la /dev/md2*
> > crw-r-----  1 root  operator  0xb0 Nov 11 14:58 /dev/md2
> > crw-r-----  1 root  operator  0xb4 Nov 11 15:06 /dev/md2s1
> > crw-r-----  1 root  operator  0xb5 Nov 11 15:06 /dev/md2s2
> > crw-r-----  1 root  operator  0xb6 Nov 11 15:06 /dev/md2s5
> > 
> > root at host0:/vms/138# ext4fuse /dev/md2s1 /mnt
> > fuse: failed to open fuse device: No such file or directory
> 
> 
> That is a different error than the others.  I somewhat suspect
> that there is an ext partition on md2s1 but something else
> prevented the mount from proceeding.  Is there anything in
> dmesg or /var/log/messages?
> 
> Do you have a /dev/fuse?

You need to load the fuse kernel module first

# kldload fuse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 603 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20161113/88b6c28b/attachment.sig>


More information about the freebsd-fs mailing list