Posted at

vagrant upに失敗するときの対処法


久し振りにVagrantを使おうとしたら vagrant up でエラーになったので、その対処法を載せます。


  • OS:macOS Mojave 10.14

  • VirtualBox:6.0.0 r127566

  • Vagrant:2.2.3

vagrant upに失敗するときの対処法

$ vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Resuming suspended VM...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "{半角英数の羅列}", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'centos73_wordpress_default_XXXXXXXXXXXXX_XXXXX' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine


$ vagrant up

The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant has detected that you have a version of VirtualBox installed
that is not supported by this version of Vagrant. Please install one of
the supported versions listed below to use Vagrant:

4.0, 4.1, 4.2, 4.3, 5.0, 5.1, 5.2

A Vagrant update may also be available that adds support for the version
you specified. Please check to download
the latest version.


$ 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

vagrant plugin update

Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-vbguest(= 0.15.0)'

vagrant plugin update を実行

$ vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Resuming suspended VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address:
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provision

→(若干気になるメッセージが出ていますが) 起動に成功!