Vapor Trail

明るく楽しく元気よく

Docker Tool Boxを起動した時に出るエラー 

Docker Tool Boxをインストール→エラーが出て結構詰まったのでエラー回避の方法書いておきます。

環境:Windows10 Pro 64bit

Docker Tool Box v17.10.0

Oracle VM VirtualBox version 5.2.0.

https://qiita.com/osuo/items/99a2b7413ce75f8217be

上記のURLを参考にDocker Tool Boxインストールし、Docker Quickstart Terminalを起動してもエラーが出て進まない状況。 その後Dockerの再インストールやVirtualBoxの旧バージョンをインストールしても状況は変わらず。

C:\Users\user>docker-machine --debug create -d virtualbox default
Docker Machine Version: 0.13.0, build 9ba6da9
Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:49827
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:49832
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(default) Calling .GetMachineName
(default) Calling .DriverName
(default) Calling .GetCreateFlags
(default) Calling .SetConfigFromFlags
Running pre-create checks...
(default) Calling .PreCreateCheck
(default) DBG | COMMAND: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe --version
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | 5.2.0r118431
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | Hyper-V is not installed.
(default) DBG | %!(EXTRA *exec.Error=exec: "vmms.exe": executable file not found in %PATH%)COMMAND: wmic cpu get VirtualizationFirmwareEnabled
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | VirtualizationFirmwareEnabled
(default) DBG | TRUE
(default) Image cache directory does not exist, creating it at C:\Users\user\.docker\machine\cache...
(default) DBG |
(default) No default Boot2Docker ISO found locally, downloading the latest release...
(default) DBG | }
(default) Latest release for github.com/boot2docker/boot2docker is v17.10.0-ce
(default) Downloading C:\Users\user\.docker\machine\cache\boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v17.10.0-ce/boot2docker.iso...
(default) 0%....10%....20%..Error removing file: Error removing temporary download file: remove C:\Users\user\.docker\machine\cache\boot2docker.iso.tmp619297123: The process cannot access the file because it is being used by another process.
(default)
Error with pre-create check: "read tcp 192.168.11.10:49862->52.216.85.235:443: wsarecv: An existing connection was forcibly closed by the remote host."
open C:\Users\user\.docker\machine\machines\default\default\Logs\VBox.log: The system cannot find the path specified.
notifying bugsnag: [Error with pre-create check: "read tcp 192.168.11.10:49862->52.216.85.235:443: wsarecv: An existing connection was forcibly closed by the remote host."]

まずboot2docker.isoのダウンロードが途中で止まるエラー。

"vmms.exe": executable file not found in %PATH%

とあったので、vmms.exeのあるフォルダのPATH(C:\Windows\WinSxS\amd64_microsoft-hyper-v-vstack-vmms_31bf3856ad364e35_10.0.15063.502_none_cbd4c85ac51e2a07)を環境変数に追加することで解決。

(default) DBG | VBoxManage.exe: error: The virtual machine 'default' has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in 'C:\Users\user\.docker\machine\machines\default\default\Logs\VBoxHardening.log'
(default) DBG | VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
(default) DBG | }
(default) DBG | Checking vm logs: C:\Users\user\.docker\machine\machines\default\default\Logs\VBox.log
Error creating machine: Error in driver during machine creation: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm default --type headless failed:
VBoxManage.exe: error: The virtual machine 'default' has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in 'C:\Users\user\.docker\machine\machines\default\default\Logs\VBoxHardening.log'
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine

open C:\Users\user\.docker\machine\machines\default\default\Logs\VBox.log: The system cannot find the file specified.
notifying bugsnag: [Error creating machine: Error in driver during machine creation: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm default --type headless failed:
VBoxManage.exe: error: The virtual machine 'default' has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in 'C:\Users\user\.docker\machine\machines\default\default\Logs\VBoxHardening.log'
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine

再びエラーが出てまた進まず。VMが悪いのかと思い、旧バージョンを入れたりネットワークアダプターをいじったりしても変わらず。

http://d.hatena.ne.jp/kobarn/20150805

結局こちらに書いてあるようにVBox-Win10-fix-14040.exeをダウンロードして立ち上げながら、Docker Quickstart Terminalを起動すると無事起動し、Kitematicも使えるようになりました。