some times Vagrant is failed to synching share folders to guest VM

141 views
Skip to first unread message

ashok vaddevalli

unread,
Dec 14, 2017, 1:25:47 AM12/14/17
to Vagrant

Vagrant version

2.0.1

Host operating system

Windows 7

Guest operating system

Windows 7

Vagrantfile

-- mode: ruby --

vi: set ft=ruby :

#Author: Ashok Vaddevalli

Vagrant.configure("2") do |config|

config.vm.box = 'dummy'
config.vm.box_url = 'dummy.box'

#config.vm.network "private_network", ip: ENV["ip"]

config.vm.communicator = "winrm"
config.winrm.username = "admin"
config.winrm.password = "admin@123"
config.winrm.timeout = 1800
config.vm.boot_timeout = 600

config.vm.synced_folder "./src", "/src", type: "smb", smb_username: "administrator", smb_password: "admin@123"

config.vm.synced_folder "./Result", "/Result", type: "smb", smb_username: "administrator", smb_password: "admin@123"

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

config.vm.provider :vsphere do |vsphere|
vsphere.host = 'X.X.X.X'
#vsphere.customization_spec_name = 'Win7-Custom_template'
vsphere.compute_resource_name = 'X.X.X.X'
vsphere.data_center_name = 'Demo'
vsphere.template_name = 'Templates/InstallerAutomation'
vsphere.name = 'InstallerAuto'
vsphere.user = 'admini...@vsphere.local'
vsphere.password = ENV["vsphere.password"]
vsphere.insecure = true
end

config.vm.provision "shell", inline: "C:/src/setupandrunautomation.bat"

end

Expected behavior

==> default: Waiting for machine to boot. This may take a few minutes...
default: WinRM address: X.X.X.X:5985
default: WinRM username: admin
default: WinRM execution_time_limit: PT2H
default: WinRM transport: negotiate
==> default: Machine booted and ready!
==> default: Preparing SMB shared folders...
==> default: Mounting SMB shared folders...
default: C:/InstallerAutomation/src => /src
default: C:/InstallerAutomation/Result => /Result
==> default: Running provisioner: shell...
default: Running: inline PowerShell script
default: 1 file(s) moved.

Actual behavior

==> default: Mounting SMB shared folders...
default: C:/InstallerAutomation/src => /src
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cmdkey /add:X.X.X.X /user:administrator /pass:admin@123

Stdout from the command:

Stderr from the command:

Steps to reproduce

  1. Re run Vagrant up second time, it was synchronizing share folders, sometimes u can re run vagrant up multiple times for share folders synchronization.

I am facing share folders synchronization recent only, last ten builds i have not seen this issue.

Alvaro Miranda Aguilera

unread,
Dec 14, 2017, 6:14:54 AM12/14/17
to vagra...@googlegroups.com
hello

the box does and the host have all the needed to use smb?

how to reproduce? your vagrantfile says dummy for box

Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/98d802cd-6924-477b-a890-53548804314e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Message has been deleted

ashok vaddevalli

unread,
Dec 14, 2017, 6:53:46 AM12/14/17
to Vagrant
I am using Vagrant with Vsphere provider.
 
By default it is required dummy box, I am using template to create guest VM. The issue is not creating VM, synchronizing share folders.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Dec 14, 2017, 2:08:13 PM12/14/17
to vagra...@googlegroups.com
Hello

vsphere plugin is not native to vagrant

can you open an issue on the plugin repo?

Alvaro.

ashok vaddevalli

unread,
Dec 14, 2017, 9:33:49 PM12/14/17
to Vagrant
Hi Alvaro,

Yes, vsphere plugin is not native to vagrant. But the issue is not plugin, I think vagrant issue.

Please check below URL

https://stackoverflow.com/questions/31990885/vagrant-unable-to-mount-smb-after-upgrade-to-1-7-4

Regards,
Ashok

ashok vaddevalli

unread,
Dec 15, 2017, 11:37:28 AM12/15/17
to Vagrant
Sorry. looks  like the below URL is the credentials issue
https://stackoverflow.com/questions/31990885/vagrant-unable-to-mount-smb-after-upgrade-to-1-7-4

I have attached my vagrant vsphere debug log, can you please check once and let me know what is the issue on vagrant is not synching share folders.

Thanks in advance.

Regards,
Ashok
Vagrant_Vsphere_Debuglog

ashok vaddevalli

unread,
Jan 19, 2018, 1:54:27 AM1/19/18
to Vagrant

I have not seen this issue after done few settings in both host machine and guest machine templates.

The below settings I have done,

  1. net config server /autodisconnect:-1
  2. Increased SMB timeout time.
Reply all
Reply to author
Forward
0 new messages