"Go" VirtualBox Install the enhanced package and configure shared folders

Source: Internet
Author: User

Original URL: http://www.2cto.com/os/201308/233609.html

VirtualBox install the enhanced package and configure shared Folders    because you need to transfer data between host and virtual machines, you want to use shared folders. However, the shared folder is not found in CentOS after you set up the shared folders, and you see the following to install the enhanced package. OK, by the way also solve the problem of mouse switching, the province always press the right CTL switch, as well as the window can also be seamless switch, it is convenient. But the vbox of the Enhanced toolkit has been an error in the immediate order.   looked for the next, need a few places to pay attention.  virtualbox everyone habitually referred to it as Vbox, smaller than the size of the VM, open source, fast. However, after installing CentOS in the virtual machine using VirtualBox  , it is not possible to run the client enhancements installed VirtualBox directly, which requires a simple configuration to properly install VirtualBox client enhancements in the CentOS virtual machine. Here's a look at Ownlinux's "Installing VirtualBox Client Enhancements for CentOS 5.5 virtual machines" tutorial.   1. Start the CentOS 5.5 virtual machine installed in VirtualBox and click "Devices" + "Install enhancements". At this point you can see that a "disc" has been mounted on the CentOS 5.5 desktop. It contains the components that install the VirtualBox client enhancement feature.   NOTE: Normally we run the components that are mounted directly to the VirtualBox client enhancements in the system, but CentOS needs to be configured, and if you install directly, the following error will occur.  bulding the VirtualBox Guest Additions Kernel Modules Failedyour system does not seem to BES set up to build Kernel m Odules. Look At/var/log/vboxadd-install.log-Find out-what went worg. Once you has corrected it,you run/etc/init.d/vboxadd setupto build them 2. You need to install the relevant components of the compiled kernel. Yum install Kernel-devel gcc  3. After installation is completeAfter making a connection ln-s/usr/src/kernels/2.6.18-164.15.1.el5-i686/usr/src/linux  which, the bold part, can be directly aided by the "tab" key to completion   Note: Be sure to do this, otherwise the VirtualBox client enhancements will also be error-enabled during installation. where "2.6.18-92.1.18.el5-i686" is the kernel version number, the different versions may not be the same, you have to fill in according to your own system kernel.   All of the above in the terminal operation, can be executed in the terminal in any location, in order to ensure security, at the time of execution, all terminals are directly using the "Application System"-"accessories"-"terminal", open the terminal, to "root".   Since the VirtualBox "device"-"Install enhancements" have been performed before, there is a name on the desktop called: vboxadditions_3.1.6_ 59338 VirtualBox Virtual CD-ROM (the name may vary depending on the VirtualBox version), double-click to open, find many files (after performing the above actions, double-click the autorun.sh file should be able to automatically perform the installation operation).   4. Install the VirtualBox Client Enhancements tool.   Choose your system consistent with the VirtualBox Client Enhancements tool to install, where Vboxlinuxadditions-x86.run applies to the 32 system, Vboxlinuxadditions-amd64.run is for 64-bit systems. Execute the following command to install the SH ./vboxlinuxadditions-x86.run   virtual machine automatically install the enhanced function, restart the VM, the mouse will never have to switch back and forth manually!   It is said that the "NAT" mode of network connection, all virtual machine network connection content, all need to go through the host network, so there may be a host and virtual machine access to the network at the same time the problem of slow speed.   In addition, the VirtualBox website clearly points to the support of CentOS, but in the new virtual machine, why not directly to the CentOS option? Because CentOS is actually a community version of Redhat. Basically the same as the free version of Redhat. So when it's time to build, choose Redhat.  5. Set up shared folders    Restart complete the VirtualBox menu, click "Device (Devices)" To assign data to null(Shared Folders) menu, add a shared folder, the option fixed and temporary refers to whether the folder is persistent. Try to use the English name. I use winshare.  6 here. Mount the shared folder   re-enter the virtual CentOs5.5, enter:  #sudo mkdir/mnt/share  at the command line terminal #sudo mount-t vboxsf winshare/mnt/share    If prompted/sbin/mount.vboxsf:mounting failed with the Error:no such device  may not be loaded into the kernel module VBOXFS, first look under:  # Lsmod | grep vboxsf  If no results are returned, stating that vboxsf is not loaded, execution   #sudo modprobe vboxsf   normal mount-t vboxsf winshare/mnt/ Share shared folders should have access to   #cd/mnt/share  #ls-al   If you don't want to mount them manually every time, you can add a  share/mnt/to/etc/fstab Share vboxsf Rw,gid=100,uid=1000,auto 0 0  so you can automatically mount it.   I do this, but each boot is not hooked up, so use the following method to execute the hook script at system startup, successfully automatically hook up the #vi/etc/rc.d/rc.local  at the end of the file to join the above manual hook command, such as:  Mount-t vboxsf sharefolder/share 7. Un-mount #sudo umount-f/mnt/shared Note: The name of the shared folder must not be the same as the name of the mount point (which I did not experiment with, but it is not necessary). For example, the above mount point is/mnt/share, if the name of the shared folder is also share, the following error message will appear when mounting:/sbin/mount.vboxsf:mounting failed with the error: Protocol Error reason analysis can see tips on running Sun virtualbOx's shared Folder on a Linux guest section.   Another detailed:  after installing the guest operating system (Guestos) in VirtualBox, it is recommended to install the VirtualBox Enhancement Pack (VirtualBox guestaddition), Its role is to optimize the performance and usability of Guestos (that is, improve the performance of Guestos and enhance the user experience).  guestaddition is essentially a set of drivers and applications installed on Guestos.    Note that many people have downloaded the enhanced package after double-clicking, see VirtualBox "Global Settings"--"extension" has shown the enhanced package name has been installed, in fact, it is just The relevant files were extracted from the enhanced package installation file and installed in VirtualBox as plug-ins. The real guestaddition is the 1 ISO files within the installation file, which must be mounted and installed in the Guestos to function, especially in the case of reloading guestos, "I clearly installed the guestaddition, can see in the expansion, how useless?" "I didn't understand that before, either. VirtualBox guestaddition Features:  1. Mouse integration: You do not need to press VirtualBox Hostkey (the default is the right ctrl) key, you can automatically release the mouse from the Guestos, thus seamlessly in the Host/guest Move the mouse between the OS. The guestaddition provides a guestos mouse driver that communicates with the Hostos mouse driver to achieve this.  2. Shared folders: Files can be exchanged between the Host/guest OS. By setting a folder on the host OS and specifying the shared folder as VirtualBox, you can access it as a network shared folder in Guestos, even if the Guestos does not have a network.  3. Better video support: VirtualBox's virtual graphics provide only the most basic video features, while the graphics drivers in Guestaddition provide ultra-high resolution and 2D3D video acceleration. You can arbitrarily adjust the size of the virtual machine window and the Guestos will automatically adapt as if you had set any resolution in Guestos.  4. Seamless window: This feature is very powerful. When Guestaddition is not installed, the Virtual machine window can only be a separate window, install Guestaddition and enable seamless windowsPort mode, Guestos can jump out of the virtual machine window and embed the host OS's desktop as if it were a normal application of the host OS. The supported Guestos are:<windows> and < running X Window Linux, solaris>. Switch shortcut keys for seamless mode:hostkey+l  Note: VirtualBox The default hostkey is right CTRL.  5. Universal Host/guest Communication channel: This function is mainly related to the programmer. The "Guest Properties" in Guestaddition provides a common string-based mechanism for exchanging data between host/guest to control or monitor Guestos. For example, the host OS directly control the Guestos program start, run, shutdown and so on.  6. Time synchronization: For some reason, the system time of the Host OS and guest OS may not be synchronized, although the VirtualBox itself provides synchronization capabilities, but Guestaddition's time synchronization is much more efficient and way better than VirtualBox itself.  7. Shared clipboard: That is, you can copy and paste between Host/guest OS.  8. Automatic logon: Enables Guestos to log on automatically, including using certificates.   Installing guestaddition in CentOS 6.3 between installation guestaddition, you need to prepare centos to build an external core module for compiling. (Original: Before installing the guest additions, you'll have to prepare your Guest system for building external kernel modules .)   The following operations are available for CentOS, Red Hat Enterprise Linux and Oracle Enterprise Linux: We recommend that you run the following commands as root. 1. If your CentOS version is earlier than 6, you need to add a line of divider=10 to the/etc/grub.conf to pass this parameter to the core to reduce the idle CPU load.  2. #yum update  to upgrade all system software to the latest version.  3. #yum Install the GCC installation compilation system  4.Install the external core Module #yum installation kernel-devel.  5. #reboot   Restart for all upgrades or installations to take effect.   At this point, all the preparations are complete, and the installation of guestaddition starts below.  6. Under the menu bar of the Virtual machine window, select "Device"--"Mount cd/dvd-rom", select "Cd/dvd-rom image", and the virtual Media Manager window will pop up and find Vboxg in the Resource Explorer. Uestadditions.iso file (This assumes that the Host OS is Windows), Vboxguestadditions.iso is typically located under the VirtualBox installation directory. Note: The menu for the VirtualBox Virtual machine window is often hidden, and the shortcut key shown is hostkey+c. I'm sweating for this.   This is equivalent to inserting a guestaddition CD in the CentOS virtual machine. Next you need to mount the disc.  7. #mount-T Auto/dev/cdrom1/mnt mount the disc. Note: The VirtualBox default has 2 optical drives, namely/dev/cdrom and/dev/cdrom1. If you mount the command after the card has been executed for a long time, the last appears: You must specify the filesystem type, stating that you need to change the device name. I was in this step card for a long time, urine is suppressed, and later found that VirtualBox has 2 CD-ROM, nnd.  8. #cd/mnt The Mount directory after the Mount succeeds.  9. #sh./vboxlinuxadditions.run installation guestaddition. Installation process is relatively long, slowly wait.   Installation Successful screen as follows:  , the entire installation is complete. Finally, a restart is required for the guestaddition to take effect. #reboot

"Go" VirtualBox Install the enhanced package and configure shared folders

Related Article

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.