vagrant-aws icon indicating copy to clipboard operation
vagrant-aws copied to clipboard

Being asked for details for SMB instead of RSYNC

Open wdmtech opened this issue 10 years ago • 12 comments

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!

wdmtech avatar Feb 26 '15 12:02 wdmtech

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.

davidski avatar Feb 26 '15 16:02 davidski

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).

michaelzhou999 avatar Mar 24 '15 20:03 michaelzhou999

Not that I've found so far.

wdmtech avatar Mar 24 '15 21:03 wdmtech

@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.

bheuvel avatar Aug 27 '15 09:08 bheuvel

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

davidski avatar Aug 27 '15 14:08 davidski

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.)

bheuvel avatar Sep 02 '15 11:09 bheuvel

How about:

config.vm.allowed_synced_folder_types = [:rsync]

See https://github.com/mitchellh/vagrant/pull/5013

rafd123 avatar Oct 30 '15 19:10 rafd123

Adding the below command worked for me.

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

hemags avatar Nov 23 '16 07:11 hemags

@bheuvel This helped me. Thank you sir.

eXist73 avatar Apr 11 '17 21:04 eXist73

@bheuvel Worked for me. Thank you.

chrisjsmith avatar Oct 31 '17 13:10 chrisjsmith

@hemags worked for me as well

bfarayev avatar Mar 15 '18 04:03 bfarayev

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.

RobertSwirsky avatar Jun 24 '19 22:06 RobertSwirsky