How to share files between XP (host) and virtualora 14 (guest) Linux in virtualbox

Source: Internet
Author: User

Windows XP is host, fedora14 Linux is guest, and virtualbox is used for virtual machines.

(I do not know whether to insert this sentence. The XP file path is F: \ shared, while Linux is/home/, which is the opposite)

After installing the fedora System in the Windows Oracle virtualbox, set the shared folder between the two systems.
1. Select a directory as the shared directory on the host (XP. (For example:F: \ sharelinux).

2. Select the system to be set (if you have installed Multiple virtual systems) and choose "Settings"> "Data Space"> "Add a new data space ",

Set "data space location" to the newly created shared directory (F: \ sharelinux). "data space name" is the name mapped to the fedora system,

Set the name to the same one:Sharelinux.Select "fixed allocation ". Click "OK ".

3. After the shared folder is set, choose "Settings"> "Optical Drive" and mount the virtual Optical Drive "vboxguestadditions. ISO ". (This is the auxiliary Toolkit)

Generally, virtualbox comes with vboxguestaddition. ISO. If not, download it from www.virtualbox.org/download.

4. Start the console and install the auxiliary toolkit. (SeeSearch for vboxadditions Installation)
The vboxadditions_4.0.12_729165 icon appears on the desktop. Enter the storage location (I .e./media) of vboxadditions_4.0.12_72916 as the root user on the terminal and enter the directory CD/Media/vboxadditions_3.0.12_54655.
./VBoxLinuxAdditions-x86.run VFS-Module

After the installation is successful, restart: reboot.

(Note: you can right-click the disc icon on the desktop --> open it and find vboxlinuxadditions. run, double-click to run. the two files at the end of SH are also open and run, and a restart prompt will be displayed after the operation is successful. The steps below are the same)

5. Create a mount point: mkdir/mnt/shared. You can set a mount point by yourself./Mnt/shared

Run Mount-T vboxsf [-O options] sharename mountpoint.
Here, sharename is the name mapped to the fedora system by setting "data space name" above:Sharelinux;

Mountpoint is where you want to mount the Windows Shared Folder F: \ sharelinux to fedora, that is, the mount point/mnt/share created on it.
Therefore, my command is: Mount-T vboxsfSharefedora/mnt/shared

6. succeeded. Let's go in and check CD/mnt/shared --> ls

 

7. If you do not want to manually mount the system after each startup, you can add one to/etc/fstab. (Refer to the/etc/fstab file detailed http://dikar.javaeye.com/blog/361659)
Sharefedora/mnt/shareVboxsf RW, gid = 100, uid = 1000, auto 0 0

(OrSharefedora/mnt/shareVboxsfUlts0 0)

Note: a) the system file type installed with a virtual machine must be vboxsf, and the Mount name must be the same as the one created in data allocation.Sharefedora.

B) Share Name (Sharelinux)Cannot match
Mount directory(/Mnt/shared)Same name,If a protocol error occurs, check whether the shared name and mount directory are correctly written.

 

8. Run the following command to uninstall the SDK:

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

See http://hi.baidu.com/j2h3344/blog/item/93837801ef35478be850cdeb.html

Note: before mounting, make sure that the vboxsf module has been loaded. (In the host, load the vboxsf module: modprobe vboxsf)

If it is not loaded, a mount error may occur.
/Sbin/mount. vboxsf: mounting failed with the error: no such device

The following is the sharing of ubuntu, which is basically the same, with only minor differences.

1. Install the enhancement package (guest additions)

If you have installed fedora 14 or another version of Linux on the VM, select "devices"> "Install guest additions" in the virtualbox menu) ".

You will find an extra disc icon on the ora 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

For the cause analysis, refer to the shared folder on a Linux guest section of tips on running sun virtualbox.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.