Smb mount on windows/hyperv gives permission denied

Hi there,

I’m trying to get a super simple vagrant box going on windows 10 (latest public release) via Hyper-V. Vagrant version is current at 2.2.14. The Vagrant file is vanilla except for the provisioner, the sync’d folder is the default:

config.vm.synced_folder “.”, “/vagrant”

When I vagrant up, I get prompted for a username. I am setup on a domain. I try bare username and pass, this doesn’t work. I try username@domain.name, exactly as it is in active directory, vagrant doesn’t like this either. When I use DOMAIN\username, vagrant finally creates the shares and moves on. Oddly enough \username also works, without the domain, I guess some part of the process uses the default domain? Moot, moving on.

When vagrant tries to mount the smb share inside the virtual machine, it throws a permission denied error trying to mount the share. Here is the command it’s trying to run:

mount -t cifs -o vers=2.0,credentials=/etc/smb_creds_vgt-b73eda03e53655bcd75fa01efa056dcc-6ad5fdbcbf2eaa93bd62f92333a2e6e5,uid=1000,gid=1000,mfsymlinks,_netdev //172.28.208.1/vgt-b73eda03e53655bcd75fa01efa056dcc-6ad5fdbcbf2eaa93bd62f92333a2e6e5 /vagrant

Now, when I vagrant ssh into the box (centos8) and use the exact command, replacing the credentials fie with username=myusername, it asks me for my password and works. For username I just use bare username, no domain name or backslashes.

Any tricks here? I believe there is (older?) code I can trigger by specifying a username and password in the Vagrantfile as mount options, but I’d prefer to avoid that and be prompted. Should vagrant be failing to create shares when specifying my username in its proper modern domain form, username@domain.name?

Thanks for any help,
Josh

Not sure if you solved this, but sounds like the same thing I experienced. I believe this is related to a regression in Vagrant 2.2.10:

For me, I had to downgrade to Vagrant 2.2.9