LoginSignup
9
9

More than 5 years have passed since last update.

Vagrant, VirtualBox, Windows10 の環境でVMを起動できずにハマった話

Posted at

Vagrant, VirtualBox, Windows10 の環境でVMを起動できずにハマった話

環境

  • Vagrant
  • VirtualBox
  • Windows10

目的

  • 上記環境でvagrant upしようとした際にエラーが色々と発生してハマったのでまとめておく
    • Vagrant, VirtualBox, Windowsともに雑にバージョンをアップしたところ、環境がおかしくなってしまった
    • 基本的には、vagrantではなくVirtualBox側でエラーが発生する

不具合と対応

Failed to create VirtualBox COM object REGDB_E_CLASSNOTREG (0×80040154)

内容

  • vagrant up でboxを初期化時にエラーが発生し、正常に起動がされない
  • vagrant や VirtualBox を再インストールしても解消しない
  • 同じエラーが発生したっていう記事はネット上に沢山あるが、大抵は下記対応で解消しているよう
    1. アンインストール
    2. アンインストール時に削除されなかった.vagrantとか.VirtualBox等のフォルダ、ファイルの削除
    3. 再インストール

対応

  • DOS上で下記コマンドを実行
chdir “C:\Program Files\Oracle\VirtualBox”
VBoxSVC /ReRegServer
regsvr32 VBoxC.dll
  • レジストリ側の問題だったみたい
  • 参考

The guest machine entered an invalid state while waiting for it to boot.

内容

  • またvagrant upでこけてVMを起動できない

対応

  • VirtualBoxのバージョンダウン
  • 参考

Failed to open a session for the virtual machen ...

内容

  • vagrant up だと、またThe guest machine entered an invalid state while…でエラー
  • VirtualBox上で起動しようとすると、Failed to open a session...でエラーになってる

対応

  • MacTypeの「除外プロセス」でVBoxSVC,VirtualBoxを除外指定
    • MacType:Windows上のフォントレンダリングをいい感じにしてMacみたいな綺麗な文字を表示してくれるやつ(こいつが悪さをしてたらしい)
  • 参考

VBoxManage.exe: error: Failed to create the host-only adapter

内容

  • やっぱりvagrant upで死ぬ

対応

  • https://www.virtualbox.org/ticket/14040 から VBox-Win10-fix-14040.exe をDL
  • vagrant up する際は必ず事前に管理者権限でこのexeを実行しておく
    • VirtualBoxの不具合で、暫定的な対応らしい
  • 参考
9
9
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
9
9