I am having some issues when trying to mount a SMB Share from a Windows Server 1909 core installation.
I have two Windows Server 1909 core servers running Docker 19.03.5 build 2ee0c5708.
On Server1, I created a folder called C:\mnt and shared it using <net share Mnt=C:\mnt /grant:everyone,FULL>.
On Server2, I am following the instructions found here (Under SMB Mounts https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/persistent-storage). I mount the share by running the following command:
$creds = Get-Credential
New-SmbGlobalMapping -RemotePath \\192.168.128.220\Mnt -Credential $creds -LocalPath Z:
When prompted, I am using 192.168.128.220\Administrator and it’s appropriate password. Once the commands execute, I get the OK status when running Get-SmbGlobalMapping and can cd into the Z drive and write to it.
Still on Server2, I try running a nanoserver:1909 and mounting the Z: to C:\stor with the following command:
docker container run -it --name voltest -v z:\:c:\stor mcr.microsoft.com/windows/nanoserver:1909
I am met with this error message:
Server1 and Server2 are both running in Hyper-V with an External Switch. They can connect to the Internet, ping each other, and the firewall is turned off.
I ran through the same steps on my computer that runs Hyper-V. I ran the New-SmbGlobalMapping command using the credentials of the Administrator on Server1 that hosts the share and get the OK status for the drive. Then I ran the same docker container run command using the same image and syntax as shown above and it works. I’m able to see the C:\stor folder and write to it.
Is there something I’m missing? Is there a better way to mount an SMB share from a Windows Server into a container for persistent storage? There must be something I need to do on the Windows Server 1909 core servers that I can’t figure out. I enabled SMB 1.0/CIFS File Sharing Support on both Servers.
Any guidance would be great. I am fairly new to Docker.
Thanks!