LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Virtualbox could not map shared folder from CentOS host (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/virtualbox-could-not-map-shared-folder-from-centos-host-816564/)

sokha 06-26-2010 08:20 PM

Virtualbox could not map shared folder from CentOS host
 
I have Virtualbox installed in CentOS 5.5 and an Ubuntu as Guest OS. I am having a problem of sharing host folder to guest.

I have done these already:
1. (HOST): VBoxManage sharedfolder add "ubuntu_vpn" -name "media" -hostpath "/home/username/media"
2. (GUEST): VBoxLinuxAdditions is already installed in Guest OS successfully
3. Reboot Guest OS
4. I try to use both commands:
Code:

sudo mount -t vboxsf media /home/username/shared
and
Code:

sudo mount.vboxsf media /home/username/shared
Those two commands give the same error:
Code:

mounting failed with the error: Protocol error
Any solution?

mzsade 06-27-2010 01:00 AM

https://help.ubuntu.com/community/Vi.../SharedFolders

sokha 06-27-2010 02:07 AM

Quote:

Originally Posted by mzsade (Post 4016065)

I followed that but got the same error message as shown in troubleshooting.

mzsade 06-27-2010 03:17 AM

If you have already added your username to the vboxusers group, via "sudo adduser <yourusername> vboxusers", then i am lost. Very sorry to have removed your question from the zero replies list without resolving it.

sokha 06-28-2010 12:09 AM

Quote:

Originally Posted by mzsade (Post 4016133)
If you have already added your username to the vboxusers group, via "sudo adduser <yourusername> vboxusers", then i am lost. Very sorry to have removed your question from the zero replies list without resolving it.

Yes, the username I am running those command is already in vboxusers
Code:

/usr/sbin/usermod -a -G vboxusers username

mzsade 06-28-2010 03:03 AM

Again i apologize, i suggest you go directly to the source, virtualbox.org, register and login, then register with their forum and post the question there. One of my tricky issues,(nothing similar was resolved there). All the better if someone else here is able to solve it here.

sokha 06-28-2010 04:37 AM

Quote:

Originally Posted by mzsade (Post 4016934)
Again i apologize, i suggest you go directly to the source, virtualbox.org, register and login, then register with their forum and post the question there. One of my tricky issues,(nothing similar was resolved there). All the better if someone else here is able to solve it here.

Thanks anyway, I just registered and post the problem there.

rsciw 06-29-2010 05:00 AM

I came across this too at some point, when I set up shared directories on a CentOS guest with Ubuntu host.

added this to the /etc/rc.local in the guest and don't have a problem since:

Code:

mount.vboxsf -o uid=500 -o gid=500 <sharename> <sharedirectory>
where uid and gid are the IDs of the user who owns the share on the guest.

did you also run
Code:

/etc/init.d/vboxdrv setup
on the host?

iirc that was necessary too

douglasawh 07-13-2010 02:41 PM

Quote:

Originally Posted by rsciw (Post 4018031)
I came across this too at some point, when I set up shared directories on a CentOS guest with Ubuntu host.

added this to the /etc/rc.local in the guest and don't have a problem since:

Code:

mount.vboxsf -o uid=500 -o gid=500 <sharename> <sharedirectory>
where uid and gid are the IDs of the user who owns the share on the guest.

did you also run
Code:

/etc/init.d/vboxdrv setup
on the host?

iirc that was necessary too

Did that. Fedora host and Ubuntu guest. Any other suggestions?


All times are GMT -5. The time now is 09:28 AM.