vboximg-mount unable to load fuse lib

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Giba
Posts: 9
Joined: 25. Sep 2019, 09:23

vboximg-mount unable to load fuse lib

Post by Giba »

Which is MacOS minimal required version for vobximg-mount to work?
For 10.12.latest running vboximg-mount as non-root user results in error "failed to load fuse library, rc=VERR_FILE_NO_FOUND".
Fuse was downloaded from FUSE project download web, latest available version is installed.
No related bug was found in ticket db.
paulmc
Posts: 72
Joined: 28. Aug 2019, 18:43
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Mac OS X, Linux, Windows
Location: Earth (Guyana / USA / South Africa)
Contact:

Re: vboximg-mount unable to load fuse lib

Post by paulmc »

@Giba, in terms of OSXFUSE and all its later renamed editions, even the most recent versions of macFUSE 4.x are stated to be compatible with OS X 10.9 'Mavericks' & later, per the Archived release notes; and, even more accommodating, the older FUSE for OS X / FUSE for macOS 3.x editions are compatible with Mac OS X 10.5 'Leopard' & later. So, that shouldn't be an issue on a macOS 10.12 'Sierra' system.

However, to support the vboximg-mount tool, the VirtualBox 6 Mac installer usually also installs OSXFUSE {i.e., unless you uncheck the 'FUSE for macOS core package' option in the installer, via the third screen's 'Customise' button at lower left}. I.e., this FUSE Mounting functionality has officially expanded beyond its Linux-host roots. :-) It also seems that the OSXFUSE components now install directly into '/Library/…' and '/usr/local/…'.

Indeed, I'd actually forgotten about that recently! I've long had my own installation of initially MacFUSE {big 'M' (legacy)} and later OSXFUSE / FUSE for OS X / FUSE for macOS / macFUSE {little 'm' (latest renaming)}, and at first was puzzled the other day when I noticed that, in my '/Library/Frameworks' folder, alongside the current macFUSE framework, an older OSXFUSE framework had rather mysteriously re-appeared … Then, I belatedly remembered that it's probably related to VirtualBox 6 installations.

If you [re-]installed macFUSE after installing VirtualBox, then macFUSE could well have removed all traces of the older OSXFUSE files, including its framework in '/Library/Frameworks', and all its other supporting files in '/Library/Filesystems', '/usr/local/include' & '/usr/local/lib'. {IIRC, that's what had happened when I upgraded to macFUSE 4.} If so, and VirtualBox seemingly isn't recognising the newer macFUSE, then you should just need to re-run the VirtualBox 6 installer to get back the older OSXFUSE.

Oh, and just as a reminder, I've found that mounting a VirtualBox virtual disk image-file under macOS is somewhat different than described in the User Manual, § '5.11. vboximg-mount: A Utility for FUSE Mounting a Virtual Disk Image'. For instance, I don't often mount my virtual disk image-files in this manner, but I just ran a quick test from my notes and was able to mount a '.vdi' file from one of my macOS guest VMs, as read-only {by default, since I haven't had luck so far with any read-write option(s)}:
  1. Make an empty folder to serve as a mount-point for the 'intermediate' FUSE mount.
  2. In a Terminal shell, run the vboximg-mount command as usual, to FUSE-mount the '.vdi' file into that mount-point folder, whose name then changes in the UI to something like 'OSXFUSE Volume 0 (vboximg-mount)', and in which would then appear a 'vhdd' raw device file {there may also be 'volV' files denoting individual partitions, and/or other files depending on your specified options, but I've never used those}:
      vboximg-mount --image <absolute_path_to_(or_UUID_of)_vdi_file> <FUSE_mount_path>
  3. Although the User Manual then suggests to use the mount tool with that 'vhdd' raw device file, the macOS edition of the mount tool would likely complain that the raw device file isn't a block device. [Edited To Add (ETA): To support using raw device files as 'loop devices' or 'virtual node devices', macOS typically doesn't use a Linux-style mount option but rather treats them as just a special raw type of disk image, and thus accessible via the DiskImages framework / hdiutil tool {per the Wikipedia article 'Loop device'}.] If so, then for an alternative method, please refer to [ETA: that Wikipedia article or] the Ask Different (Apple Stack Exchange) article 'How to mount raw disk images?', i.e.:
    1. Use the hdiutil tool with special arguments — but for simplicity omitting the articles' mentioned 'nomount' option — to first "attach" that raw file as a new block device {'/dev/diskD', the final group in a 'diskutil list' output}, and then also automatically mount any mountable partitions {usually just the HFS+ partition, not the EFI or Recovery ones}:
        hdiutil attach -imagekey diskimage-class=CRawDiskImage <FUSE_mount_path>/vhdd
    2. OTOH, if you had followed the article exactly and specified the 'nomount' option in the hdiutil command, then use the diskutil tool to mount just the HFS+ partition slice {typically, the S is 2, but you can verify that by listing the partitions with a 'diskutil list /dev/diskD' command}:
        diskutil mount /dev/diskDsS
Good luck!
Last edited by paulmc on 23. Feb 2021, 01:48, edited 2 times in total.
paulmc
Posts: 72
Joined: 28. Aug 2019, 18:43
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Mac OS X, Linux, Windows
Location: Earth (Guyana / USA / South Africa)
Contact:

Re: vboximg-mount unable to load fuse lib

Post by paulmc »

Just to add that, while searching for some further clues online, I came across a recent related bug report: Ticket #19963 'vboximg-mount: error: Failed to load the fuse library, rc=VERR_FILE_NOT_FOUND'. I've taken the liberty of posting a comment there, and a link back to this discussion.
Giba
Posts: 9
Joined: 25. Sep 2019, 09:23

Re: vboximg-mount unable to load fuse lib

Post by Giba »

Thanks for done job and provided instructions.

On my side unfortunately no opportunity nor need to continue my use of feature since my last activity here till few hours ago.
I tried your hints.
Before that VirtualBox has been upgraded to 6.1.30 inclusively installation of V-Box built-in OSXFUSE - this was made today.
Somewhen sommer this year I remember I tried as best as possible to remove FUSE from machine - just to get rid of its reminiscences.
macOS version didn't change in meantime, still 10.12.

Form below results take today
cmptr-stork:ubuntuvm userM$ vboximg-mount --image <UUID> fuse-mount
cmptr-stork:ubuntuvm userM$ hdiutil attach -imagekey diskimage-class=CRawDiskImage fuse-mount/vhdd
hdiutil: attach failed - no mountable file systems
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$ hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount fuse-mount/vhdd
/dev/disk2 GUID_partition_scheme
/dev/disk2s1 Linux Filesystem
/dev/disk2s2 Linux Filesystem
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$ diskutil mount /dev/disk2s1
Volume on disk2s1 failed to mount
If the volume is damaged, try the "readOnly" option
If the volume is an APFS Volume, try the "diskutil apfs unlockVolume" verb
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$
cmptr-stork:ubuntuvm userM$ diskutil mount readOnly /dev/disk2s1
Volume on disk2s1 failed to mount
If the volume is damaged, try the "readOnly" option
If the volume is an APFS Volume, try the "diskutil apfs unlockVolume" verb
cmptr-stork:ubuntuvm userM$
Post Reply