1、加源,安装VirtualBox(来源:https://www.virtualbox.org/wiki/Linux_Downloads)
sudo wget -P /etc/yum.repos.d http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.reposudo yum install VirtualBox-5.1
2、将用户加入vboxusers组
sudo usermod -G vboxusers -a lay
注:lay为你登录用户名
3、安装网卡模块
sudo yum install dkms kernel-devel kernel-headers---------------------------------------------------sudo /etc/init.d/vboxdrv setup
虚拟机到这一步,提示
[root lay]# /etc/init.d/vboxdrv setup bash: /etc/init.d/vboxdrv: No such file or directory
-----------------------------------------------------------------------
出现:
Stopping VirtualBox kernel modules [ 确定 ]Uninstalling old VirtualBox DKMS kernel modules [ 确定 ]Trying to register the VirtualBox kernel modules using DKMS[ 确定 ]Starting VirtualBox kernel modules