Discussion:
[vagrant-up] Can config.winrm.timeout be set for one specific step?
Rob Ots
2018-11-13 21:13:29 UTC
Permalink
Hi, I'm new to Vagrant and I'm wondering whether in the Vagrantfile I can
set config.winrm.timeout to a longer period for just one step?

node.vm.provision :shell do |s|
s.name = 'step A'
s.path = 'step_A.ps1'
end

node.vm.provision :shell do |s|
restore = config.winrm.timeout
config.winrm.timeout = 6000
s.name = 'step B'
s.path = 'step_B.ps1'
config.winrm.timeout = restore
end

node.vm.provision :shell do |s|
s.name = 'step C'
s.path = 'step_C.ps1'
end
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/1fad8ef0-db33-4d29-87f8-77a15a256141%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alvaro Miranda Aguilera
2018-11-13 22:09:04 UTC
Permalink
hello,

since you are inside a block created by do |s|

perhaps you can try with

s.winrm.timeout = 6000
Post by Rob Ots
Hi, I'm new to Vagrant and I'm wondering whether in the Vagrantfile I can
set config.winrm.timeout to a longer period for just one step?
node.vm.provision :shell do |s|
s.name = 'step A'
s.path = 'step_A.ps1'
end
node.vm.provision :shell do |s|
restore = config.winrm.timeout
config.winrm.timeout = 6000
s.name = 'step B'
s.path = 'step_B.ps1'
config.winrm.timeout = restore
end
node.vm.provision :shell do |s|
s.name = 'step C'
s.path = 'step_C.ps1'
end
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/1fad8ef0-db33-4d29-87f8-77a15a256141%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/1fad8ef0-db33-4d29-87f8-77a15a256141%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewJ9k50h4wq2Ock4Z5w232d519ptn5yc6hdHgwTagyaWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Rob Ots
2018-11-13 22:45:17 UTC
Permalink
Thanks Alvaro.

Trying s.winrm.timeout = 6000 unfortunately gave "There are errors in the
configuration of this machine. Please fix the following errors and try
again: shell provisioner: The following settings shouldn't exist: winrm"

R.
Post by Alvaro Miranda Aguilera
hello,
since you are inside a block created by do |s|
perhaps you can try with
s.winrm.timeout = 6000
Post by Rob Ots
Hi, I'm new to Vagrant and I'm wondering whether in the Vagrantfile I can
set config.winrm.timeout to a longer period for just one step?
node.vm.provision :shell do |s|
s.name = 'step A'
s.path = 'step_A.ps1'
end
node.vm.provision :shell do |s|
restore = config.winrm.timeout
config.winrm.timeout = 6000
s.name = 'step B'
s.path = 'step_B.ps1'
config.winrm.timeout = restore
end
node.vm.provision :shell do |s|
s.name = 'step C'
s.path = 'step_C.ps1'
end
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/1fad8ef0-db33-4d29-87f8-77a15a256141%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/1fad8ef0-db33-4d29-87f8-77a15a256141%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/dbad2334-9e7b-439a-a200-20d552c16340%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...