1. Install the enhancement package (guest additions)
Install
Ubuntu
After 10.04, run Ubuntu and log on. Select "devices"-> "Install guest additions" from the virtualbox menu )".
The
Ubuntu
An extra disc icon is displayed on the desktop.
Added to the/Media/vboxadditions_3.1.6_59338 folder. Go to the command line terminal and enter:
CD/Media/vboxadditions_3.1.6_59338
Sudo./VBoxLinuxAdditions-x86.run
Start to install the toolkit. After the installation is complete, you will be prompted to restart
Ubuntu
.
2. Set Shared Folders
After the restart, click "devices"-> allocate data space menu to add a shared folder. The fixed and temporary options refer to whether the folder is persistent. Share names can be any one you like, such as ubuntu. Try to use an English name.
3. Mount Shared Folders
Re-enter virtual
Ubuntu
In the command line terminal, enter:
Sudo mkdir/mnt/shared
Sudo Mount-T vboxsf Ubuntu/mnt/shared
"Ubuntu" is the name of the previously created shared folder. OK, now
Ubuntu
And the host can transfer files.
If you do not want to manually mount each time, you can add
Ubuntu/mnt/shared vboxsf RW, gid = 100, uid = 1000, auto 0 0
This enables automatic mounting.
4. Run the following command to uninstall the SDK:
Sudo umount-F/mnt/shared
Note:
The name of the shared folder must not be the same as that of the mount point. For example, the above mount point is/mnt/shared. if the name of the shared folder is also shared, the following error message will appear during mounting (see
Http://www.virtualbox.org/ticket/2265
):
/Sbin/mount. vboxsf: mounting failed with the error: Protocol Error
Mount shared folder error/sbin/mount. vboxsf: mounting failed with the error: no such device
. This error occurs because the kernel module vboxvfs is not loaded.
If/sbin/mount. vboxsf: mounting failed with the error: no such device is prompted
It may be that the kernel module vboxvfs is not loaded. check it first:
Lsmod | grep vboxvfs
If no result is returned, vboxvfs is not loaded and executed.
Modprobe vboxvfs
Run lsmod | grep vboxvfs. You can see that vboxvfs and vboxadd have been loaded. Then re-mount
Mount-T vboxsf share/mnt/share
Normally, shared folders should be accessible.
Ls/mnt/share