The VirtualBox documentation is rather confusing regarding this issue. It would really help if they would accompany an exact example. This is from page 62 of the user manual regarding shared folders:
The command is as follows:
[i]VBoxManage sharedfolder add "VM name" -name "sharename"
-hostpath "C:\test"[/i]
Here's what I did. First, instead of following the directions for the command prompt, I opened VirtalBox, clicked on a Fedora 9 VM, clicked "Shared Folders", clicked "Add a new shared folder", entered the path on my host OS of the shared folder I created, and clicked "Ok". My shared folder is located at /home/a34lkj2348dsf311/Desktop/shared_folder. Now I have to tell the VM where the shared folder is and where to mount it. So, page 62 continues:
In a Linux guest, use the following command:
*mount -t vboxsf [-o OPTIONS] sharename mountpoint*
So I created a directory in my Fedora VM. It's in /root/Desktop/fedora_share. Here's what I entered and the associative output:
[i][root@localhost Desktop]# mount -t vboxsf /home/a34lkj2348dsf311/Desktop/shared_folder fedora_share/
/sbin/mount.vboxsf: mounting failed with the error: Protocol error
[root@localhost Desktop]#[/i]
It's difficult for me to pinpoint the problem because if I want to do it via the command line on the host o/s I get the following output:
a34lkj2348dsf311@a34lkj2348dsf311-desktop:~$ sudo VBoxManage sharedfolder remove Fedora -name ~/Desktop/shared_folder/
[sudo] password for a34lkj2348dsf311:
VirtualBox Command Line Management Interface Version 2.0.6
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.
[!] FAILED calling aVirtualBox->FindMachine(Bstr(argv[1]), machine.asOutParam()) at line 7455!
[!] Primary RC = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value
[!] Full error info present: true , basic error info present: true
[!] Result Code = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value
[!] Text = Could not find a registered machine named 'Fedora'
[!] Component = VirtualBox, Interface: IVirtualBox, {557a07bc-e6ae-4520-a361-4a8493199137}
[!] Callee = IVirtualBox, {557a07bc-e6ae-4520-a361-4a8493199137}
a34lkj2348dsf311@a34lkj2348dsf311-desktop:~$
I tried it as the regular user and I also tried it as sudo. I tried changing the path of shared_folder in the Fedora VM just to see if it would return a different error, but got the same thing. So now, I don't even know if the VM is reading the path properly, much less this protocol error.
What am I doing wrong?