lisz-works

プログラミングと興味を貴方に

Docker Toolboxインストールで出たエラー解決

【スポンサーリンク】

Docker

Docker Toolboxをインストールしたら、セットアップ中に2つのエラーに見舞われたので解決してみました!

ちなみにエラーは

Error with pre-create check: "This computer is running Hyper-V.
VirtualBox won't boot a 64bits VM when Hyper-V is activated. Either
use Hyper-V as a driver, or disable the Hyper-V hypervisor. (To skip
this check, use --virtualbox-no-vtx-check)"
Looks like something went wrong in step ´Checking if machine default
exists´... Press any key to continue...

(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error
setting up host only network on machine start: The host-only adapter
we just created is not visible. This is a well known VirtualBox bug.
You might want to uninstall it and reinstall at least version 5.0.12
that is is supposed to fix this issue
Looks like something went wrong in step ´Checking if machine default
exists´... Press any key to continue...

です。

状況

実施したPCは、下記のような状況でした。

  1. 以前VirtualBoxが入っていたが、アンインストール済み(関係あるか不明)
  2. Docker Desktop for Windowsをインストールしてみたものの、謎のエラーで使うに至らず……
    1. その際あがいた結果、Hyper-Vは有効化していた
    2. なんだかんだでアンインストール
    3. 別PCは、Windows10 Homeなので、Docker Toolboxでいいやと落ち着く
  3. Docker Toolboxをインストール(VirtualBoxも同梱のものをインストール)
  4. エラーしたりVirtualBoxが起動しなかったり……

インストール

コチラに書かれている通り、コチラのGithubから最新版リリースをダウンロードしました。

github.com

このインストーラには、VirtualBoxもインストールすることができます。

ただし

VirtualBoxインストール済みの場合は、このインストーラでの再インストールはしないでね!

という注意書きがされていました。

ぼくは過去入れていましたが、アンインストール済みだったので、このインストーラで入れてもらうことにしました。

またココで手順を見ている限り

「Select Additional Tasks」で「Install VirtualBox with NDIS5 driver[default NDIS6]」にチェックを入れる

とあったので、☑チェックして、インストール完了まで進めました。

Terminalでエラー: Hyper-Vは切ったか!?

インストール後、Docker Quickstart Terminalを開くのですが、ここでまずエラー

Error with pre-create check: "This computer is running Hyper-V.
VirtualBox won't boot a 64bits VM when Hyper-V is activated. Either
use Hyper-V as a driver, or disable the Hyper-V hypervisor. (To skip
this check, use --virtualbox-no-vtx-check)"
Looks like something went wrong in step ´Checking if machine default
exists´... Press any key to continue...

どうやらHyper-Vが有効なままだったので、コレを無効化します。

スタートから「機能」で検索し、「Windows の機能の有効化または無効化」を選択。

機能で検索→Windows の機能の有効化または無効化

「Windows の機能」が開きます。

ここから「Hyper-V」のチェックを外し、OKボタンを押します。

Hyper-VをOFF

設定の適用が行われ、再起動を促されるので、再起動します。

Windows Updateのときのようなグレー画面で更新が走ります。

起動後、Docker Quickstart Terminalを再度実行したところ、変化がありました。

恐らくコレで解消です。

Terminalでエラー2: VirtualBoxが原因……?

Hyper-Vを解除したら、変化があったのですが、今度は下記エラーとなった。

(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error
setting up host only network on machine start: The host-only adapter
we just created is not visible. This is a well known VirtualBox bug.
You might want to uninstall it and reinstall at least version 5.0.12
that is is supposed to fix this issue
Looks like something went wrong in step ´Checking if machine default
exists´... Press any key to continue...

Google翻訳にかけた所

マシン作成エラー:マシン作成中のドライバーのエラー:マシン起動時のホストオンリーネットワークの設定エラー:作成したホストオンリーアダプターは表示されません。
これはよく知られているVirtualBoxのバグです。
それをアンインストールして、少なくともこの問題を修正することになっているバージョン5.0.12を再インストールすることをお勧めします。

どうやらVirtualBoxの既知のバグで

「Ver 5.0.12を再インストール」してみてね。

……なのですが、色々困ったので、先に結論を書くと

「VirtualBoxの最新版をインストールしよう」

今入っているVirtualBoxをアンインストールして、最新版をインストールするんだ。

結局それで解決したんだ……

その後、Docker Quickstart Terminalを叩くと……成功!

Docker Quickstart Terminalを叩いて、終わるまで待機……

この間怖いので、PCには触れず……

「成功したらコレがでるよ!」

と言われていた画面が表示された!

セットアップ完了のくじらさん


                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/

docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com


Start interactive shell

user@SS36S-009-1 MINGW64 /c/Program Files/Docker Toolbox
$

ヤッター!

VirtualBoxを開くと「default」という名前でVMが登録されている。

これは「登録されていることを確認できればOK」のようです*1

とはチュートリアル的な作業を実施して、問題なくコンテナを扱うことができました!

やりたいことは、まだコレから先だけど……

あとがき

Docker Toolboxを使おうとしたらエラーしたけど、解決してインストールを完了させてお話でした。

VirtualBoxめ!!となっていますが、まぁ動いたから問題いいとしましょう(笑)

もしお困りでしたら、お試しくださいませ。

*1:直接的には何かする訳ではないらしい