2
0

More than 3 years have passed since last update.

Vagrant up でエラーが出た(macOSをBig Surにアップデートしたとき)

Posted at

はじめに

macOS Big Surにアップデートした時に、vagrant upをしたときにエラー対処法を書きたいと思います。備忘録です。

使用した環境

  • macOS Big Sur (11.0.2)
  • Homebrew 2.6.0
  • Vagrant 2.2.14
  • virtualBox 6.1.16
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

最近, macOSをBig Surにアップデートしたのですが、アプリがうまく起動しないなどありましたが、vagrantがうまく動かない原因はmacOSをアップデートしたからでした。

VagrantとVirtualBoxを最新版にする

①まずはアンインストールをします
brew cask uninstall virtualbox
brew cask uninstall vagrant

②次にインストールをします。
brew cask install virtualbox
brew cask install vagrant

でアップデートしましたがまたも
同じエラーが出てしまいます。

ここでなかなか進まず他の人書いたブログやqiitaを参考に、HostやHomestead.yamlをいじっていましたがうまくいかず、

この方が書いてくださった記事を参考に解決できました!!

【macOSアップデート】vagrant upできない時に一通り試すと良いかもしれない方法

ここの記事の
「VirtualBoxのカーネルエクステンションをロードし、Oracleのソフトウェアの実行許可を出す」のところを参考にしてpcを再起動をして
vagrant upで上手くいきました。

最後に

vagrant sshで接続してログインすることができました。
なかなかうまくいかなくてHomestaedで作っていたアプリを削除しなくても解決できました。
macOSをアップデートしたときは、ぜひ参考にしてみてください!!

参考サイト

【macOSアップデート】vagrant upできない時に一通り試すと良いかもしれない方法

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0