Fatal Error: com.docker.osx.hyperkit.linux failed to start
Expected behavior
Booting up docker for mac.
Actual behavior
Docker for Mac crashes with exit code 1 when attempting to start.

Information
After updating Docker for Mac to build: 15G31 I now am unable to start docker.
- Full output of the diagnostics from "Diagnose & Feedback" in the menu:
Docker for Mac: version: 1.13.0-rc4-beta34 (264590153)
OS X: version 10.11.6 (build: 15G31)
logs: /tmp/BB9D538C-2C84-43CF-A1D5-65168FE4CEA4/20161222-084347.tar.gz
failure: Docker.qcow2 has unexpected errors: either repair offline or reset to factory defaults
[OK] vmnetd
[OK] dns
[ERROR] driver.amd64-linux
com.docker.driver.amd64-linux -db is not running
[OK] virtualization VT-X
[OK] app
[ERROR] moby
/Users/hugorut/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/console-ring does not exist
[OK] system
[OK] moby-syslog
[ERROR] db
Connection refused (ECONNREFUSED) connecting to /Users/hugorut/Library/Containers/com.docker.docker/Data/s40: check if service is running
com.docker.db is not running
[OK] env
[OK] virtualization kern.hv_support
[ERROR] slirp
Unexpected error ((Failure
"Error connecting socket to 9p endpoint unix:/Users/hugorut/Library/Containers/com.docker.docker/Data/s51: Unix.Unix_error(Unix.ECONNREFUSED, \"connect\", \"\")")) connecting to /Users/hugorut/Library/Containers/com.docker.docker/Data/s51
com.docker.slirp is not running
slirp check failed with: (Failure
"Error connecting socket to 9p endpoint unix:/Users/hugorut/Library/Containers/com.docker.docker/Data/s52: Unix.Unix_error(Unix.ECONNREFUSED, \"connect\", \"\")")
[ERROR] osxfs
com.docker.osxfs is not running
[OK] moby-console
[OK] logs
[ERROR] docker-cli
Connection refused (ECONNREFUSED) connecting to /var/run/docker.sock: check if service is running
Connection refused (ECONNREFUSED) connecting to /Users/hugorut/Library/Containers/com.docker.docker/Data/s60: check if service is running
docker ps failed
[OK] menubar
[ERROR] disk
Docker.qcow2 has unexpected errors: either repair offline or reset to factory defaults
- Diagnostic ID: BB9D538C-2C84-43CF-A1D5-65168FE4CEA4
Steps to reproduce the behavior
- Start Docker for Mac
Docker for Mac beta 34+ added extra integrity checks for the qcow2 file on VM start. Your logs contain the error
block device raised exception: (Failure "Found two references to cluster 139760: 118254.39256 and 84.43344")
Unfortunately this means that -- sometime in the past -- two groups of sectors in the virtual disk have become mapped to the same physical sector. It's unsafe to write to the file in this state. Unfortunately the only option is to use "Whale menu" -> "Preferences..." -> "Reset" -> "Reset to factory defaults". Unfortunately your containers and images will need to be rebuilt.
I suspect this may have happened when we enabled "online compaction" feature to reclaim space in the qcow2 file. The online feature is now disabled so I believe the problem should be fixed.
I apologies for the inconvenience. By the way beta 34 hotfix 1 was just released -- it has a bug fix relating to importing containers from toolbox. I recommend running the hotfix if you plan to import from toolbox.
thanks @djs55 👍
@djs55
"Whale menu" -> "Preferences..." -> "Reset" -> "Reset to factory defaults"
This worked for me but you need to be fast before the window above appears otherwise there is no way to open Preferences... #usability
@pavelkornev same thing here but doable.. I don't mind a little challenge now and then ;-)
Is there a command line way of doing this? 'Clicking stuff fast' does not work in my current enviroment?
nvm rm -fr ~/Library/Containers/com.docker.docker/Data/* worked.
@djs55 this still seems to be an issue with the latest stable docker that I upgraded to today. Why is the issue closed?
I closed the issue because the fix for the specific bug (in the online compaction code) has been released in the beta channel.
It's possible for other bugs to manifest with similar symptoms. For example there was a bug in the 1.12.* stable docker series where a file lock protecting the .qcow2 could accidentally get released early, leading to the same style of disk corruption. This corruption wasn't detected in 1.12.* but 1.13.* is much more paranoid, so the corruption is detected. Although this bug has also been fixed, if the Docker.qcow2 has been corrupted in the past then the safest thing to do is rm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 which will require containers and images to be rebuilt.
If you think a similar bug still exists (for example after an upgrade from a fixed version to another fixed version or a VM reboot of a fixed version), then please upload diagnostics and create a fresh issue. Thanks in advance!
Ad djs55 says, just do a
rm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
and restart. You do not have to be lightning fast!
Thanks! that worked
Thanks that worked for me as well!
rm -fr ~/Library/Containers/com.docker.docker/Data/* reboot...no dice
rm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 reboot...no dice
@AaronBDC: although you're (presumably) seeing similar symptoms, the underlying cause may be different. The best thing is to open a new issue with a diagnostic ID and a detailed description of the problem. The Logs and troubleshooting page has more information about diagnosing and reporting issues.
I had the same problem right now and did a reset to fix it as mentioned above
I just did a "rm -fr ~/Library/Containers/com.docker.docker/Data/*" on my host and get no return from "docker ps -a". Anything help?
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked