visuabox填坑之设置共享文件夹

启动虚拟机,在“设置”处点击安装增强工具包,结果没反应。。。

后来才知道,这个增强包是在单个虚拟机本身安装的

遇到错误,

发现centos、fedora的解决方式如下:

首先,确保所有的安装包尤其是内核保持最新。

 1 First make sure that your installed packages (especially kernel) are up to date:
 2 
 3 $ sudo yum update     
 4 If it updates the kernel version, you will have to restart so uname -r matches the directory name in /usr/src/kernels/. Then
 5 
 6 $ sudo yum install kernel-devel gcc
 7 $ echo export KERN_DIR=/usr/src/kernels/`uname -r` >> ~/.bashrc
 8 $ source ~/.bashrc     # to set the variable in your current shell
 9 $ sudo echo $KERN_DIR  # verify the value is set
10 $ sudo ls $KERN_DIR    # verify the directory exists 
After this compiling VirtualBox kernel modules should works without any problems.
接着在visualbox里面新建共享文件夹share

安装visualbox的增强功能:
mount  /dev/cdrom  /media/cdrom
cd /media/cdrom/
sh  ./VBoxLinuxAdditions.run

 而后将文件夹挂载步骤如下:

cd /mnt/
mount -t vboxsf share /mnt/share/

  大功告成!

 
原文地址:https://www.cnblogs.com/stockgalaxy/p/7884185.html