Closed SergeiSOficial closed 1 year ago
docker: Error response from daemon: failed to start service utility VM (createreadwrite): kernel 'C:\Program Files\Linux Containers\kernel' not found.
I see two issues here:
C:\Program Files\Linux Containers\kernel
. I'm not yet sure why it tries to use that path at all (for me, LCOW works even though I don't have that file). There are similar issues (https://github.com/docker/labs/issues/490, for example), but without any clear way to fix. Needs more investigation.One more thing. Could you please check what docker context VSCode uses? It is supposed to be desktop-linux
.
2) Solution not helped to me
3)Context is desktop-linux Still error `.......... Successfully built 987862fd2765 Successfully tagged vsc-firmware-ddb69664cfc4183dc0361ff9237ce6d0:latest SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double chec k and reset permissions for sensitive files and directories.
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[2405259 ms] Start: Run: docker events --format {{json .}} --filter event=start
[2405366 ms] Start: Starting container
[2405367 ms] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=c:\worspace\project,target=/workspaces/project,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l vsch.local.folder=c:\worspace\project\Firmware -l vsch.quality=stable --entrypoint /bin/sh vsc-firmware-ddb69664cfc4183dc0361ff9237ce6d0 -c echo Container started
docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'c:/worspace/project' mount path must be absolute.
See 'docker run --help'.
[2408898 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\worspace\project\Firmware --filter label=vsch.quality=stable
[2411909 ms] Error: Command failed: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=c:\worspace\project,target=/workspaces/project,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l vsch.local.folder=c:\worspace\project\Firmware -l vsch.quality=stable --entrypoint /bin/sh vsc-firmware-ddb69664cfc4183dc0361ff9237ce6d0 -c echo Container started
[2411909 ms] trap "exit 0" 15
[2411910 ms] exec "$@"
[2411910 ms] while sleep 1 & wait $!; do :; done -
[2411910 ms] at bR (c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js:219:986)
[2411910 ms] at Hw (c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js:219:924)
[2411910 ms] at runMicrotasks (
I think I am experiencing same error as @SergeiSOficial:
[2022-04-22T21:06:49.515Z] docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'c:/my/Projects/ngx_http_jwted_module' mount path must be absolute
Ok I found https://github.com/microsoft/vscode-remote-release/issues/509 and was able to resolve the issue by specifying the workspaceMount
parameter explicitly, changing Windows-style path c:/my/Projects/ngx_http_jwted_module
to /mnt/c/Projects/ngx_http_jwted_module
.
So essentially, I added this line in devcontainer.json:
"workspaceMount": "type=bind,source=/mnt/c/my/Projects/ngx_http_jwted_module,target=/workspaces/ngx_http_jwted_module,consistency=cached"
Everything seems to work now π
Maybe good to mention somewhere in the docs, because this didn't happen in Docker Desktop, so I guess many people will hit it and think that stevedore is to blame...
was able to resolve the issue by specifying the workspaceMount parameter explicitly, changing Windows-style path c:/my/Projects/ngx_http_jwted_module to /mnt/c/Projects/ngx_http_jwted_module.
This should be fixed in just-released Stevedore 0.6.1, so Windows-style path should also work. Feel free to comment if issue still persists. Note that it will take some time to publish release (especially on WinGet where it goes through manual moderation process).
Thanks Marat, appreciate the fix π I'll try it out.
Sorry, took me some time to verify the fix, but unfortunately, it still doesn't work in 0.6.1. I double-checked that Stevedore was updated. docker-wsl-proxy.exe
creation time is 25.04.2022 and I also rebooted the computer just in case π
As soon as I comment out the "workspaceMount" line, it fails again with same error as before:
[2022-05-07T17:02:30.902Z] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=c:\my\Projects\ngx_http_jwted_module,target=/workspaces/ngx_http_jwted_module,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l vsch.local.folder=c:\my\Projects\ngx_http_jwted_module -l vsch.quality=stable --entrypoint /bin/sh vsc-ngx_http_jwted_module-1bd9d58c334ea40c37438f82e31fd112 -c echo Container started
[2022-05-07T17:02:31.299Z]
[2022-05-07T17:02:31.332Z] docker: Error response from daemon: invalid mount config for type "bind": invali
d mount path: 'c:/my/Projects/ngx_http_jwted_module' mount path must be absolute
docker: Error response from daemon: failed to start service utility VM (createreadwrite): kernel 'C:\Program Files\Linux Containers\kernel' not found.
I'm getting this error when trying to use flyctl deploy --local-only
, but docker run ...
works from the Terminal just fine.
Trying to open something with Remote-Containers also caused this (a different error?): remoteContainers-2022-06-29T23-25-03.654Z.log
This is on stevedore 0.7.0, with both windows and linux containers features installed (with hyper-v too).
Stevedore is no longer providing support for Linux containers. See why. I recommend switching to Rancher Desktop, Container Desktop or Colima.
Version
0.6.0
What steps are needed to reproduce the behavior?
Microsoft Windows [Version 10.0.19044.1586] WSL2 Docker version 20.10.14, build a224086
DockerFile
FROM mcr.microsoft.com/vscode/devcontainers/base:0-bionic
devcontainer.json
{ /"name": "Ubuntu", "build": { "dockerfile": "Dockerfile", "args": { "VARIANT": "bionic" } }, "settings": {}, }
What you expected?
I want connect to remote container with stevedore, but there is error
What happened?
Log `[53 ms] Remote-Containers 0.231.6 in VS Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977). [53 ms] Start: Resolving Remote [63 ms] Setting up container for folder or workspace: c:\worspace\project\Firmware\project.code-workspace [66 ms] Start: Check Docker is running [66 ms] Start: Run: docker version --format {{.Server.APIVersion}} [6963 ms] Server API version: 1.41 [6963 ms] Start: Run: docker volume ls -q [10335 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\worspace\project\Firmware --filter label=vsch.quality=stable [12965 ms] Start: Run: C:\Program Files\Microsoft VS Code\Code.exe c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js up --container-data-folder .vscode-server/data/Machine --container-system-data-folder /var/vscode-server --workspace-folder c:\worspace\project\Firmware --workspace-mount-consistency cached --id-label vsch.local.folder=c:\worspace\project\Firmware --id-label vsch.quality=stable --log-level debug --config c:\worspace\project\Firmware.devcontainer\devcontainer.json --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true --terminal-columns 215 --terminal-rows 12 [13172 ms] remote-containers 0.231.6. [13172 ms] Start: Resolving Remote [13176 ms] Start: Run: git rev-parse --show-cdup [17458 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\worspace\project\Firmware --filter label=vsch.quality=stable [20280 ms] Start: Run: docker build -f c:\worspace\project\Firmware.devcontainer\Dockerfile -t vsc-firmware-ddb69664cfc4183dc0361ff9237ce6d0 --build-arg VARIANT=bionic c:\worspace\project\Firmware.devcontainer Sending build context to Docker daemon 27.65kB Step 1/2 : ARG VARIANT="bionic" Step 2/2 : FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} ---> c7f208b9964f Successfully built c7f208b9964f Successfully tagged vsc-firmware-ddb69664cfc4183dc0361ff9237ce6d0:latest
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them [29357 ms] Start: Run: docker events --format {{json .}} --filter event=start [29445 ms] Start: Starting container [29445 ms] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=c:\worspace\project,target=/workspaces/project,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l vsch.local.folder=c:\worspace\project\Firmware -l vsch.quality=stable --entrypoint /bin/sh vsc-firmware-ddb69664cfc4183dc0361ff9237ce6d0 -c echo Container started docker: Error response from daemon: failed to start service utility VM (createreadwrite): kernel 'C:\Program Files\Linux Containers\kernel' not found. See 'docker run --help'. [32162 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\worspace\project\Firmware --filter label=vsch.quality=stable [34758 ms] Error: Command failed: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=c:\worspace\project,target=/workspaces/project,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l vsch.local.folder=c:\worspace\project\Firmware -l vsch.quality=stable --entrypoint /bin/sh vsc-firmware-ddb69664cfc4183dc0361ff9237ce6d0 -c echo Container started [34758 ms] trap "exit 0" 15 [34758 ms] exec "$@" [34758 ms] while sleep 1 & wait $!; do :; done - [34758 ms] at bR (c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js:219:986) [34758 ms] at Hw (c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js:219:924) [34758 ms] at processTicksAndRejections (node:internal/process/task_queues:96:5) [34759 ms] at async IR (c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js:224:2024) [34759 ms] at async Xw (c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js:224:3221) [34759 ms] at async kR (c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js:224:13925) [34759 ms] at async TR (c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js:224:13650) [34793 ms] Exit code 1 [34794 ms] Command failed: C:\Program Files\Microsoft VS Code\Code.exe c:\Users\user.vscode\extensions\ms-vscode-remote.remote-containers-0.231.6\dist\spec-node\devContainersSpecCLI.js up --container-data-folder .vscode-server/data/Machine --container-system-data-folder /var/vscode-server --workspace-folder c:\worspace\project\Firmware --workspace-mount-consistency cached --id-label vsch.local.folder=c:\worspace\project\Firmware --id-label vsch.quality=stable --log-level debug --config c:\worspace\project\Firmware.devcontainer\devcontainer.json --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true --terminal-columns 215 --terminal-rows 12 [34794 ms] Exit code 1 `
Additional context
No response