Unable to mount azure blob to a windows container using rclone

What is the problem you are having with rclone?

I am trying to mount the azure blob to a windows container on a windows 10 pro 21H2 azure vm. I am able to mount properly to the host (windows 10) where as its failing in the windows container.

Run the command 'rclone version' and share the full output of the command.

rclone v1.61.1

  • os/version: Microsoft Windows Server Datacenter 1909 (64 bit)
  • os/kernel: 10.0.18363.1556 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: cmount
yes

Which cloud storage system are you using? (eg Google Drive)

Azure blob

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone.exe --config C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\rclone\\rclone.conf mount azureblob: C:\mnt\test --dir-cache-time 2s --vfs-cache-mode full -vv --debug-fuse

The rclone config contents with secrets removed.

[azureblob]
type = azureblob
account = inpixondevsa
key = <secret_key>

A log from the command with the -vv flag

RUN rclone.exe --config C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\rclone\\rclone.conf mount azureblob: C:\mnt\test --dir-cache-time 2s --vfs-cache-mode full -vv --debug-fuse
 ---> Running in 5016dfef9984
2023/03/08 00:33:31 DEBUG : rclone: Version "v1.61.1" starting with parameters ["C:\\ProgramData\\chocolatey\\lib\\rclone.portable\\tools\\rclone-v1.61.1-windows-amd64\\rclone.exe" "--config" "C:\\\\Users\\\\ContainerAdministrator\\\\AppData\\\\Roaming\\\\rclone\\\\rclone.conf" "mount" "azureblob:" "C:\\mnt\\test" "--dir-cache-time" "2s" "--vfs-cache-mode" "full" "-vv" "--debug-fuse"2023/03/08 00:33:31 DEBUG : Creating backend with remote "azureblob:"
2023/03/08 00:33:31 DEBUG : Using config file from "C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\rclone\\rclone.conf"
2023/03/08 00:33:31 INFO  : Azure root: poll-interval is not supported by this remote
2023/03/08 00:33:31 DEBUG : vfs cache: root is "C:\\Users\\ContainerAdministrator\\AppData\\Local\\rclone"
2023/03/08 00:33:31 DEBUG : vfs cache: data root is "\\\\?\\C:\\Users\\ContainerAdministrator\\AppData\\Local\\rclone\\vfs\\azureblob"
2023/03/08 00:33:31 DEBUG : vfs cache: metadata root is "\\\\?\\C:\\Users\\ContainerAdministrator\\AppData\\Local\\rclone\\vfsMeta\\azureblob"
2023/03/08 00:33:31 DEBUG : Creating backend with remote "C:/Users/ContainerAdministrator/AppData/Local/rclone/vfs/azureblob/"
2023/03/08 00:33:31 DEBUG : fs cache: renaming cache item "C:/Users/ContainerAdministrator/AppData/Local/rclone/vfs/azureblob/" to be canonical "//?/C:/Users/ContainerAdministrator/AppData/Local/rclone/vfs/azureblob"
2023/03/08 00:33:31 DEBUG : Creating backend with remote "C:/Users/ContainerAdministrator/AppData/Local/rclone/vfsMeta/azureblob/"
2023/03/08 00:33:31 DEBUG : fs cache: renaming cache item "C:/Users/ContainerAdministrator/AppData/Local/rclone/vfsMeta/azureblob/" to be canonical "//?/C:/Users/ContainerAdministrator/AppData/Local/rclone/vfsMeta/azureblob"
2023/03/08 00:33:31 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2023/03/08 00:33:31 DEBUG : Network mode mounting is disabled
2023/03/08 00:33:31 DEBUG : Mounting on "C:\\mnt\\test" ("azureblob")
2023/03/08 00:33:31 DEBUG : Azure root: Mounting with options: ["-o" "attr_timeout=1" "-o" "debug" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=azureblob"]
2023/03/08 00:33:31 ERROR : Azure root: Mount failed
2023/03/08 00:33:32 Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed
The command 'cmd /S /C rclone.exe --config C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\rclone\\rclone.conf mount azureblob: C:\mnt\test --dir-cache-time 2s --vfs-cache-mode full -vv --debug-fuse' returned a non-zero code: 1

Below is the docker file

FROM mcr.microsoft.com/windows/servercore:1909
WORKDIR c://
RUN powershell.exe -Command "Set-ExecutionPolicy Unrestricted -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"
RUN choco install rclone -y
COPY rclone.conf C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\rclone\\rclone.conf
RUN setx path "%path%;C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\rclone\\rclone.conf"
COPY winfsp-2.0.23055.msi C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\winfsp-2.0.23055.msi
RUN msiexec /q /i "C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\winfsp-2.0.23055.msi"
RUN rclone --version
RUN rclone.exe --config C:\\Users\\ContainerAdministrator\\AppData\\Roaming\\rclone\\rclone.conf mount azureblob: C:\mnt\test --dir-cache-time 2s --vfs-cache-mode full -vv --debug-fuse

Host specifications:

Edition	Windows 10 Pro
Version	21H2
Installed on	‎1/‎5/‎2023
OS build	19044.2604
Experience	Windows Feature Experience Pack 120.2212.4190.0

Docker Details:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.12.0)
  dev: Docker Dev Environments (Docker Inc., v0.0.3)
  extension: Manages Docker extensions (Docker Inc., v0.2.13)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.21.0)

Server:
 Containers: 59
  Running: 0
  Paused: 0
  Stopped: 59
 Images: 60
 Server Version: 20.10.20
 Storage Driver: windowsfilter
  Windows:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics internal l2bridge l2tunnel nat null overlay private transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
 Swarm: inactive
 Default Isolation: hyperv
 Kernel Version: 10.0 19044 (19041.1.amd64fre.vb_release.191206-1406)
 Operating System: Windows 10 Pro Version 2009 (OS Build 19044.2604)
 OSType: windows
 Architecture: x86_64
 CPUs: 4
 Total Memory: 16GiB
 Name: Test-VM
 ID: HZ7X:IEEA:63J2:E7VT:REO3:XFOS:5V3N:MWWO:TCLZ:UZ3M:WOAA:UP7A
 Docker Root Dir: C:\ProgramData\Docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false

I suggest you read through

https://winfsp.dev/doc/WinFsp-Container-Support/

And see if it gives you any ideas.

There is a desire (beyond my ability to control) to have the data be written directly to the Blob Container and not first to a local drive and then script moving the data up into Azure. So, while azcopy would normally be a great solution, in this instance it's not going to work. Thanks for the suggestion though.

@shivji44t thanks for the write-up. But interestingly we found the same scenario working once. But when we restart the host VM it's failing with the same error message as I stated above.

thanks @ncw , we followed it but the behavior that we oberved is not consistent.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.