Environment: the host operating system is Windows XP, the virtual machine is Ubuntu 9.10, and the virtual machine is virtualbox 3.08.
1. Install the enhancement package (guest additions)
After Ubuntu 9.10 is installed, run Ubuntu and log on. Select "devices"-> "Install guest additions" from the virtualbox menu )".
You will find an extra disc icon on the Ubuntu Desktop, which is automatically loaded to the folder/Media/cdom0 by default. Go to the command line terminal and enter:
CD/Media/cdom0
Sudo./vboxlinuxadditions. 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"-> shared folder (shared folders) 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 "gongxiang". Try to use an English name.
3. Mount Shared Folders
Re-enter the virtual Ubuntu and enter the following in the command line terminal:
Sudo mkdir/mnt/shared
Sudo Mount-T vboxsf gongxiang/mnt/shared
"Gongxiang" is the name of the previously created shared folder. OK. Now Ubuntu and the host can upload files to each other.
If you do not want to manually mount each time, you can add
Gongxiang/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 mount point above is/mnt/shared, if the name of the shared folder is also shared, the following error message will appear when mounting (see http://www.virtualbox.org/ticket/2265 ):
/Sbin/mount. vboxsf: mounting failed with the error: Protocol Error
Error Message
/Sbin/mount. vboxsf: mounting failed with the error: invalid argument
1. Canceling automatic mounting can solve the problem,
2. If 1 has no effect, add an item in/etc/fstab.
Gongxiang/mnt/shared vboxsf RW, gid = 100, uid = 1000, auto 0 0
Basic steps: (XP is host, Ubuntu is guest)
1. start Ubuntu, and then install the enhancement feature of virtualbox first. The menu is "device (d)"-> "Install enhancement feature"; then enter the Ubuntu system and install vboxadditions _. ISO, restart Ubuntu
The installation command is as follows:
Mount/dev/CDROM to attach the optical drive. If the file has been loaded, a prompt is displayed for the directory where the optical drive is mounted.
CD/mnt/CDROM
Sudo Sh./VBoxLinuxAdditions-x86.run VFS-Module
Restart the system after reboot is installed successfully.
2. virtualbox MANAGER: Choose "device (d)"> "allocate data space" and select the XP shared directory. If the directory name is in English (otherwise, a problem occurs), such as: D: /study;
3. Run on the terminal:
Sudo mkdir/mnt/share
Sudo Mount-F vboxsf study/mnt/share
Ls-/mnt/share
4. Over!
Use sudo if the permission is insufficient.
DIR/sbin/mount. * check whether/sbin/mount. vboxsf exists.
Lsmod | grep vboxvfs check whether the vboxvfs module is loaded. If it is loaded, two files are displayed. If it is not loaded, run the sudo modprobe vboxvfs command to load
Sudo Mount-T vboxsf sharename mountfolder. Sharename is the name of the shared folder in xp. mountfolder needs to be created in advance, generally in the '/mnt' directory.
If you do not want to manually mount each time, you can add one in/etc/fstab. Share/mnt/share vboxsf RW, gid = 100, uid = 1000, auto 0 0
In this way, automatic mounting is enabled.
Note: before mounting, make sure that the vboxsf module has been loaded.
If it is not loaded, a mount error may occur.
/Sbin/mount. vboxsf: mounting failed with the error: no such device
Delete share
Sudo umount-F/mnt/share
Basic steps: (XP is host, Ubuntu is guest)
1. start Ubuntu, and then install the enhancement feature of virtualbox first. The menu is "device (d)"-> "Install enhancement feature"; then enter the Ubuntu system and install vboxadditions _. ISO, restart Ubuntu
The installation command is as follows:
Mount/dev/CDROM to attach the optical drive. If the file has been loaded, a prompt is displayed for the directory where the optical drive is mounted.
CD/mnt/CDROM
Sudo Sh./VBoxLinuxAdditions-x86.run VFS-Module
Restart the system after reboot is installed successfully.
2. virtualbox MANAGER: Choose "device (d)"> "allocate data space" and select the XP shared directory. If the directory name is in English (otherwise, a problem occurs), such as: D: /study;
3. Run on the terminal:
Sudo mkdir/mnt/share
Sudo Mount-F vboxsf study/mnt/share
Ls-/mnt/share
4. Over!
Use sudo if the permission is insufficient.
DIR/sbin/mount. * check whether/sbin/mount. vboxsf exists.
Lsmod | grep vboxvfs check whether the vboxvfs module is loaded. If it is loaded, two files are displayed. If it is not loaded, run the sudo modprobe vboxvfs command to load
Sudo Mount-T vboxsf sharename mountfolder. Sharename is the name of the shared folder in xp. mountfolder needs to be created in advance, generally in the '/mnt' directory.
If you do not want to manually mount each time, you can add one in/etc/fstab. Share/mnt/share vboxsf RW, gid = 100, uid = 1000, auto 0 0
In this way, automatic mounting is enabled.
Note: before mounting, make sure that the vboxsf module has been loaded.
If it is not loaded, a mount error may occur.
/Sbin/mount. vboxsf: mounting failed with the error: no such device
Delete share
Sudo umount-F/mnt/share
Environment: the host operating system is Windows 7, the virtual machine is centos5.5, and the virtual machine is virtualbox 3.2.12.
1. Install the enhancement package (guest additions)
After centos5.5 is installed, run centos5.5 and log on. Select "devices"-> "Install guest additions" from the virtualbox menu )".
You will find an extra disc icon on the centos5.5 desktop, which is automatically loaded to the folder/Media/vboxaddition_3.2.10_66523 by default (the name may vary depending on the version ). Go to the command line terminal and enter:
# Cd/Media/vboxaddition_3.2.10_66523
# Sudo Bash./VBOXADDITION_3.2.10_66523-x86.run or sh VBOXADDITION_3.2.10_66523-x86.run
Pecify kern_dir = <directory> Baidu found a solution
Install the kernel-devel and kernel-headers packages and configure the compiling environment.
Install GCC first
# Yum-y install gcc
Then install kernel-devel and kernel-headers.
# Yum install kernel-devel kernel-headers
After the installation is complete, make a connection
Ln-S/usr/src/kernels/2.6.18-194.26.1.el5-i686
/Usr/src/Linux
Note: You must perform this operation. Otherwise
The virtualbox client also reports an error during the installation process. "2.6.18-194.26.1.el5-i686" is the kernel version number. Different versions may be different. You need to enter the version number based on your system kernel. # Uname
-R allows you to view the kernel version.
Run the command again after the installation is successful.
# Cd/Media/vboxaddition_3.2.10_66523
# Sh VBOXADDITION_3.2.10_66523-x86.run
Restart
# Lsmod | grep vboxsf
Vboxsf 38088 0
Vboxguest 152104 7 vboxsf
Indicates that the kernel module is loaded.
Vboxsf
2. Set Shared Folders
After the restart is complete, click "devices" in the menu of virtualbox-> shared folders to add a shared folder, the fixed and temporary options indicate whether the folder is persistent. Try to use an English name. Here we use winshare.
3. Mount Shared Folders
Enter the virtual centos5.5 and enter the following command line terminal:
# Sudo mkdir/mnt/share
# Sudo Mount-T vboxsf winshare/mnt/share
If prompted
/Sbin/mount. vboxsf: mounting failed with the error: no such device
The kernel module is not loaded.
Vboxfs:
# Lsmod | grep vboxsf
If no result is returned
Vboxsf is not loaded, run
# Sudo modprobe vboxsf
Mount normally
-T vboxsf winshare/mnt/share shared folder should be accessible
# Cd/mnt/share
# Ls-Al
If you do not want to manually mount each time, you can add
Share/mnt/share vboxsf RW, gid = 100, uid = 1000, auto 0
0
This enables automatic mounting.
4. unmount
# Sudo umount-F/mnt/shared
Note: The name of the shared folder must not be the same as that of the mount point (this is not an experiment, but it is not necessary ). For example, the mount point above is/mnt/share, if the name of the shared folder is also share, the following error message (http://www.virtualbox.org/ticket/2265) will appear during mounting ):
/Sbin/mount. vboxsf: mounting failed with
Error: Protocol Error