chef test-kitchen configuration for Vagrant ssh connect timeout

1.8k Views Asked by At

My google-fu is failing me. what do I need to put into my .kitchen.yml in order to get it to increase the config.vm.boot_timeout or number of attempts in my Vagrantfile. My kitchen converge almost always hits:

  STDERR: Timed out while waiting for the machine to boot. This means that
  Vagrant was unable to communicate with the guest machine within
  the configured ("config.vm.boot_timeout" value) time period.

After about another minute or so I can connect without issue.

I've tried many of what I thought it could be but none seem to be setting it to all of the following:

driver:
  name: vagrant
  vm.boot_timeout: 20
  vm:
    boot_timeout: 20

driver_config:
  require_chef_omnibus: true
  vm.boot_timeout: 20
  vm:
    boot_timeout: 20

What do I need to do to get this increased?

2

There are 2 best solutions below

6
On BEST ANSWER

This isn't supported directly, but you can copy the default Vagrantfile.erb and set

driver:
  name: vagrant
  vagrantfile_erb: path/to/your/Vagrantfile.erb

or possibly: (I forget which is needed)

driver:
  name: vagrant
  config:
    vagrantfile_erb: path/to/your/Vagrantfile.erb
0
On

I added:

driver:
  name: vagrant
  boot_timeout: 1200

It appears to work, the boot_timout is already present in Vagantfile.erb, maybe because of a newer version.