如何解决使用 Virtualbox 驱动程序创建 Docker 机器主机时出错
我正在尝试使用 VirtualBox 创建 Docker Machine 主机,但在运行时:docker-machine create -d virtualbox dckr-host-1
出现此回溯错误:
MacBook-Pro-de-Alberto:~ albertosanmartinmartinez$ docker-machine create -d virtualbox dckr-host-1
Running pre-create checks...
Creating machine...
(dckr-host-1) Copying /Users/albertosanmartinmartinez/.docker/machine/cache/boot2docker.iso to /Users/albertosanmartinmartinez/.docker/machine/machines/dckr-host-1/boot2docker.iso...
(dckr-host-1) Creating VirtualBox VM...
(dckr-host-1) Creating SSH key...
(dckr-host-1) Starting the VM...
(dckr-host-1) Check network to re-create if needed...
(dckr-host-1) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(dckr-host-1) 0%...
(dckr-host-1) Progress state: NS_ERROR_FAILURE
(dckr-host-1) VBoxManage: error: Failed to create the host-only adapter
(dckr-host-1) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(dckr-host-1) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005),component HostNetworkInterfaceWrap,interface IHostNetworkInterface
(dckr-host-1) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
(dckr-host-1)
(dckr-host-1) 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
但是主机被创建,当运行docker-machine ls
出现时:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
dckr-host-1 - virtualbox Stopped Unknown
我已经在最新版本 6.1 中卸载并重新安装了 VirtualBox,并重新启动了 Docker 和笔记本电脑,但错误仍然存在。
有人可以帮我吗? 提前致谢。
解决方法
我使用的是 Mac 笔记本电脑,我会说在尝试下载和安装 ISO 映像时它崩溃了。
解决这个问题:
系统偏好设置 -> 安全和隐私 -> 通用 -> 允许 “Oracle”应用程序被阻止的内容。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。