Docker on windows 10 can't startup after deleting MobyLinuxVM in Hyper-V manually

后端 未结 4 1688
灰色年华
灰色年华 2021-02-01 07:45

At first the docker work well on my Windows 10 with official version.

Then I deleted the MobyLinuxVM in Hyper-V for some reason. After that the docker can\'t work. <

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 08:43

    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

提交回复
热议问题