LoginSignup
2
3

More than 5 years have passed since last update.

Windows 10 Fall Creators Update にアップデートしたら vagrant up で仮想マシンが起動しない場合の対処方法

Last updated at Posted at 2018-04-27

ある日突然、 仮想マシンを起動しようと vagrant up を実行したら、エラーが発生して仮想マシンが起動しなくなってしまいました。

エラーメッセージから下記にたどり着きました。(エラーメッセージは失念・・。)
下記と結論は同じですが、解決方法が少々異なるため記録を残しておきます。

結論

Vagrant, VirtualBox をアップデートし、 Vagrant のプラグインを再インストールして解決しました。

環境

  • Windows 10 Fall Creators Update (1709)
  • Vagrant 1.9.5
  • VirtualBox 5.1.22

対処方法

以降、順を追って記載します。

Vagrant アップデート

Windows のパッケージマネージャ chocolatey 経由で Vagrant をインストールしていたため、 choco upgrade vagrant コマンドで Vagrant をアップデートします。

アップデート前後での Vagrant のバージョンの変化です。

  • before: 1.9.5
  • after: 2.0.4

VirtualBox アップデート

Vagrant と同じく chocolatey 経由で choco upgrade virtualbox コマンドで VirtualBox をアップデートします。

アップデート前後での VirtualBox のバージョンの変化です。

  • before: 5.1.22
  • after: 5.2.8

Vagrant プラグインの再インストール

Vagrant, VirtualBox のアップデート完了後、 vagrant up を実行したところ、次は下記エラーが発生してしまいました。

> vagrant up
Vagrant failed to initialize at a very early stage:

The plugins failed to initialize correctly. This may be due to manual
modifications made within the Vagrant home directory. Vagrant can
attempt to automatically correct this issue by running:

  vagrant plugin repair

If Vagrant was recently updated, this error may be due to incompatible
versions of dependencies. To fix this problem please remove and re-install
all plugins. Vagrant can attempt to do this automatically by running:

  vagrant plugin expunge --reinstall

Or you may want to try updating the installed plugins to their latest
versions:

  vagrant plugin update

Error message given during initialization: Unable to resolve dependency: user requested 'sahara (> 0)'

選択肢は下記3点あるようです。

  1. vagrant plugin repair
  2. vagrant plugin expunge --reinstall
  3. vagrant plugin update

今回は、選択肢2に Vagrant を最近アップデートした場合・・とあったので、選択肢2のコマンドを実行し、 Vagrant のプラグインを再インストールしました。

> vagrant plugin expunge --reinstall

This command permanently deletes all currently installed user plugins. It
should only be used when a repair command is unable to properly fix the
system.

Continue? [N]:

Vagrant expunge has been declined. Skipping removal of plugins.

Vagrant will now attempt to reinstall user plugins that were removed.
Installing the 'sahara' plugin. This can take a few minutes...
Fetching: open4-1.3.4.gem (100%)
Fetching: Platform-0.4.0.gem (100%)
Fetching: popen4-0.1.2.gem (100%)
Fetching: sahara-0.0.17.gem (100%)
Fetching: micromachine-2.0.0.gem (100%)
Fetching: vagrant-vbguest-0.15.1.gem (100%)
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

Unable to resolve dependency: user requested 'vagrant-vbguest (= 0.14.2)'

最終的に失敗しているようなメッセージですが、おもむろに vagrant up を実行したところ、無事に仮想マシンが起動しました。

参考文献

2
3
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
3