Can't mount share in VirtualBox guest

1

I'm attempting to mount a share in a guest OS in VirtualBox:

$ mount -t vboxsf share /mnt/share
/sbin/mount.vboxsf: mounting failed with the error: No such device

If I click the folder icon in the corner, and click "Shared Folders Settings...", I see: "share" "/Users/me/tmp/vm-transfer" "" "Full", and if I double click the row:

Folder Path: /Users/me/tmp/vm-transfer

Folder Name: share

(unchecked) Read-only

(unchecked) Auto-mount

(unchecked) Make Permanent

The guest has the guest extensions installed:

$ lsmod
Module         Size  Used by
vboxvideo      1838  1
vboxguest    163929  1

Thanatos

Posted 2014-03-05T22:32:28.737

Reputation: 1 924

Answers

2

Try modprobe vboxsf before trying to mount the share.

user287782

Posted 2014-03-05T22:32:28.737

Reputation: 211

1

I'm leaving the very useful answer from @user287782 marked as the accepted answer, because it's the root of the problem. In my case, I'm using Gentoo, and on Gentoo, the "VirtualBox guest additions" install themselves as an init.d script, so they can be started with:

/etc/init.d/virtualbox-guest-additions start

Or better,

eselect rc start virtualbox-guest-additions

To make this happen automatically,

eselect rc add virtualbox-guest-additions default

Thanatos

Posted 2014-03-05T22:32:28.737

Reputation: 1 924

0

Make sure your user has administrative permission or it's in vboxsf group:

sudo usermod -g vboxsf user

or mount it with root permission by prefixing your command with sudo.

Also consider installing VBox Guest Additions for share folder support and VirtualBox Oracle VM VirtualBox Extension Pack for extra support for certain devices.

See also: Shared folder in VirtualBox.

kenorb

Posted 2014-03-05T22:32:28.737

Reputation: 16 795