Docker on windows 10 can't startup after deleting MobyLinuxVM in Hyper-V manually
Then I reinstall the docker and turn on the feature of Hyper-V again.
Make sure to turn on the feature of Hyper-V first (and reboot)
Then reinstall Docker for Windows.
See "What to know before you install":
The current version of Docker for Windows runs on 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later).
The Hyper-V package must be enabled for Docker for Windows to work. The Docker for Windows installer will enable it for you, if needed.
Your particular error message is reported in docker/for-win
issue 248 and before that in issue 214
Unable to create:
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop:
The object already exists.
As noted in this comment and here, try and delete the saved VM and restart.
you should be in
C:\Program Files\Docker\Docker\resources
to run the commands.
So let me refine the sequence of commands that you could run:
- exit the application
- Stop-Service
com.docker.service
cd 'C:\Program Files\Docker\Docker\resources'
.\MobyLinux.ps1 -Destroy
- check that the VHDX file (
C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx
) is removed .\MobyLinux.ps1 -Create
Problem solved!!
I tried the method which VonC provided, though still can't work, but I found one thing that while I run the command .\MobyLinux.ps1 -Create
, it prompts that the VNAT creation error. Then I open the network adapter list, found that there are many "disconnected adapter" which is created by Hyper-V(During these time, I've turn off and turn on several times, each time it won't recognize the older adapters which docker can). So the adapter which docker found doesn't match which the Hyper-V found, and will prompt "object already exists" and won't create new one.
At last, what we need to do is to open the device manager and delete the unnecessary adapters -- then the docker successfully started!
Finally, great thank for the first answer by VonC