0

I'm running Ubuntu 14.04 on VirtualBox 5.0.24 r108355.

I mount my folder with command:

mkdir my_folder
sudo mount -t vboxsf my_folder /home/user/my_folder

In VirtualBox settings (Devices->Shared fodlers->Shared folders settings) I have Auto-mount and Make Permanent folders checked.

When I close and reopen my VM shared folder is not mounted and I need to perform sudo mount -t vboxsf my_folder /home/user/my_folder once more time.

So how to make shared folder mounting permanent?

6
  • Do you have the VBox Guest Additions installed?
    – Seth
    Jan 11, 2017 at 13:47
  • 1
    @Seth I think yes, how to check it? When I setup VM I have used sudo apt-get install virtualbox-guest-additions-iso virtualbox-guest-dkms virtualbox-guest-utils.
    – mrgloom
    Jan 11, 2017 at 16:15
  • What version of VirutalBox are you running? You might've installed "old" Utilities. See also this help article.
    – Seth
    Jan 12, 2017 at 6:37
  • @Seth As I said VirtualBox 5.0.24 r108355
    – mrgloom
    Jan 12, 2017 at 9:09
  • Sorry, missed that. Anyway did you try to install current vbox additions instead of the one from the Repo? This would be an official Wiki entry on how to do it (last part). Going by this it would seem the version you installed is for VBox 4.3.36(?).
    – Seth
    Jan 12, 2017 at 9:48

1 Answer 1

1

Shared folder auto mounting chooses an "auto" mount point; it will not miraculously use some particular mount point you yourself used at some particular moment.

The VirtualBox Guest Additions auto mount point for Linux is composed of a prefix, /media/sf_ by default, prepended to the name under which you share the folder in VirtualBox. You can change the prefix to /home/user/ with a VboxManage command:

 VBoxManage guestproperty set <vm> /VirtualBox/GuestAdd/SharedFolders/MountPrefix /home/user/

where is the name or UUID of your virtual machine. Because a virtual machine only has a single such prefix, it would apply to all auto-mounted shared folders of that virtual machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .