Search code examples
dockerappveyorlinux-containers

How to activate linux-containers for docker in AppVeyor?


I want to use AppVeyor for the CI, and I want to use Linux containers for the docker. I use Visual Studio 2017 image. When I ran docker-switch-linux I get the following error:

Unable to start: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 'MobyLinuxVM' failed to start.
Failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running.
'MobyLinuxVM' failed to start. (Virtual machine ID C5FFC9C0-7293-45A6-B7C6-3FFC31AE0D25)
The Virtual Machine Management Service failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running (Virtual machine ID C5FFC9C0-7293-45A6-B7C6-3FFC31AE0D25).
at Start-MobyLinuxVM, <No file>: line 300
at <ScriptBlock>, <No file>: line 395

Any clue?

I have also added - ps: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All but to no avail.


Solution

  • We stopped running Docker CE on Visual Studio 2017 image because of issues with latest Docker CE and latest Windows Server 2016 updates we hit.

    As a workaround, for Docker CE we provide image called Windows Server 2019. Sample usage is here. Note that we provide this image by request and need your AppVeyor account name for this. Please request access to this image by email to [email protected] or by post to https://help.appveyor.com/.

    Also we plan to add Containers feature (Docker EE) to generally available image Visual Studio 2019. Please watch this GitHub issue.