{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/vagrant/issues/10111","repository_url":"https://api.github.com/repos/hashicorp/vagrant","labels_url":"https://api.github.com/repos/hashicorp/vagrant/issues/10111/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/vagrant/issues/10111/comments","events_url":"https://api.github.com/repos/hashicorp/vagrant/issues/10111/events","html_url":"https://github.com/hashicorp/vagrant/issues/10111","id":350079205,"node_id":"MDU6SXNzdWUzNTAwNzkyMDU=","number":10111,"title":"Issue with synced folders when using non-default providers","user":{"login":"whiggs","id":11139575,"node_id":"MDQ6VXNlcjExMTM5NTc1","avatar_url":"https://avatars0.githubusercontent.com/u/11139575?v=4","gravatar_id":"","url":"https://api.github.com/users/whiggs","html_url":"https://github.com/whiggs","followers_url":"https://api.github.com/users/whiggs/followers","following_url":"https://api.github.com/users/whiggs/following{/other_user}","gists_url":"https://api.github.com/users/whiggs/gists{/gist_id}","starred_url":"https://api.github.com/users/whiggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whiggs/subscriptions","organizations_url":"https://api.github.com/users/whiggs/orgs","repos_url":"https://api.github.com/users/whiggs/repos","events_url":"https://api.github.com/users/whiggs/events{/privacy}","received_events_url":"https://api.github.com/users/whiggs/received_events","type":"User","site_admin":false},"labels":[{"id":867573456,"node_id":"MDU6TGFiZWw4Njc1NzM0NTY=","url":"https://api.github.com/repos/hashicorp/vagrant/labels/needs-debug-gist","name":"needs-debug-gist","color":"f4ec49","default":false},{"id":54083443,"node_id":"MDU6TGFiZWw1NDA4MzQ0Mw==","url":"https://api.github.com/repos/hashicorp/vagrant/labels/waiting-reply","name":"waiting-reply","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-13T15:28:29Z","updated_at":"2018-08-15T21:46:33Z","closed_at":"2018-08-15T21:46:33Z","author_association":"NONE","body":"There seems to be something wrong with the synced folder feature when attempting to run spin up vms using external provisioners.  For example, I have tested and confirmed that this issue occurs using both the vagrant-vsphere provider as well as the vagrant-azure provider.  Essentially, vagrant will always attempt to configure synced folders via smb, even when the guest operating system does not support smb (eg linux), even when I specifically leave out any sync folder configurations, even when I specifically configure a different sync folder option (in which case, the sync method I had configured will run after the smb sync process either fails or goes through), no matter what I do, no matter what I try, vagrant's automation always breaks when I am prompted to enter my credentials to set up smb shares, which is extremely annoying when I am trying to spin up a guest vm that doesn't even support smb shares.  Funny thing is, in cases where os does not support smb shares, even if I specifically configure all of the smb share information (including user name and password) into the vagrantfile, **I am still prompted to enter my credentials when vagrant tries to set up the smb share, completely breaking vagrant's automation.**  And before someone tries to reflect the blame to the external providers, I have looked into this a bit myself (as I thought it was the provisioners that were the problem), but the all the \"action.rb\" file in the provisioner's plugin does is call the \"SyncedFolders\" gem (sorry, not familiar with Ruby termonology, so that may be wrong) which is built into the main Vagrant application.  Therefore, one can only come to the conclusion that this is an issue with the main vagrant application. \r\n\r\n### Vagrant version\r\nVagrant 2.1.2\r\n\r\n### Host operating system\r\nOS Name:                   Microsoft Windows 10 Enterprise\r\nOS Version:                10.0.17134 N/A Build 17134\r\n\r\n### Guest operating system\r\nBoth linux and windows guest operating systems are affected, but Ubuntu server 18.04 LTS displays all of the issues\r\n\r\n### Vagrantfile\r\n```ruby\r\n\r\n$script = <<-SCRIPT\r\n\tapt update\r\n\tapt upgrade\r\n\tapt install -y curl\r\n\tcurl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -\r\n\tcurl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/18.04/prod.list\r\n\tapt-get update\r\n\tapt-get install -y powershell-preview\r\n\tapt install -y wget\r\n\tapt install -y make\r\n\tSCRIPT\r\nVagrant.configure(\"2\") do |config|\r\n\tconfig.vm.box = \"atlas_shrugged/vsphere_dummy\"\r\n\tconfig.vm.box_check_update = true\r\n\tconfig.vm.communicator = \"ssh\"\r\n\tconfig.vm.guest = :linux\r\n\tconfig.ssh.username = \"vagrant\"\r\n\tconfig.ssh.password = \"vagrant\"\r\n\tconfig.ssh.keep_alive = true\r\n\r\n\tconfig.vm.synced_folder \"packages\", \"/packages\", type: \"rsync\"\r\n\tconfig.vm.provision \"shell\", inline: $script, privileged: true\r\n\tconfig.vm.provider :vsphere do |vsphere, override|\r\n\t\tvsphere.host = 'ahost.somewhere.com'\r\n\t\tvsphere.insecure = true\r\n\t\tvsphere.cpu_count = 4\r\n\t\tvsphere.memory_mb = 12288\r\n\t\tvsphere.compute_resource_name = 'Test Environment'\r\n\r\n\t\tvsphere.template_name = '/Templates/vagubuntu'\r\n\t\tvsphere.vm_base_path = \"B.Local/Hyperion\"\r\n\t\tvsphere.name = 'ubuvagr'\r\n\t\tvsphere.user = 'something'\r\n\t\tvsphere.password = 'here'\r\n\tend\r\n  end\r\n```\r\n\r\nPlease note, if you are using Homestead or a different Vagrantfile format, we\r\nmay be unable to assist with your issue. Try to reproduce the issue using a\r\nvanilla Vagrantfile first.\r\n\r\n\r\n\r\n### Expected behavior\r\nvagrant should sync the indicated folder using rsync.\r\n\r\n### Actual behavior\r\nVagrant attempts to sync the indicated folder via smb and prompts for the credentials to use.  After the smb connection fails, it is then and only then that vagrant will attempt to sync the folder using the sync option I specified and want to use.\r\n\r\n### Steps to reproduce\r\n1. run vagrant up with one of the two vagrant providers I mentioned (vagrant-vsphere or vagrant-azure) or just run the vagrantfile included in this issue.\r\n2.\r\n3.\r\n\r\n### References\r\nAre there any other GitHub issues (open or closed) that should be linked here?\r\nFor example:\r\n- GH-1234\r\n- ...\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/vagrant/issues/comments/413348471","html_url":"https://github.com/hashicorp/vagrant/issues/10111#issuecomment-413348471","issue_url":"https://api.github.com/repos/hashicorp/vagrant/issues/10111","id":413348471,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzM0ODQ3MQ==","user":{"login":"briancain","id":810277,"node_id":"MDQ6VXNlcjgxMDI3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/810277?v=4","gravatar_id":"","url":"https://api.github.com/users/briancain","html_url":"https://github.com/briancain","followers_url":"https://api.github.com/users/briancain/followers","following_url":"https://api.github.com/users/briancain/following{/other_user}","gists_url":"https://api.github.com/users/briancain/gists{/gist_id}","starred_url":"https://api.github.com/users/briancain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briancain/subscriptions","organizations_url":"https://api.github.com/users/briancain/orgs","repos_url":"https://api.github.com/users/briancain/repos","events_url":"https://api.github.com/users/briancain/events{/privacy}","received_events_url":"https://api.github.com/users/briancain/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T21:46:33Z","updated_at":"2018-08-15T21:46:33Z","author_association":"MEMBER","body":"Hi @whiggs - yes, you could export your smb settings as environment variables, or store them in a file on disk and read them in your Vagrantfile. I'm going to go ahead and close this issue since it's not a Vagrant bug, thanks!"}}
{"actor":{"display_login":"briancain"}}