Setting up Shared Folders in Ubuntu on Windows Host
Setting up Shared Folders in Ubuntu on Windows Host
I am trying to setup a Shared Folder in an Ubuntu guest running on a Windows Vista host. I have already done this setup on a Windows XP guest without any problems, but I am new to Ubuntu and Linux and am having problems.
In VirtualBox I am using the shared details that I already created for the Windows XP guest which is also showing in VBox Settings as a Shared Folder for Ubuntu ie Machine Folders:
Name: Documents, Path: D:Documents and Access Full
In Ubuntu when I go into Places, Connect to Server I have changed the Server Type to Windows Share and then completed the other boxes as follows:
Server - vboxsvr
optional info:
Share - Documents
Folder - d:Documents
User Name - Rob
Domain Name -WORKGROUP
On the next screen I am asked "Password required for share documents on vboxsvr"
Password - Here I have tried both no password (there is no passowrk on the docuemnts folder) and the startup password for Vista then click on Connect
After a few seconds I then get the message " Can't display location "Smb://vboxsvr/documents/d:Documents" Failed to mount windows share"
Can someone please let me know what I am doing incorrectly.
Many thanks
In VirtualBox I am using the shared details that I already created for the Windows XP guest which is also showing in VBox Settings as a Shared Folder for Ubuntu ie Machine Folders:
Name: Documents, Path: D:Documents and Access Full
In Ubuntu when I go into Places, Connect to Server I have changed the Server Type to Windows Share and then completed the other boxes as follows:
Server - vboxsvr
optional info:
Share - Documents
Folder - d:Documents
User Name - Rob
Domain Name -WORKGROUP
On the next screen I am asked "Password required for share documents on vboxsvr"
Password - Here I have tried both no password (there is no passowrk on the docuemnts folder) and the startup password for Vista then click on Connect
After a few seconds I then get the message " Can't display location "Smb://vboxsvr/documents/d:Documents" Failed to mount windows share"
Can someone please let me know what I am doing incorrectly.
Many thanks
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
See the Forum FAQ and the user guide. The correct way to mount a Shared folder in Linux is to use the mount command with the filesystem type vboxsf.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
Thanks Terry, but I can't get that far. When I try to run the VBoxManage sharedfolder add "VM Name" (I am using Ubuntu) -name "sharename" I am using Documents) -hostpath (I am using D:Documents). I am wondering if the server //vboxsvr/ should be entered somewhere?TerryE wrote:See the Forum FAQ and the user guide. The correct way to mount a Shared folder in Linux is to use the mount command with the filesystem type vboxsf.
I get:
"The character device /dev/vboxdrv does not exist.
Please install virtualbox-ose-modules package for your kernel."
By running uname -a I get Linux rob-desktop 2.6.24-22-generic
However the latest package listed in Synaptic is 2..6.24-21-generic
Also when I run sudo /etc/apt/vboxdrv with the option status
I get "no suitable kernel for running kernel found"
and if I try the option start
I get "No suitable module found"
I found a Message where it said to insert a line into the file etc/apt/sources.list which reads
deb http://virtualbox.org/virtualbox/debian hardy non-free
However I am still having no success trying to find my kernel version in Synaptic. It just appears to be ignoring this insert. Am I leaving out something or is there some other way to connect to the
deb http://virtualbox.org/virtualbox/debian hardy non-free?
site possibly using a command line?
Can you or someone please assist me?
Cheers
Rob
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
Rob,
Yes, you can use the VBoxManage sharedfolder add command but if you do then always use a full path specification. The alternative method is to start the VM through the GUI and use the GUI Devices menu option to select the shared folder dialogue box.
Forget //vboxsvr/. You just don't use this syntax.
The reason that "the character device /dev/vboxdrv does not exist..." error occurs is the that Ubuntu has upgraded your kernel and the GA need to be relinked / reinstalled when you do this because its drivers hook into the kernel.
You also need to decide which version you are going to use: PUEL or OSE. In general if you are using the PUEL version (which you almost certainly are if you have a Windows host) then you should use the PUEL GA. Your error message implies that you have the OSE GA for the 2.6.24-21-generic kernel install. You need to use Synaptic to search for virtualbox-ose and remove these packages. You then need to install the PUEL GA from the host as discussed in the user guide and Forum FAQ. (Basically the host connects a GA ISO, which you then mount and execute a run file on it.)
Do not use apt for the GA on the guest.
Yes, you can use the VBoxManage sharedfolder add command but if you do then always use a full path specification. The alternative method is to start the VM through the GUI and use the GUI Devices menu option to select the shared folder dialogue box.
Forget //vboxsvr/. You just don't use this syntax.
The reason that "the character device /dev/vboxdrv does not exist..." error occurs is the that Ubuntu has upgraded your kernel and the GA need to be relinked / reinstalled when you do this because its drivers hook into the kernel.
You also need to decide which version you are going to use: PUEL or OSE. In general if you are using the PUEL version (which you almost certainly are if you have a Windows host) then you should use the PUEL GA. Your error message implies that you have the OSE GA for the 2.6.24-21-generic kernel install. You need to use Synaptic to search for virtualbox-ose and remove these packages. You then need to install the PUEL GA from the host as discussed in the user guide and Forum FAQ. (Basically the host connects a GA ISO, which you then mount and execute a run file on it.)
Do not use apt for the GA on the guest.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
Hi Terry
I uninstalled the virtualbox-ose-modules files as you said and I have downloaded and installed VBox 2.1.0 PUEL edition and reinstalled the 2.1.0 GA but the kernel is still showing 2.6.24-22. Is this correct?
I am now confused - VirtualBox, Settings is showing shared folder as Documents D:\Documents which is correct as far as Windows is concerned. Should I change this shared folder name to share to save confusion with the D:\Documents directory?
I have created a folder named share on my Desktop and am using the following command to mount it:
mount -t vboxsf share /home/rob/Desktop/share
but I receive the follwing error:
/sbin/mount.vboxsf: mounting failed with the error not such file or directory. Could this be because share should be called Documents?
Also, could it be because I am leaving out the following command:
VboxManage sharedfolder add Ubuntu (the VM name) -name share -hostpath D:\Documents ,as I am still getting the error "The character device /dev/vboxdrv does not exist" .. install the Virtualbox-ose-modules.
Can you please help?
Rob
I uninstalled the virtualbox-ose-modules files as you said and I have downloaded and installed VBox 2.1.0 PUEL edition and reinstalled the 2.1.0 GA but the kernel is still showing 2.6.24-22. Is this correct?
I am now confused - VirtualBox, Settings is showing shared folder as Documents D:\Documents which is correct as far as Windows is concerned. Should I change this shared folder name to share to save confusion with the D:\Documents directory?
I have created a folder named share on my Desktop and am using the following command to mount it:
mount -t vboxsf share /home/rob/Desktop/share
but I receive the follwing error:
/sbin/mount.vboxsf: mounting failed with the error not such file or directory. Could this be because share should be called Documents?
Also, could it be because I am leaving out the following command:
VboxManage sharedfolder add Ubuntu (the VM name) -name share -hostpath D:\Documents ,as I am still getting the error "The character device /dev/vboxdrv does not exist" .. install the Virtualbox-ose-modules.
Can you please help?
Rob
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Where are you running this command? It looks like you run this from the Guest, which is not what you need to do, as Windows is your Host. Create a proper share in the VB GUI. For simplicity, lets make a test folder, D:\test. Now, add this folder to the shared folder list and call it 'test'. Make sure that you enter the exact folder location, so either browse, or enter 'D:\test\'. That trailing \ is needed.VboxManage sharedfolder add Ubuntu (the VM name) -name share -hostpath D:\Documents ,as I am still getting the error "The character device /dev/vboxdrv does not exist" .. install the Virtualbox-ose-modules.
Now in the Guest, do a 'sudo mount -t vboxsf test /home/rob/Desktop/share', enter your password and see how that goes. If it works, you did something wrong with the other share.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
I can get Test to work - having no trailing \ seemed to be causing the problem.
Changing the original shared Documents, D:\Documents\ and running the mount -t command I still get an error which is:
/sbin/mount.vboxsf: mounting failed with the error: Protocol error.
I think this has something to do with both the Host and Guest systems having a folder by the same name. so I created another folder in Windows called D:\Documents\Shared with a name of Shared and now the mount command works.
After mounting the Windows Shared folder I was able to see all the files in it on Ubuntu and vica versa.
Many thanks for your assistance and patience.
Changing the original shared Documents, D:\Documents\ and running the mount -t command I still get an error which is:
/sbin/mount.vboxsf: mounting failed with the error: Protocol error.
I think this has something to do with both the Host and Guest systems having a folder by the same name. so I created another folder in Windows called D:\Documents\Shared with a name of Shared and now the mount command works.
After mounting the Windows Shared folder I was able to see all the files in it on Ubuntu and vica versa.
Many thanks for your assistance and patience.
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
You don't state which version you are running. There was a version (or more) where it would give this error if you would share your My Documents folder, your entire profile or Home folder. Sharing a subfolder, or it's parent wasn't a problem.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
I am running VBox 2.1.0-41146 PUEL on a Vista x64 host. It works sharing a subfolder, so I will leave it at that.Sasquatch wrote:You don't state which version you are running. There was a version (or more) where it would give this error if you would share your My Documents folder, your entire profile or Home folder. Sharing a subfolder, or it's parent wasn't a problem.
1.First of all share a folder of the host operating system using the virtual box interface with a suitable sharename.
2. Open up a terminal
3. Create a directory wherever you want the shared folder and with whatever name you want using the mkdir command
4. Now use this command :
mount -t vboxsf sharename mountpoint
where sharename is the name you used for the folder in the virtual box interface and mountpoint is the location you want the folder to be shared( the directory which you created in the previous step).
http://smsoftdev-tutorials.blogspot.com/
2. Open up a terminal
3. Create a directory wherever you want the shared folder and with whatever name you want using the mkdir command
4. Now use this command :
mount -t vboxsf sharename mountpoint
where sharename is the name you used for the folder in the virtual box interface and mountpoint is the location you want the folder to be shared( the directory which you created in the previous step).
http://smsoftdev-tutorials.blogspot.com/
I'm running VirtualBox 2.10 and this mount process no longer works for me. It used to but no longer does. I get a "no such device exists" error (if memory serves). The only thing that I've changed is to add another guest O/S (the new one is Windows Server 2003 R2); the original one is Xubuntu 8.10.smsoft wrote:1.First of all share a folder of the host operating system using the virtual box interface with a suitable sharename.
2. Open up a terminal
3. Create a directory wherever you want the shared folder and with whatever name you want using the mkdir command
4. Now use this command :
mount -t vboxsf sharename mountpoint
where sharename is the name you used for the folder in the virtual box interface and mountpoint is the location you want the folder to be shared( the directory which you created in the previous step).
http://smsoftdev-tutorials.blogspot.com/
I am also using Virtual box 2.1.0 and this method is working for Ubuntu 8.10.
http://smsoftdev-tutorials.blogspot.com
Can you please clarify, for what versions of virtual box and the guest OS, did it use to work for you?It used to but no longer does.
Just adding another guest operating system, should not have any effect on the existing virtual machines. So, if you haven't done any other configuration changes except for adding the new guest O/S and the method worked for you earlier, then it should continue to work. Maybe you have by mistake changed some configuration settings.The only thing that I've changed is to add another guest O/S
http://smsoftdev-tutorials.blogspot.com
It's working now. I had upgraded VirtualBox to the version before the current one and before that but hadn't installed the Guest Additions (thought I had but guess not). Now that those are installed, the shared folder is working just fine. Thanks..smsoft wrote:Just adding another guest operating system, should not have any effect on the existing virtual machines. So, if you haven't done any other configuration changes except for adding the new guest O/S and the method worked for you earlier, then it should continue to work. Maybe you have by mistake changed some configuration settings.