简体   繁体   English

服务器上的docker中的docker-machine

[英]docker-machine in docker on server

I have a centos machine/server where I want to run multiple instances of docker containers with them having docker-machines with virtualbox driver inside them for testing purposes. 我有一个centos机器/服务器,我想在其中运行docker容器的多个实例,并在其中运行带有virtualbox驱动程序的docker机器以进行测试。 Is it even doable? 甚至可行吗?

I have a docker image from latest centos7. 我有来自最新centos7的docker镜像。 I then run 然后我跑

sudo docker run --privileged -ti test

Inside the docker container I installed docker, docker-machine and virtualbox. 在docker容器中,我安装了docker,docker-machine和virtualbox。

docker-machine --version
docker-machine version 0.10.0

VBoxManage --version 
5.1.16r113841

docker --version
Docker version 17.03.0-ce

When I run 当我跑步

docker-machine create --driver virtualbox default

I get the following error 我收到以下错误

(default) Creating a new host-only adapter produced an error: /usr/bin/VBoxManage hostonlyif create failed:
(default) 0%...
(default) Progress state: NS_ERROR_FAILURE
(default) VBoxManage: error: Failed to create the host-only adapter
(default) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(default) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 94 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
The default lines below are for a sh/bash shell, you can specify the shell you're using, with the --shell flag.

Does anybody know how I could get around this issue? 有人知道我该如何解决这个问题? My virtualbox already is newer than the stated 5.0.12 version. 我的virtualbox已经比声明的5.0.12版本新。

经过几次卸载>重新安装后,它开始工作...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM