7

When I try to mount my shared folder on my Ubuntu virtual machine, I get this error:

/sbin/mount.vboxsf: shared folder '/home/john/shared' was not found (check VM settings / spelling)
  1. I have installed these packages:

    sudo apt-get install -y build-essential linux-headers-`uname -r`
    
  2. I have successfully installed Guest Auditions.

  3. I have created a mount point for the shared folder on the virtual machine:

    mountpoint

  4. I have set sharing on VM settings:

    sharing settings on VirtualBox

  5. I am trying to mount it using the command:

    sudo mount -t vboxsf shared ~/shared
    

The host computer runs Windows 10, the Ubuntu version is 20.04.1 LTS and the VirtualBox version is 6.1.

Am I missing something?

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
John Ronald
  • 1,476
  • 2
  • 14
  • 29
  • 3
    Does this answer your question? [How to access a shared folder in VirtualBox?](https://askubuntu.com/questions/161759/how-to-access-a-shared-folder-in-virtualbox) – N0rbert Jul 30 '21 at 19:02
  • 1
    It does not directly answer it, but thanks to it I found out, that name of the shared folder set in virtualbox settings cannot be the same as the name of directory you want to mount it into. In my case "shared" "shared". So after I renamed my directory to /home/john/shared_folder it started to work. – John Ronald Jul 31 '21 at 06:54
  • Thanks guys, I didn't realize that we are not supposed to name the two shared folders by the same name! Your comments did help resolve my issue. – Kris Stern Aug 06 '21 at 04:36

1 Answers1

10

Eventually I found out, that a shared folder on Ubuntu cannot have the same name as the one I set in VirtualBox settings (steps 3 and 4 in my question).

So, instead of creating directory called shared on Ubuntu, I created directory called shared_folder. It works now.

So now, it looks like this:

share settings on VirtualBox

renamed shared directory

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
John Ronald
  • 1,476
  • 2
  • 14
  • 29
  • 1
    Thanks! I would have never guessed it... Why in the world can't they have the same name? – mitchus Sep 17 '21 at 13:18
  • I also note that you can have the same if: 1, you use the Auto mount option, or 2, you use the cli mount. e.g.: mount -t vboxsf data /data – scottlimmer May 22 '23 at 00:23