New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker fails to start - MobyLinuxVM.vhdx already exists, unable to create MobyLinuxVM #67

Closed
qwebek opened this Issue Aug 31, 2016 · 30 comments

Comments

Projects
None yet
8 participants
@qwebek
Copy link

qwebek commented Aug 31, 2016

Expected behavior

Docker is started

Actual behavior

Docker fails to start

VHD C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx already exists
HyperV ][Info ] Creating VM MobyLinuxVM...
[NamedPipeServer][Error ] Unable to execute Start: Unable to create:

Information

  • E3B820D1-EFA6-4097-BA0E-BA68982EE30D/2016-08-31_12-00-32
  • a reproducible case if this is a bug, Dockerfiles FTW
  • page URL if this is a docs issue or the name of a man page
  • Windows 10 Enterprise 1511

Steps to reproduce the behavior

  1. Install Docker stable or beta
  2. Check checkbox Launch docker on last step of install

[14:28:21.384][HyperV ][Info ] VHD C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx already exists
[14:28:21.476][HyperV ][Info ] Creating VM MobyLinuxVM...
[14:28:23.188][NamedPipeServer][Error ] Unable to execute Start: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer 'XXX' because the object was not found. The object might have been deleted, or you might not have permission to perform the task. Verify that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the task again by using Run as Administrator.
at New-MobyLinuxVM, : line 202
at , : line 321 at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters)
at Docker.Backend.LinuxContainersEngine.Start(Settings settings)
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass7_0.b__0(Object[] parameters)
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)
[14:28:23.497][NamedPipeClient][Error ] Unable to send Start: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer 'XXX' because the object was not found. The object might have been deleted, or you might not have permission to perform the task. Verify that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the task again by using Run as Administrator.
at New-MobyLinuxVM, : line 202
at , : line 321
[14:28:23.498][Notifications ][Error ] Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer 'XXX' because the object was not found. The object might have been deleted, or you might not have permission to perform the task. Verify that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the task again by using Run as Administrator.
at New-MobyLinuxVM, : line 202
at , : line 321
[14:28:23.550][NamedPipeClient][Info ] Sending GetDebugInfo()...
[14:28:23.551][NamedPipeServer][Info ] GetDebugInfo()
[14:28:51.999][NamedPipeServer][Info ] GetDebugInfo done.

@qwebek

This comment has been minimized.

Copy link

qwebek commented Aug 31, 2016

Several weeks fighting this error :) but no luck

I have tried running docker as administrator, made reset to defaults, check for updates, - error is the same :(
Ther is possibility to create internal and external virtual switches in Hyper-v

Found almost nothing regarding this particular error, have another PC with the same configuratoin and there was no docker install issues there... i have compared windows versions, Hyper-v setting through hyper-v manager, everything is the same or at least basic things

Can anyone help?

@rn rn added the version/beta24 label Aug 31, 2016

@rn

This comment has been minimized.

Copy link
Contributor

rn commented Aug 31, 2016

@qwebek Thanks for reporting...this is a weird one, I haven't seen before. I assume you have tried un-installing and re-installing again...

Can you also try the following after exiting the docker for windows application via the whale systray icon from an elevated powershell:

Stop-Service com.docker.service
& 'C:\Program Files\Docker\Docker\resources\MobyLinux.ps1' -destroy

and then start the App again via the Desktop icon. You should get prompted that the service is not running, select Start and then also accept the UAC. If this still fails, it would be great if you could upload another diagnostics report and let us know the ID.

@rn rn added the kind/bug label Aug 31, 2016

@qwebek

This comment has been minimized.

Copy link

qwebek commented Aug 31, 2016

Thanks for responding! im not alone)

PS C:\Users\XXX> Stop-Service com.docker.service
WARNING: Waiting for service 'Docker for Windows Service (com.docker.service)' to stop...
PS C:\Users\XXX> & 'C:\Program Files\Docker\Docker\resources\MobyLinux.ps1' -destroy
VM MobyLinuxVM does not exist
Destroying Switch DockerNAT...
Removing VM MobyLinuxVM...
Delete VHD C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx
PS C:\Users\XXX>

Result looks like the same
E3B820D1-EFA6-4097-BA0E-BA68982EE30D/2016-09-01_00-12-17

[00:12:06.355][HyperV ][Info ] VHD C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx already exists
[00:12:06.401][HyperV ][Info ] Creating VM MobyLinuxVM...
[00:12:07.774][NamedPipeServer][Error ] Unable to execute Start: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer 'XXX' because the object was not found. The object might have been deleted, or you might not have permission to perform the task. Verify that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the task again by using Run as Administrator.
at New-MobyLinuxVM, : line 202

I hae also tried removing manually vhdx before docker start, its creating it, end result is the same..
Of course also tried start docker as an administrator..

@rn

This comment has been minimized.

Copy link
Contributor

rn commented Aug 31, 2016

Thanks for the quick response. This is odd:

[00:11:56.585][HyperV         ][Info   ] Creating Switch: DockerNAT...
[00:11:59.029][HyperV         ][Info   ] Switch created.
[00:11:59.391][HyperV         ][Info   ] Set IP address on switch
[00:12:00.547][HyperV         ][Info   ] Creating dynamic VHD: C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx
[00:12:01.672][HyperV         ][Info   ] Creating VM MobyLinuxVM...
[00:12:05.944][HyperV         ][Info   ] Hyper-V is running
[00:12:05.946][HyperV         ][Info   ] Create
[00:12:05.947][PowerShell     ][Info   ] Run script with parameters: -Create True -SwitchSubnetAddress 10.0.75.0 -SwitchSubnetMaskSize 24 -CPUs 2 -Memory 2048 -IsoFile C:\Program Files\Docker\Docker\Resources\mobylinux.iso...
[00:12:06.283][HyperV         ][Info   ] Using existing Switch: DockerNAT
[00:12:06.341][HyperV         ][Info   ] Using existing Switch IP address
[00:12:06.355][HyperV         ][Info   ] VHD C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx already exists

The MobyLinux.ps1' -destroy should remove the VHDX file, but alas, the output from the logs says that the file still exists, thought other bits, like the switch, which are also removed by the script, are re-created.

Could you try again:

Stop-Service com.docker.service
& 'C:\Program Files\Docker\Docker\resources\MobyLinux.ps1' -destroy

and then double check that afterwards there is no C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx file? If there is, could you try to remove it manually and then restart the app?

Thanks

@qwebek

This comment has been minimized.

Copy link

qwebek commented Aug 31, 2016

The command is removing the vhdx file successfuly, that was one of the first things i was checking

It is s creating vhdx in that folder during docker startup, then somehow it looks to that folder again and reports that it aleready exist,

Another diagnostic
E3B820D1-EFA6-4097-BA0E-BA68982EE30D/2016-09-01_02-04-23

@rn

This comment has been minimized.

Copy link
Contributor

rn commented Aug 31, 2016

@qwebek thanks for providing the info. @dgageot could you also take a look if there might be an issue?

@dgageot dgageot self-assigned this Sep 1, 2016

@dgageot

This comment has been minimized.

Copy link

dgageot commented Sep 5, 2016

@qwebek @rneugeba I have to say that I have no idea what's going on... What I can see is:

  • We try to start the VM which triggers a VM creation
  • The creation of the VM fails
  • We prefer to ignore this error and rather check that hyperv is running properly
  • It seems to run properly
  • So we try to create the VM once again which, of course, fails with the same error

But, I have no idea why it fails this way...

@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 5, 2016

Damn,
could it be due to some permissions to some files or folders? Win 10 sometimes requires UAC permissions to some folders in program files, i don't know..

Maybe i can run try to run this separately? or whatever is creating VM

Run script with parameters: -Create True -SwitchSubnetAddress 10.0.75.0 -SwitchSubnetMaskSize 24 -CPUs 2 -Memory 2048 -IsoFile C:\Program Files\Docker\Docker\Resources\mobylinux.iso...

Thanks.

@rn

This comment has been minimized.

Copy link
Contributor

rn commented Sep 5, 2016

@qwebek yes, trying to run this manually would be good. Something like:

  • exit the application
  • Stop-Service com.docker.service
  • .\MobyLinux.ps1' -destroy
  • check that the VHDX file is removed
  • .\MobyLinux.ps1 -Create True
    where the commands need to be executed from an elevated powershell and in the C:\Program Files\Docker\Docker\resources directory.

Otherwise, like @dgageot I'm running out of ideas of what be going on.

@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 9, 2016

Here is output of several commands, looks like the same error (

PS C:\Users\XXX> & 'C:\Program Files\Docker\Docker\resources\MobyLinux.ps1' -Create True
C:\Program Files\Docker\Docker\resources\MobyLinux.ps1 : A positional parameter cannot be found that accepts argument 'True'.
At line:1 char:1

  • & 'C:\Program Files\Docker\Docker\resources\MobyLinux.ps1' -Create Tr ...
  • - CategoryInfo          : InvalidArgument: (:) [MobyLinux.ps1], ParameterBindingException
    - FullyQualifiedErrorId : PositionalParameterNotFound,MobyLinux.ps1
    
    

PS C:\Users\XXX> & 'C:\Program Files\Docker\Docker\resources\MobyLinux.ps1' -Create
Enabled workaround for Build 10586 VMSwitch issue
Creating Switch: DockerNAT...
Switch created.
Set IP address on switch
ISO file at .\mobylinux.iso does not exist
At C:\Program Files\Docker\Docker\resources\MobyLinux.ps1:313 char:5

  • throw "$args"
    
  • ~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (ISO file at .\m... does not exist:String) [], RuntimeException
    • FullyQualifiedErrorId : ISO file at .\mobylinux.iso does not exist

    C:\program files\docker\docker\resources> ./MobyLinux.ps1 -Create
    Using existing Switch: DockerNAT
    Using existing Switch IP address
    Creating dynamic VHD: C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx
    Creating VM MobyLinuxVM...
    New-VM : Hyper-V encountered an error trying to access an object on computer 'XXX' because the object was not found. The object might have been
    deleted, or you might not have permission to perform the task. Verify that the Virtual Machine Management service on the computer is running. If the
    service is running, try to perform the task again by using Run as Administrator.
    At C:\program files\docker\docker\resources\MobyLinux.ps1:202 char:11

  • $vm = New-VM -Name $VmName -Generation 2 -VHDPath $vhd.Path -Swit ...
    
  •       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (:) [New-VM], VirtualizationException
    • FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.NewVM
@dgageot

This comment has been minimized.

Copy link

dgageot commented Sep 9, 2016

@qwebek Thanks for the update. As @rneugeba said, 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
@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 9, 2016

Hi David,
Here is output

Maybe i need to check permissions to some folders where it tries to create VM ?

PS C:\program files\docker\docker\resources> Stop-Service com.docker.service
PS C:\program files\docker\docker\resources> .\MobyLinux.ps1 -Destroy
VM MobyLinuxVM does not exist
Destroying Switch DockerNAT...
Removing VM MobyLinuxVM...
Delete VHD C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx
PS C:\program files\docker\docker\resources> .\MobyLinux.ps1 -Create
Enabled workaround for Build 10586 VMSwitch issue
Creating Switch: DockerNAT...
Switch created.
Set IP address on switch
Creating dynamic VHD: C:\Users\Public\Public Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx
Creating VM MobyLinuxVM...
New-VM : Hyper-V encountered an error trying to access an object on computer 'XXX' because the object was not found. The object might have been
deleted, or you might not have permission to perform the task. Verify that the Virtual Machine Management service on the computer is running. If the
service is running, try to perform the task again by using Run as Administrator.
At C:\program files\docker\docker\resources\MobyLinux.ps1:202 char:11

  • $vm = New-VM -Name $VmName -Generation 2 -VHDPath $vhd.Path -Swit ...
    
  •       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (:) [New-VM], VirtualizationException
    • FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.NewVM
@dgageot

This comment has been minimized.

Copy link

dgageot commented Sep 9, 2016

@qwebek Can you please try to create a new VM with default options using the Hyper-V Manager GUI? I'm betting on a corrupted Hyper-V installation like described here: https://social.technet.microsoft.com/Forums/en-US/b7affd2b-e27a-40e1-bbdc-38a48e757a60/corrupted-hyperv-environment?forum=winserverhyperv

If it's case, I'd run .\MobyLinux.ps1 -Destroy then go to Add/Remove Windows Features, remove all Hyper-V features, reboot, Add Hyper-V back, and reboot and try the previous commands again.

capture

@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 9, 2016

OO created and started VM with default params

virtual_machine

virtual_machine_1

@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 9, 2016

In that post you gave, the guy is describing the situation when HyperV fails to create VM when using existing vhdx, i will try to create new VM through HyperV UI using .vhdx created by docker, will update after minute

@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 9, 2016

Ok, its failing as described in above post link

virtual_machine_2

@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 9, 2016

Multiple disable-reboot-enable-reboot Hyper-V doesn't help (
It just cannot create VM using exisitng vhdx
I also didint find a way to reinstall hyper-v except of that way that is done through turn windows features..
It looks like dead end)

@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 18, 2016

Few udpates

I was able to create Vargrant machine and was able to connect to it using ssh as described by @ericis in Cannot run Docker after reinstall #76

Install vagrant
Create a "Vagrantfile" in an empty directory with the content

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
end
In a command window with the current working directory pointed to the directory above with the "Vagrantfile", run vagrant up --provider=hyperv

By the way, I was installing vargrant not to program files but some not windows system folders

Also, I was also able to manually create new VM in Hyper-V with new vhdx that is stored in users/user/workspace and then i have changed its settings by right clicking in Hyper-v and changed vhdx file to MobyLinuxVM created by docker and changed network adapter to DockerNAT
Then i have tried to start this VM from Hyper-V UI and it started fine, showing expected message that no operating system is installed

@wamonroe

This comment has been minimized.

Copy link

wamonroe commented Sep 29, 2016

I'm running Windows 10 Pro version 1607 and I'm having a similar issue. The Create process successfully creates the virtual switch, but fails when creating the VM with the error message "Unable to execute Start: Unable to create: Hyper-V encountered an error trying to access an object on computer 'XXXXX' because the object was not found."

Because the switch was being successfully created, I focused on the New-MobyLinuxVM function in the MobyLinux.ps1 script. I manually stepped through each line of the function trying to track down exactly where the error was coming from.

The first issue was the following line:

$vm = New-VM -Name $VmName -Generation 2 -VHDPath $vhd.Path -SwitchName $SwitchName

The only way I could get this line of code to run is if I removed the -VHDPath parameter. I was, however, able to get past this step by replacing it with two lines of code... first creating the VM without a VHD and then added it.

$vm = New-VM -Name $VmName -Generation 2 -SwitchName $SwitchName -NoVHD

$vm | Add-VMHardDiskDrive -Path $vhd.Path

The process failed again though, so I kept going through the code and ran into another snag with the following line:

$vm | Set-VMFirmware -EnableSecureBoot Off -BootOrder $bootDisk

What I don't understand here is that this SHOULD work according to Microsoft's own documentation. I was, however, able to get past this point and successfully create the VM by replacing the line of code above with the following lines:

$bootOrder = ($vm | Get-VMFirmware).BootOrder | Where-Object {$_.FirmwarePath -like "*$($bootDisk.ControllerType)($($bootDisk.ControllerNumber),$($bootDisk.ControllerLocation))"}

$vm | Set-VMFirmware -EnableSecureBoot Off -BootOrder $bootOrder

What I'm not certain about is if this is just some strange oddity with my system or some bug/change introduced by a Windows update.

@qwebek

This comment has been minimized.

Copy link

qwebek commented Sep 29, 2016

Hi, thanks for info
I have tracked this down to the issue in hyper-v: go to hyper-v manager and
try to create gen2 vm pointing to some vhd that you have created
beforehand, when i finish this kind of vm through wizard it is failing with
error after you press finish

Ihave created manually vm named as docker needs and attached to it
mobylinux vhdx and that seem to run fine - but doxker ifnores that vm

I intend to refer to admins to roll over windows update that is >1511 or
will make reinstall, not sure what else can be done here

@qwebek

This comment has been minimized.

Copy link

qwebek commented Oct 6, 2016

Hello,

To my regret i have solved this issue only by reinstalling windows with 1601 enterprise version

By the look of things the cause of issue was some sofrware that was installed on the box or some actions performed on windows that somehow someway made hyper-v not to work as it should (not able to create VM with existing vhdx and crashing)

I would suggest if you spot such issue - try to roll over next windows build as an upgrade - so you save all your software installed (in my case it was not an option but i would give it a try before reinstall !)

After reinstall docker works fine

Cheers and good luck :)

@rn

This comment has been minimized.

Copy link
Contributor

rn commented Oct 7, 2016

Hi @qwebek
thanks for getting back and glad that it is now working for you, albeit fixing it with a rather large hammer of re-installing.

Thanks for the recommendation of doing upgrades instead of re-install.

I'm closing this issue as it now seem resolved.

@andrei-tofan

This comment has been minimized.

Copy link

andrei-tofan commented Dec 19, 2016

I think there's a bug somewhere in the code base Docker, here is a quick workaround:

  • Open Hyper V Manager
  • Delete all duplicate MobyLinuxVM
  • Restart docker

docker

@rn

This comment has been minimized.

Copy link
Contributor

rn commented Dec 19, 2016

@andrei-tofan did you have multiple MobyLinuxVMs? That should not happen... @dgageot @simonferquel

@rg-srini

This comment has been minimized.

Copy link

rg-srini commented Jan 30, 2017

Had the same issue and followed all the suggestions listed here. Got the same errors ...
Finally going to re-install Windows :(

@rg-srini

This comment has been minimized.

Copy link

rg-srini commented Feb 1, 2017

reinstalled the OS. Docker was running good for a day. Again crashed :(

Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Failed to create the virtual hard disk.

The system failed to create 'C:\Users\Public\Documents\Hyper-V\Virtual hard disks\MobyLinuxVM.vhdx'.
at New-MobyLinuxVM, : line 218

Diagnostic ID.
130BC20A-64F0-4FD5-AB00-7009356EC743/2017-02-02_04-33-09

@rn

This comment has been minimized.

Copy link
Contributor

rn commented Feb 4, 2017

@rg-srini there is an odd message in your diagnostics:

01-02-2017 19:03:44          27262 Error            The system failed to
                                                    create 'C:\Users\Public\Doc
                                                    uments\Hyper-V\Virtual
                                                    hard disks\two.vhdx': A
                                                    virtual disk support
                                                    provider for the specified
                                                    file was not found.
                                                    (0xC03A0014).
01-02-2017 19:03:24          27012 Error            The storage where the
                                                    virtual hard disk is
                                                    located does not support
                                                    virtual hard disk sharing.

and

01-02-2017 18:50:19          12010 Error            'MobyLinuxVM' Synthetic
                                                    SCSI Controller (Instance
                                                    ID 5BB17070-0732-4124-B058-
                                                    00364EE2C058): Failed to
                                                    Power on with Error 'A
                                                    virtual disk support
                                                    provider for the specified
                                                    file was not found.'
                                                    (0xC03A0014). (Virtual
                                                    machine ID B2F95F74-3376-41
                                                    28-B6A6-106A029557FF)

and

01-02-2017 18:50:19          12152 Error            'MobyLinuxVM': Failed to
                                                    configure 'C:\Users\Public\
                                                    Documents\Hyper-V\Virtual
                                                    hard
                                                    disks\MobyLinuxVM.vhdx':
                                                    The storage where the
                                                    virtual hard disk is
                                                    located does not support
                                                    virtual hard disk sharing.

Is there anything special about the location? Do you run a virus scanner or other security software which may prevent creating the image?

@bfloydd

This comment has been minimized.

Copy link

bfloydd commented Feb 20, 2017

For whatever it's worth, I had this problem on Docker 1.13.1 (10072), Windows 10 Enterprise 64bit and took six steps to solve it. This seemed to happen after messing with Hyper-V Manager's virtual switch settings. 1) Uninstall Docker. 2) Remove Hyper-V entirely from computer via "Add Remove Features.." 3) Reboot twice. 4) Re-add Hyper-V 5) Reboot 15 times while facing TRUE NORTH. 6) Re-installed Docker

@rg-srini

This comment has been minimized.

Copy link

rg-srini commented Feb 20, 2017

@rneugeba - Thanks for your time. After a lot analysis, found out the root cause

After updating from Windows 10 to the Anniversary Update (build 1607), I experienced issues with Hyper-V. I was not able to start my virtual machines.

http://demo102.phpcaiji.com/article/bbaicbi-upgrading-to-windows-10-anniversary-edition-and-hyper-v.html

  1. Uninstalled Docker.
  2. Removed Hyper-V
  3. Uninstalled all the windows updates.
  4. Deferred future windows updates.
  5. Installed Docker & Docker enabled Hyper-V
  6. Restarted twice

Docker is now running without any issues :)

@thadG

This comment has been minimized.

Copy link

thadG commented Nov 18, 2017

I had similar problems using docker on Windows10

The error was :
""Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Failed to create the virtual hard disk. The system failed to create 'C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx'.""

I removed docker from Windows and also found the file 'MobyLinuxVM.vhdx' located at 'C:\Users\Public Documents\Hyper-V\Virtual hard disks\ was corrupted. It's memory size was 6,569,023KB. I deleted MobyLinuxVM.vhdx. After reloading a Docker, I restarted the computer.

The restart reloaded 'MobyLinuxVM.vhdx' located at 'C:\Users\Public Documents\Hyper-V\Virtual hard disks\ and now it was only 4,096 KB now. This was a good sign.

I right clicked on the 'Docker for Windows' icon and ran it as an administrator, but I still had the same error. I restarted the computer again. After the restart, Docker started to work again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment