macOS big sur vagrant up无法正常启动
vagrant up报如下错误:
==> hdp1: Setting the name of the VM: hdp1
==> hdp1: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
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
mac命令行执行如下命令,然后vagrant up解决!然而这种方法重启后需要重新执行这个命令才行。
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
后来发现官网的更新说明,将virtualbox降级到6.1.16能够完美解决上述问题。
安装时会报错,按照如下处理即可。
参考资料
https://stackoverflow.com/questions/21069908/vboxmanage-error-failed-to-create-the-host-only-adapter?page=2&tab=votes#tab-top