我正在尝试使用Docker Machine启动两个虚拟机:
docker-machine create --driver virtualbox myvm1
docker-machine create --driver virtualbox myvm2
我在输出中看到以下错误:
(myvm2) Progress state: NS_ERROR_FAILURE
(myvm2) VBoxManage: error: Failed to create the host-only adapter
(myvm2) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(myvm2) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(myvm2) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
(myvm2)
(myvm2) 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
我安装了最新版本的VirtualBox(6.0.0)从这里。当我打开VirtualBox窗口并在左侧面板中单击VM时,会弹出以下错误弹出窗口:
更新
我尝试重新安装VirtualBox 6.0.0,然后在VirtualBox安装过程的结尾处看到以下屏幕:
也许这是上述故障的原因?我的Mac运行在10.14.1 macOS Mojave上。
我该如何解决这些错误?
docker-machine create --driver virtualbox myvm1
仍然无法成功执行,我在 VirtualBox 面板中双击了myvm1
。它将我带回到“安全性与隐私”选项卡(我的Mac系统首选项)的隐私选项卡中。我检查了 VirtualBox 和 Iterm2 并在“允许以下应用程序控制您的计算机”中启用了它们,然后重新启动了 iTerm 和 VB。但是该命令仍然以相同的错误而失败。看来我需要手动从 VirtualBox UI 启动 VMs。 - Hirurg103sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
引发了上述对话框,解决了我的问题。 - Ramesh Murugesan