Virtualbox配置CentOS虚拟主机的共享文件夹

1002 words in this article. # Virtualbox linux扩展 , Virtualbox共享文件夹 , CentOS , VirtualBox/ a

Step 1 在CentOS上安装Virtualbox的linux扩展

1) 将Virtualbox扩展的iso文件,添加到CentOS虚拟主机的IDE控制器下

2019-07-08T07:51:58.png

2) 启动CentOS后,挂载虚拟光驱

mkdir /cdrom
mount /dev/cdrom /cdrom
cd /cdrom
dir

2019-07-08T07:55:59.png

3) 安装扩展

/cdrom/VBoxLinuxAdditions.run

如果在安装过程中,出现类似

“Kernel headers not found for target kernel 3.10.0-957.el7.x86_64. Please install them and execute /sbin/rcvboxadd setup modprobe vboxguest failed The log file /var/log/vboxadd-setup.log may contain further information.”

这样的错误,需要安装 kernel-devel

yum install "kernel-devel-uname-r == $(uname -r)"

然后再次运行/cdrom/VBoxLinuxAdditions.run

Step 2 设置共享文件夹

在虚拟主机关闭时,设置固定分配的共享文件夹

2019-07-08T08:47:49.png

启动后,母机中的文件夹就可以自动挂载到CentOS中了。

All rights are reserved and users must seek my permission before making any other use of material contained in this site.

Add comments

No comment yet.