Scenario:
- Download Docker for Windows (edge or stable branch, doesn’t seem to matter).
- Boot up and Docker will fail to start with MobyLinuxVM failed to realize.
The hint is the text “<No file>” in the window above, for my scenario fix anyway.
To fix:
- Further investigation reveals the vhd is actually not there, nor is the VM present in Hyper-V manager. Looking further, something is amiss.
- Right-click the Docker icon in your system tray, select Settings.
- Select Advanced and validate your path for “Images and volumes VHD location”.
- Note the path. Does it exist? For me, no. It’s an old setting from a previous installation of Hyper-V on this system. The path is invalid as I removed Hyper-V to a dedicated host and deleted the directories post migration.
- Uninstall Docker (rerun the installer you downloaded, select Remove).
- Open Hyper-V Manager. (start, type “Hyper-V” and click it)
- Right click your host name in Hyper-V Manager and select “Hyper-V Settings”.
- Browse your “Virtual Hard Disks” and “Virtual Machines” paths and set to valid directories, Save/Ok/Apply/etc.
- Reinstall Docker from the downloaded installer. Now that the Hyper-V path for VM/disks is valid, Docker can place the MobyLinuxVM disk and create the Virtual Machine in Hyper-V and start it. yay.
- ???
- Profit
Suggestion: Pre-flight installer for Docker for Windows might want to check that the paths are valid for the creation of the vhd file/VM.
Further suggestion: When you run Hyper-V for a bit, then remove the feature from Windows. MAYBE, just maybe, Windows should remove the damn settings so when you re-enable Hyper-V it starts off fresh, instead of with stale info.
Further further suggestion: Live long and prosper.
This is the bug I filed, looks like they might fix it (should be a hyper-v fix too honestly, maybe I’ll feedback that too).
Dude out
You make my day, thanks for sharing this solution !
Thank you you saved my day! Big thanks for sharing the solution!