docker-machine create -d virtualbox test 报错

Running pre-create checks...
Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"WARNING: The vboxdrv kernel module is not loaded. Either there is no module\\n         available for the current kernel (3.10.0-693.21.1.el7.x86_64) or it failed to\\n         load. Please recompile the kernel module and install it by\\n\\n           sudo /sbin/vboxconfig\\n\\n         You will not be able to start VMs until this problem is fixed.\\n5.2.10r122088\". Please upgrade at https://www.virtualbox.org"

玩docker-machine用virtualbox驱动的时候启动报错。报错信息是说没有可用的kernel (3.10.0-693.21.1.el7.x86_64)。

但是我并没有搜索到这个kernel,只是搜到下面这个

[root@ecs-d900 ~]# yum search kernel-devel
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.cn99.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
================================================================================== N/S matched: kernel-devel ==================================================================================
kernel-devel.x86_64 : Development package for building kernel modules to match the kernel

安装试试

yum install kernel-devel
Running transaction
  正在安装    : kernel-devel-3.10.0-693.21.1.el7.x86_64                                                                                                                                    1/1 
  验证中      : kernel-devel-3.10.0-693.21.1.el7.x86_64                                                                                                                                    1/1 

已安装:
  kernel-devel.x86_64 0:3.10.0-693.21.1.el7                                                                                                                                                    

完毕!

居然能对上,一毛一样。

然后重新设置virtualbox

/sbin/vboxconfig

搞定。

你可能感兴趣的:(docker-machine create -d virtualbox test 报错)