I have a windows 10 host and I would like to set up Synced Folders for my vagrant box. In my Vagrantfile I have:
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.synced_folder "./data", "/vagrant_data"
end
When I start up (or reload) my box, I get prompted for credentials:
PS D:\Vagrants\first> vagrant reload
==> default: Attempting graceful shutdown of VM...
default: Configuring the VM...
default: Setting VM Enhanced session transport type to disabled/default (VMBus)
==> default: Starting the machine...
==> default: Waiting for the machine to report its IP address...
default: Timeout: 120 seconds
default: IP: 172.27.23.149
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 172.27.23.149:22
default: SSH username: vagrant
default: SSH auth method: private key
==> 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: account.
default:
default: Username (user[@domain]):
Either format I try to specify my microsoft credentials, it gets rejected. I tried both with and without windows PIN. Suppose my Microsoft account is username@outlook.com
and password is mypass
. Workgroup name on my windows machine is WORKGROUP
.
I found a solution by:
%username%
which also seems to equal to the folder named under C:\Users\USERNAME
. Note that this is not the same as my Microsoft Account username) and