Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Being asked for details for SMB instead of RSYNC #365

Open
wdmtech opened this issue Feb 26, 2015 · 12 comments
Open

Being asked for details for SMB instead of RSYNC #365

wdmtech opened this issue Feb 26, 2015 · 12 comments

Comments

@wdmtech
Copy link

wdmtech commented Feb 26, 2015

Hey there.

Host: Windows 7

I am being asked for details for SMB instead of RSYNC when using vagrant-aws. Is there any way to force RSYNC? Or am I doing something completely wrong?

VagrantFile:

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|

  config.vm.box = "dummy"

  config.vm.provider :aws do |aws, override|
    aws.access_key_id = "blerpblerpblerpblerpblerpblerp"
    aws.secret_access_key = "S/blerpblerpblerpblerpblerpblerpblerpblerp"
    aws.keypair_name = "blerp"
    aws.region = 'us-west-2'
    aws.instance_type = 't1.micro'
    aws.security_groups = "blerp"

    aws.ami = "ami-a850c898"

    override.ssh.username = "ubuntu"
    override.ssh.private_key_path = "C:\\keys\\blerp.pem"

  end
end

Output:

C:\xampp\htdocs\DEV\vagrant_aws_test>vagrant up
Bringing machine 'default' up with 'aws' provider...
==> 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:
    ...

Thanks!

@davidski
Copy link

Oh, how I loathe the Vagrant SMB sharing feature. :(

The workaround for this is to not run your command prompt with admin privileges. Using current vagrant and vagrant-aws with a regular user shell allows me to launch without the SMB sharing code (which never works for me) from firing.

@michaelzhou999
Copy link

Is there a way to force a different sync mechanism? It looks like even if I set the sync option to "rsync", "smb" is still used when it comes to running the provisioner (I have chef solo configurations).

@wdmtech
Copy link
Author

wdmtech commented Mar 24, 2015

Not that I've found so far.

@bheuvel
Copy link

bheuvel commented Aug 27, 2015

@michaelzhou999 still an issue?
How did you " set the sync option to "rsync" "? What works for me is:
config.vm.synced_folder ".", "/vagrant", disabled: false, type: 'rsync'
which "overwrites" the default sync definition.

@davidski
Copy link

@bheuvel That works for the vagrant shared folders, but chef shared folders will still try to use SMB. 😢

@bheuvel
Copy link

bheuvel commented Sep 2, 2015

For chef syncedfolders I think it would be like:

  config.vm.provision "chef_zero" do |chef|
    chef.synced_folder_type = "rsync"
  end

(Hope it helps. I'm not using aws plugin, but this works for me for the cloudstack plugin using (forcing to) winrm.)

@rafd123
Copy link

rafd123 commented Oct 30, 2015

How about:

config.vm.allowed_synced_folder_types = [:rsync]

See hashicorp/vagrant#5013

@hemags
Copy link

hemags commented Nov 23, 2016

Adding the below command worked for me.

config.vm.synced_folder ".", "/vagrant", disabled: true

@eXist73
Copy link

eXist73 commented Apr 11, 2017

@bheuvel This helped me. Thank you sir.

@chrisjsmith
Copy link

@bheuvel Worked for me. Thank you.

@bfarayev
Copy link

@hemags worked for me as well

russ-ab added a commit to russ-ab/puphpet that referenced this issue Jul 18, 2018
On Vagrant >= 2.0 the sync folder type by default is SMB on macOS, so we need to force it to use rsync.

Refs: 
puphpet#2764
hashicorp/vagrant#9960
mitchellh/vagrant-aws#365
devopsgroup-io/vagrant-digitalocean#277
thejandroman pushed a commit to thejandroman/vagrant-lightsail that referenced this issue Aug 15, 2018
Probably overkill but basically implemented everything from
mitchellh/vagrant-aws#365
joe4dev added a commit to sealuzh/cwb-chef-repo that referenced this issue Aug 16, 2018
* Fix SMB username prompt: mitchellh/vagrant-aws#365
* Update versions
* Remove legacy database cookbook attributes
@RobertSwirsky
Copy link

How about:

config.vm.allowed_synced_folder_types = [:rsync]

See hashicorp/vagrant#5013

This worked for me! I haven't run a vagrant up using vagrant-aws for about 5 months and I go t the "SMB" prompt. This fixed it. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants