我在 mac 上使用 vagrant 运行 virtualbox 映像。一切正常,直到我更新到最新的 Mac 版本(12.0.1 Monterey)。
当我尝试使用 vagrant up 启动机器时,出现以下错误:
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
如果我进入virtualbox(mac应用程序)并在那里启动机器,我也会收到一个错误(只是说它无法启动机器。如果我去主机网络管理器的一部分
因此,仅主机适配器似乎存在问题。
在深入研究并查看其他人的问题和解决方案后,我尝试了以下方法:
- 允许 oracle 从安全和隐私设置中,但这并没有出现
- 运行重新启动 virtualbox 的命令(找不到它是什么了,对不起:/)
- 重新安装虚拟机
- 从 virtualbox(6.1) 安装 testbuild
- 将virtualbox添加到全盘权限
- 从 vagrantfile 的vagrant 文档代码中添加以下内容:
config.vm.provider "virtualbox" do |v|
v.gui = true
end
每次我尝试安装 virtualbox 时都会收到一条错误消息,指出安装失败。但是图标又回来了。
这可能是什么,我该如何解决?