New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mounting SMB shared folders failed under Windows 10 #6841

Closed
IlianYotov opened this Issue Jan 10, 2016 · 10 comments

Comments

Projects
None yet
5 participants
@IlianYotov

IlianYotov commented Jan 10, 2016

Hi folks,

I have a problem when running vagrant under Win 10. I try to setup Wordpress Calypso project, but mounting folders fails with "Invalid argument".

This is my setup:
Vagrant 1.8.1
VirtualBox 5.0.12
Win 10

Here is the output from console ( cmder running in administration mode ):

λ vagrant up
Bringing machine 'app' up with 'docker' provider...
==> app: Docker host is required. One will be created if necessary...
    app: Vagrant will now create or start a local VM to act as the Docker
    app: host. You'll see the output of the 'vagrant up' for this VM below.
    app:
    default: Importing base box 'mitchellh/boot2docker'...
    default: Matching MAC address for NAT networking...
    default: Checking if box 'mitchellh/boot2docker' is up to date...
    default: Setting the name of the VM: wp-calypso_default_1452430553414_14239
    default: Clearing any previously set network interfaces...
    default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Forwarding ports...
    default: 2375 (guest) => 2375 (host) (adapter 1)
    default: 3000 (guest) => 3000 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
    default: Running 'pre-boot' VM customizations...
    default: Booting VM...
    default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: docker
    default: SSH auth method: private key
    default: Machine booted and ready!
==> app: Syncing folders to the host VM...
    default: Preparing SMB shared folders...
    default: You will be asked for the username and password to use for the SMB
    default: folders shortly. Please use the proper username/password of your
    default: Windows account.
    default:
    default: Username: Yotov
    default: Password (will be hidden):
    default: Mounting SMB shared folders...
    default: D:/wp-calypso => /var/lib/docker/docker_1452430587_35200
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t cifs -o uid=`id -u docker`,gid=`getent group docker | cut -d: -f3`,sec=ntlm,credentials=/etc/smb_creds_8aa67c62ceb130853d91dff08a9b4eaa //192.168.0.103/8aa67c62ceb130853d91dff08a9b4eaa /var/lib/docker/docker_1452430587_35200
mount -t cifs -o uid=`id -u docker`,gid=`id -g docker`,sec=ntlm,credentials=/etc/smb_creds_8aa67c62ceb130853d91dff08a9b4eaa //192.168.0.103/8aa67c62ceb130853d91dff08a9b4eaa /var/lib/docker/docker_1452430587_35200

The error output from the last command was:

mount: mounting //192.168.0.103/8aa67c62ceb130853d91dff08a9b4eaa on /var/lib/docker/docker_1452430587_35200 failed: Invalid argument

And here is the global-status output

λ vagrant global-status
id       name    provider   state     directory
--------------------------------------------------------------------------
d9b7a58  default virtualbox running   D:/wp-calypso
b6a0335  app     docker     preparing D:/wp-calypso

has anyone figured out how to fix this?
Thanks

@IlianYotov

This comment has been minimized.

Show comment
Hide comment
@IlianYotov

IlianYotov Jan 10, 2016

I ran vagrant in debug mode so here is a part of the output:

DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: mount -t cifs -o uid=`id -u docker`,gid=`getent group docker | cut -d: -f3`,sec=ntlm,credentials=/etc/smb_creds_273bf68f1097d455e1fb5e53884a9122 //192.168.0.103/273bf68f1097d455e1fb5e53884a9122 /var/lib/docker/docker_1452442099_51262 (sudo=true)
DEBUG ssh: stderr: sh:
DEBUG ssh: stderr: getent: not found
DEBUG ssh: stderr:

DEBUG ssh: stderr: mount: mounting //192.168.0.103/273bf68f1097d455e1fb5e53884a9122 on /var/lib/docker/docker_1452442099_51262 failed: Invalid argument

IlianYotov commented Jan 10, 2016

I ran vagrant in debug mode so here is a part of the output:

DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: mount -t cifs -o uid=`id -u docker`,gid=`getent group docker | cut -d: -f3`,sec=ntlm,credentials=/etc/smb_creds_273bf68f1097d455e1fb5e53884a9122 //192.168.0.103/273bf68f1097d455e1fb5e53884a9122 /var/lib/docker/docker_1452442099_51262 (sudo=true)
DEBUG ssh: stderr: sh:
DEBUG ssh: stderr: getent: not found
DEBUG ssh: stderr:

DEBUG ssh: stderr: mount: mounting //192.168.0.103/273bf68f1097d455e1fb5e53884a9122 on /var/lib/docker/docker_1452442099_51262 failed: Invalid argument
@Perni1984

This comment has been minimized.

Show comment
Hide comment
@Perni1984

Perni1984 Jan 12, 2016

It seems the getent call is the problem. Would you mind posting your Vagrantfile to have a closer look?

Perni1984 commented Jan 12, 2016

It seems the getent call is the problem. Would you mind posting your Vagrantfile to have a closer look?

@IlianYotov

This comment has been minimized.

Show comment
Hide comment
@IlianYotov

IlianYotov Jan 12, 2016

I try to run locally Wordpress Calypso. Here is a link to it https://github.com/Automattic/wp-calypso/blob/master/Vagrantfile

IlianYotov commented Jan 12, 2016

I try to run locally Wordpress Calypso. Here is a link to it https://github.com/Automattic/wp-calypso/blob/master/Vagrantfile

@Perni1984

This comment has been minimized.

Show comment
Hide comment
@Perni1984

Perni1984 Jan 13, 2016

the problem seems to be related to getent not being supported in boot2docker, see boot2docker/boot2docker#282 (comment) for a possible solution.

Perni1984 commented Jan 13, 2016

the problem seems to be related to getent not being supported in boot2docker, see boot2docker/boot2docker#282 (comment) for a possible solution.

@erSitzt

This comment has been minimized.

Show comment
Hide comment
@erSitzt

erSitzt Jan 16, 2016

Contributor

I came here because of problems with Vagrant using docker provider, Windows 10 and rsync (cygwin) :)

Wouldn't it work to just use something like this if we are using the docker provider and boot2docker where getent is missing ?

awk -F: '{if ($1 == "docker") {print $3} }' /etc/group

Vagrant does not have to support multiple possible OSes and user-backends through getent in this case, doesn't it ?

Contributor

erSitzt commented Jan 16, 2016

I came here because of problems with Vagrant using docker provider, Windows 10 and rsync (cygwin) :)

Wouldn't it work to just use something like this if we are using the docker provider and boot2docker where getent is missing ?

awk -F: '{if ($1 == "docker") {print $3} }' /etc/group

Vagrant does not have to support multiple possible OSes and user-backends through getent in this case, doesn't it ?

@erSitzt

This comment has been minimized.

Show comment
Hide comment
@erSitzt

erSitzt Jan 18, 2016

Contributor

It seems getent is not or not the only problem.
If i try to do the mount manually it still fails. But if i replace the credentials file with the username/password options it works.

I found this http://askubuntu.com/a/1837 and maybe tiny core behaves in the same way.

There is a tiny core extension cifs-utils.tcz which contains there files

usr/local/bin/cifscreds
usr/local/sbin/cifs.upcall
usr/local/sbin/mount.cifs
usr/local/share/doc/License/cifs-utils-authors.txt
usr/local/share/doc/License/cifs-utils-copying.txt
usr/local/share/doc/License/cifs-utils-readme.txt
usr/local/share/man/man8/cifs.upcall.8
usr/local/share/man/man8/mount.cifs.8
usr/local/tce.installed/cifs-utils
Contributor

erSitzt commented Jan 18, 2016

It seems getent is not or not the only problem.
If i try to do the mount manually it still fails. But if i replace the credentials file with the username/password options it works.

I found this http://askubuntu.com/a/1837 and maybe tiny core behaves in the same way.

There is a tiny core extension cifs-utils.tcz which contains there files

usr/local/bin/cifscreds
usr/local/sbin/cifs.upcall
usr/local/sbin/mount.cifs
usr/local/share/doc/License/cifs-utils-authors.txt
usr/local/share/doc/License/cifs-utils-copying.txt
usr/local/share/doc/License/cifs-utils-readme.txt
usr/local/share/man/man8/cifs.upcall.8
usr/local/share/man/man8/mount.cifs.8
usr/local/tce.installed/cifs-utils
@erSitzt

This comment has been minimized.

Show comment
Hide comment
@erSitzt

erSitzt Jan 18, 2016

Contributor

After adding cifs-utils to boot2docker i get this error

mount.cifs: error while loading shared libraries: libwbclient.so.0: cannot open shared object file: No such file or directory

libwbclient.so.0 is in the samba-libs package.

I will add all packages to the boot2docker image and try...

Contributor

erSitzt commented Jan 18, 2016

After adding cifs-utils to boot2docker i get this error

mount.cifs: error while loading shared libraries: libwbclient.so.0: cannot open shared object file: No such file or directory

libwbclient.so.0 is in the samba-libs package.

I will add all packages to the boot2docker image and try...

@erSitzt

This comment has been minimized.

Show comment
Hide comment
@erSitzt

erSitzt Jan 19, 2016

Contributor

If anyone is interested here is a modified boot2docker box for vagrant which contains all the necessary changes

https://atlas.hashicorp.com/buehring/boxes/boot2docker/versions/1.9.1.5

Contributor

erSitzt commented Jan 19, 2016

If anyone is interested here is a modified boot2docker box for vagrant which contains all the necessary changes

https://atlas.hashicorp.com/buehring/boxes/boot2docker/versions/1.9.1.5

@erSitzt

This comment has been minimized.

Show comment
Hide comment
@erSitzt

erSitzt Jan 20, 2016

Contributor

Maybe this works too ?
SMB mount options to not use the credentials file.
mount_options: ["username=USERNAME","password=PASSWORD"]

Contributor

erSitzt commented Jan 20, 2016

Maybe this works too ?
SMB mount options to not use the credentials file.
mount_options: ["username=USERNAME","password=PASSWORD"]

@chrisroberts chrisroberts added this to the 1.9 milestone Oct 3, 2016

@chrisroberts

This comment has been minimized.

Show comment
Hide comment
@chrisroberts

chrisroberts Dec 9, 2016

Member

Hi there,

Thanks for reporting this bug. I'm sure this was a real issue when originally reported (our fault for not looking sooner!) but there have been multiple Vagrant releases since the original report. I'm going to close this issue now and request you reopen the issue if you're still experiencing this problem. I'm sorry this wasn't looked at earlier ☹️

Cheers!

Member

chrisroberts commented Dec 9, 2016

Hi there,

Thanks for reporting this bug. I'm sure this was a real issue when originally reported (our fault for not looking sooner!) but there have been multiple Vagrant releases since the original report. I'm going to close this issue now and request you reopen the issue if you're still experiencing this problem. I'm sorry this wasn't looked at earlier ☹️

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment