microsoft / microsoft/VFSForGit

Failure to start gvfs.service in docker

Open
#1,692 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
474
Avg merge
2d 4h
Merged PRs (30d)
8

Description

I am not able to mount a repo in docker with gvfs.
Error:

Cloning...Succeeded
Fetching commits and trees from origin (no cache server)...Succeeded
Attaching ProjFS to volume...Failed. Run 'gvfs log C:\project\Solutions' for more info.
GVFS.Service is not responding. Run 'sc start GVFS.Service' from an elevated command prompt to ensure it is running.

Even running the commands as container admin still fails.

When I run the powershell command:

Get-service gvfs.service

Status   Name               DisplayName
------   ----               -----------
Stopped  GVFS.Service       gvfs.service

It shows it has stopped. When trying to restart it, it fails to start.

restart-service : Failed to start service 'gvfs.service (GVFS.Service)'.
At line:1 char:1
+ restart-service gvfs.service
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceControl
   ler:ServiceController) [Restart-Service], ServiceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands
   .RestartServiceCommand

Here are mount logs, scrubbed my git links for personal reasons:

[2020-09-22 10:44:39.0016 -07:00] ExecuteMount (Start) {"Version":"1.0.20210.1","EnlistmentRoot":"C:\\project\\Solutions","Remote":"<SCRUBBED>","ObjectsEndpoint":"<SCRUBBED>","Unattended":false,"IsElevated":true,"NamedPipeName":"GVFS_C_\\PROJECT\\SOLUTIONS","EnlistmentRootPathParameter":"C:\\project\\Solutions"}
[2020-09-22 10:44:41.7156 -07:00] MountVerb_Execute_EnablingKernelDriverViaService {"KernelDriver.IsReady_Error":"","Message":"Service will retry"}
[2020-09-22 10:44:44.7210 -07:00] Error {"ErrorMessage":"GVFS.Service is not responding. Run 'sc start GVFS.Service' from an elevated command prompt to ensure it is running."}
[2020-09-22 10:44:44.7210 -07:00] ExecuteMount (Stop) {"DurationMs":6125}

Docker version 19.03.12, build 48a66213fe
Dockerfile:

# escape=`

FROM mcr.microsoft.com/windows:1903

WORKDIR C:\project

# Restore the default Windows shell for correct batch processing.
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; $VerbosePreference = 'Continue';"]

ADD https://github.com/microsoft/VFSForGit/releases/download/v1.0.20210.1/Git-2.28.0.vfs.0.0-64-bit.exe C:\TEMP\Git-2.28.0.vfs.0.0-64-bit.exe
ADD https://github.com/microsoft/VFSForGit/releases/download/v1.0.20210.1/SetupGVFS.1.0.20210.1.exe C:\TEMP\SetupGVFS.1.0.20210.1.exe

RUN Enable-WindowsOptionalFeature -Online -FeatureName Client-ProjFS -NoRestart
RUN Start-Process -Wait -FilePath C:\TEMP\SetupGVFS.1.0.20210.1.exe -ArgumentList @('/VERYSILENT', '/SP-', '/SUPPRESSMSGBOXES') | Wait-Process -Timeout 60 -ErrorAction SilentlyContinue -ErrorVariable timeouted

RUN Start-Process -Wait -FilePath C:\TEMP\Git-2.28.0.vfs.0.0-64-bit.exe -ArgumentList @('/VERYSILENT', '/SP-', '/SUPPRESSMSGBOXES')

ENTRYPOINT ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Unrestricted"]]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied Dockerfile for Windows 1903 and the ExecuteMount logs, then inspect how GVFS.Service and Client-ProjFS are initialized inside the container. Reproduce the stopped-service failure and trace the startup error; done means identifying the container configuration or service behavior responsible and documenting a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker, powershell
Domain
devops, infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.