Page 1 of 1

Shared folders

Posted: 1. Nov 2012, 02:55
by rkb
I have setup a VM with the OS as a Ubuntu Linux Server and the host is Windows 7. I have set the shared folder that I want. Now I don't know how to access it from the Linux OS. The instructions indicate that I should use 'mount -t vboxsf share mount_point'. But when I do this I get an error indicating the 'vboxsf' is an unknown filesystem type. Also I set the folder to be 'auto-mount' so I am unclear why I need to use the mount command at all. In the shared folders settings I set the share name as Temp and the path to be c:\Temp. The folder is set to full access and auto-mount. Any hints on how I can use this shared folders feature?

Re: Shared folders

Posted: 1. Nov 2012, 03:11
by Perryg
You still need the guest additions. Install with the --nox11 at the end of the command and don't worry about the x11 warnings as a server does not have xorg (unless you install it).

Re: Shared folders

Posted: 1. Nov 2012, 04:34
by rkb
I have VBoxGuestEditions.iso. Do I need somethnig else?

Re: Shared folders

Posted: 5. Nov 2012, 13:09
by mpack
Forget the ISO. Just use "Install Guest Additions" from the Device menu of the running VM. If it doesn't auto-start then browse to the virtual cdrom and lauch the VBoxLinuxAdditions.run file.

Re: Shared folders

Posted: 5. Nov 2012, 20:09
by rkb
I tried to install from the Devices menu while the VM is running and I get an error dialog: "Unable to mount c:\program files\oracle\virtualbox\vboxguestadditions.iso on machine Kevin-Linux. Would you like to force mounting of this medium?

Could not mount the media/drive 'c:\program files\oracle\virtualbox\vboxguestadditions.iso' (VERR_PDM_MEDIA_LOCKED).

There are two buttons on the dialog 'Force Umount' and 'Cancel'. Both give no response so I am not sure if it "worked" (I suspect not).

Re: Shared folders

Posted: 5. Nov 2012, 20:16
by Perryg
Is the guest additions CD mounted on the guest? You should be able to check what is mounted.

Re: Shared folders

Posted: 5. Nov 2012, 20:25
by rkb
It is. I can see it from the settings.

Re: Shared folders

Posted: 5. Nov 2012, 20:36
by Perryg
OK but what about within the guest? Server versions of Linux usually need to have the CD mounted to be able to use it. Is it mounted or have you mounted the CD?

Re: Shared folders

Posted: 5. Nov 2012, 21:48
by rkb
I am not sure what you mean "within the guest". The guest is the Linux VM and when it is running I go to the devices menu and try to add guest additions with the result I posted earlier.
I don't think it is mounted. What command should I execute to mount it? After I mount it then I need to do the "install guest additions"?

Re: Shared folders

Posted: 5. Nov 2012, 22:04
by Perryg
You really need to see if the CD/DVD is in fact mounted.
Ubuntu uses /dev/sr0 as the CD/DVD and you need to make sure it is mounted.
Type man mount in the guest and read how it is to be done.

usual example is

Code: Select all

sudo mount /dev/sr0 /media/cdrom
This implies that you have created the mount point /media/cdrom. Then you simply go to that directory and run the install.

Code: Select all

sudo ./VBoxLinuxAdditions.run --nox11

Re: Shared folders

Posted: 5. Nov 2012, 22:32
by rkb
Thank you. This seems to be working. It is certainly taking a long time(Building the main Guest Additions module). What do I need to do with each subsequent reboot?

Re: Shared folders

Posted: 5. Nov 2012, 22:39
by Perryg
You should not need to rebuild them until/unless the kernel gets updated. If you install dkms before you install the guest additions it will rebuild them for you.
Now that you have the guest additions installed you can mount the shared folders.
If you want them to be available each time the guest is started them place the mount statement in the /etc/rc.local file.

Re: Shared folders

Posted: 5. Nov 2012, 22:41
by rkb
I noticed that there is a warning: "The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason." Then finally "Installing the Windows System drivers ...fail! (Could not find the X.Org or XFree86 Window System.)" Remember this is a Linux Server so there is no GUI, no X Window System.

Kevin

Re: Shared folders

Posted: 5. Nov 2012, 22:51
by Perryg
The headers for the current running kernel were not found
These need to be installed before the guest additions will even build properly. Servers take in consideration that you know what you are doing so they do not install packages that may not be necessary.

Code: Select all

sudo apt-get install dkms build-essential linux-headers-$(uname -r)
Then install the guest additions again.

Like I said earlier you can forget about the Xorg warnings since you do not have it installed, but with the --nox11 tag it will build everything else needed for shared folders.

Re: Shared folders

Posted: 5. Nov 2012, 23:47
by rkb
When I install the Guest edition it seems to be independent of the type of VM so whether it is a serveror other type of OS it doesn't matter I still see the Devices -> Install Guest Additions . . . This menu item doesn't have any note that VBoxLinuxAdditions.run needed to be run. This button should either be removed or have some sort of warning attached to it.

Anyway, thank you. I think it worked now. To have shared folders during subsequent reboots do I still need to mount. How do I access the shared folders?