saschagottfried / fds-openmp-benchmark

reproducible work environment for Fire Dynamics Simulator

Home Page:http://saschagottfried.github.io/fds-openmp-benchmark/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vagrant fails to mount SMB synced folder using Windows 10 & Hyper-V

saschagottfried opened this issue · comments

Using Vagrant 1.7.4, Windows 10 Enterprise, Hyper-V with external virtual switch. The directory is in my user profile. The machine is a domain member: while vagrant up pass smb username as user@domain - as recommended in vagrant docs

C:\users\s.gottfried\workspace\fds-openmp-benchmark [master +0 ~2 -0]> vagrant up
Bringing machine 'default' up with 'hyperv' provider...
==> default: Verifying Hyper-V is enabled...
==> default: Starting the machine...
==> default: Waiting for the machine to report its IP address...
    default: Timeout: 120 seconds
    default: IP: 10.0.100.51
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 10.0.100.51:22
    default: SSH username: vagrant
    default: SSH auth method: password
==> default: Machine booted and ready!
==> 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: s.gottfried@universe
    default: Password (will be hidden):
==> default: Mounting SMB shared folders...
    default: C:/Users/s.gottfried/workspace/fds-openmp-benchmark => /vagrant
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 vagrant`,gid=`getent group vagrant | cut -d: -f3`,sec=ntlm,username=s.gottfried,password=PASSWORDHIDDEN,domain=universe //10.0.100.178/f744c4c0198078b5268ecced922313e8 /vagrant
mount -t cifs -o uid=`id -u vagrant`,gid=`id -g vagrant`,sec=ntlm,username=s.gottfried,password=PASSWORDHIDDEN,domain=universe //10.0.100.178/f744c4c0198078b5268ecced922313e8 /vagrant

The error output from the last command was:

stdin: is not a tty
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

My shares

Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

Y:\>net share

Name         Ressource                       Beschreibung

-------------------------------------------------------------------------------
C$           C:\                             Standardfreigabe
print$       C:\WINDOWS\system32\spool\drivers
                                             Druckertreiber
IPC$                                         Remote-IPC
ADMIN$       C:\WINDOWS                      Remoteverwaltung
f744c4c0198078b5268ecced922313e8
             C:\Users\s.gottfried\workspace\fds-openmp-benchmark

Der Befehl wurde erfolgreich ausgeführt.

I experienced the same issue but I realized that once I entered the correct windows credentials as instructed everything worked like a charm.

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: maxl
default: Password (will be hidden):

Once I realized this was prompting me for my windows account credentials it was all good.

Using Vagrant 1.8.1

I did enter my user account credentials (look at the excerpt below).

    default: Username: s.gottfried@universe
    default: Password (will be hidden):
==> default: Mounting SMB shared folders...
    default: C:/Users/s.gottfried/workspace/fds-openmp-benchmark => /vagrant
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 vagrant`,gid=`getent group vagrant | cut -d: -f3`,sec=ntlm,username=s.gottfried,password=PASSWORDHIDDEN,domain=universe //10.0.100.178/f744c4c0198078b5268ecced922313e8 /vagrant
mount -t cifs -o uid=`id -u vagrant`,gid=`id -g vagrant`,sec=ntlm,username=s.gottfried,password=PASSWORDHIDDEN,domain=universe //10.0.100.178/f744c4c0198078b5268ecced922313e8 /vagrant

The error output from the last command was:

stdin: is not a tty
mount error(13): Permission denied

As far as I know this bug is/was caused by using domain user account. I think I could mitigate this by creating a local user account, but I never to the time since creating this issue. Newer vagrant versions or other/guest OS could do as expected. The wheel is spinning very fast these days.

May I ask how you came across this issue? Is this related to vagrant and stuff or rather to FDS/OpenMP?

I have the exact setup you described in the subject Windows 10/Hyper-V/Vagrant with smb synced folders except that I am using Vagrant 1.8.1. I was getting the exact same error with different "command attempted" details but the mount error(13): Permission denied at the bottom is the same which makes me think it's just because whatever windows account you are logging in with doesn't have the proper file system permissions on the windows host machine. I am logging in with my windows user account which has administrator rights on my machine. Assuming you are using valid windows credentials I would assume the problem is with the file system permissions.

Perhaps try logging in with just the username and not the domain. I am just logging in as maxl not maxl@domain

Yep, that fixes it. Vagrant should really accept domain-decorated username, as well, since that is fairly universal on Windows.

I used:

config.vm.synced_folder ".", "/home/vagrant/workspace"

in my vagrantfile, this works for me and share normally mounted.

This bug is at thing of the past and has been fixed in recent versions of Vagrant.

This bug is at thing of the past and has been fixed in recent versions of Vagrant.

I`m using the last version

C:\Users\Alex>vagrant -v
Vagrant 2.2.5

Also try user@domain, not domain\user. This is apparently documented but I glazed over this myself.

I was wasting tons of time on this only to realize that Vagrant was indeed accepting a non-standard syntax.

I used this:
config.vm.synced_folder ".", "/home/vagrant/workspace"

it`s working for me and resolved the error.

Can anyone provide guidance for how I should be expressing my username and password on a personal Windows 10 machine that uses my Microsoft account (myuser@outlook.com) as my user login in lieu of a local account. I seem to get permission denied for all derivations that I can think of: myuser, myuser@outlook, myuser@outlook.com

@bushidocodes May I ask if your problem is related to running Fire Dynamics Simulator in a Vagrant machine?

@saschagottfried - Oh my. Just noticed the repo I'm commenting in. Not sure how I got so disoriented. Apologies! Please disregard my comments.

Make sure disable or allow your firewall and antivirus software to allow network transaction I spent many hours to get this :)

Thank you!
I had been trying everything I could think of and kept getting the "Permission denied" message.

then I just tried the username as it is listed in my Environment variable and that worked with my current domain password.

@bushidocodes you might want to see what your environment variable has listed and try that.

@bushidocodes and anybody else facing this Vagrant issue:

  1. The username being asked for is the one you get when you run $Env:USERNAME in PowerShell.
  2. The password being asked for is the one you would use for login into the current Windows user account on that host machine. This may differ from your Microsoft account password if you have recently changed that one (this is the case for me).

I hope this helps!

As @fernandogmo said, it only worked for me using mywindowsuser@mywindowshostname, with my "onedrive/microsoft" password (in case like me, you signed using the confuse microsoft/msn/skype/live/onedrive account)

Broken on current version 2.2.19. When I try to log in with just username or username@domain my credentials get rejected. If I do whoami I get domain\username, and when I log in with that format, my credentials are accepted, but then my VM mount exits with mount error(13): Permission denied. The same setup works fine with on a Windows machine that is not attached to a domain.