Could not create a vm instance while using kitchen in chef infra

While listing, 'kitchen list' it showed 2 vms ubuntu and centos.
after that with kitchen create, ubuntu gets created successfully but centos doesnt. so i seperately ran it again.
here are the errors.

$ kitchen create centos
-----> Starting Test Kitchen (v3.1.0)
-----> Creating ...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-8'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-8' version '202109.10.0' is up to date...
==> default: Setting the name of the VM: kitchen-learn_chef-default-centos-8-e69df454-69e6-42b4-9206-425aee3addfc
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
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.

  If you look above, you should be able to see the error(s) that
  Vagrant had when attempting to connect to the machine. These errors
  are usually good hints as to what may be wrong.
   
  If you're using a custom box, make sure that networking is properly
  working and you're able to connect to the machine. It is a common
  problem that networking isn't setup properly in these boxes.
  Verify that authentication configurations are also setup properly,
  as well.
   
  If the box appears to be booting properly, you may want to increase
  the timeout ("config.vm.boot_timeout") value.

------Exception-------
Class: Kitchen::ActionFailed
Message: 1 actions failed.
Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT: Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-8'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-8' version '202109.10.0' is up to date...
==> default: Setting the name of the VM: kitchen-learn_chef-default-centos-8-e69df454-69e6-42b4-9206-425aee3addfc
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
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.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1] on default-centos-8


Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

Result of
Kitchen list

I am doing this by referencing chef Infra course at learn.chef.io

Hey @Rishabh_07 , which learn.chef.io course are you taking?

What happens when you run: vagrant status ?


@Dan_Webb

Fleet with chef infra...
Something like that

Things are very complicated here.
In the above post, it created ubuntu first and then CentOS,
So ubuntu gets verified and created successfully but CentOS doesn't.

Say, this time I intentionally create CentOS first the ubuntu, same thing happens around.

I used kitchen diagnose, doctor, re-initiallised vagrant..., But nothing works

Screenshot_2021-10-19-22-54-12-50_680d03679600f7af0b4c700c6b270fe7
This is what I am getting when started an vm instance during "kitchen create ubuntu" or "vagrant up "

Are you able to share your code, it's a little hard to debug without knowing what you've told Test Kitchen to do :smile:

in my directory learn_chef, i have following:

base CHANGELOG.md chefignore kitchen.yml LICENSE metadata.rb Policyfile.lock.json PolicyFile.rb README.md recipes test Vagrantfile

*******cd .kitchen/logs/kitchen.logs

            *****contents of kitchen.log**********

I, [2021-10-19T22:38:01.296405 #59473] INFO -- Kitchen: -----> Starting Test Kitchen (v3.1.0)
I, [2021-10-19T22:38:02.718089 #59473] INFO -- Kitchen: -----> Creating ...
E, [2021-10-19T22:43:25.415936 #59473] ERROR -- Kitchen: ------Exception-------
E, [2021-10-19T22:43:25.417940 #59473] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2021-10-19T22:43:25.418027 #59473] ERROR -- Kitchen: Message: 1 actions failed.

Failed to complete #create action: [Expected process to exit with [0], but received '1'

---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT: Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-20.04' version '202107.28.0' is up to date...
==> default: Setting the name of the VM: kitchen-learn_chef-default-ubuntu-2004-8dc31fd8-d005-4cf6-9174-60a965a88ccb
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
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.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1] on default-ubuntu-2004
E, [2021-10-19T22:43:25.418055 #59473] ERROR -- Kitchen: ----------------------
E, [2021-10-19T22:43:25.418106 #59473] ERROR -- Kitchen: ------Backtrace-------
E, [2021-10-19T22:43:25.418128 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command.rb:181:in report_errors' E, [2021-10-19T22:43:25.418179 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command.rb:172:in run_action'
E, [2021-10-19T22:43:25.418214 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command/action.rb:35:in block in call' E, [2021-10-19T22:43:25.418271 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/3.0.0/benchmark.rb:293:in measure'
E, [2021-10-19T22:43:25.418293 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command/action.rb:33:in call' E, [2021-10-19T22:43:25.418310 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/cli.rb:52:in perform'
E, [2021-10-19T22:43:25.418365 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/cli.rb:198:in block (2 levels) in <class:CLI>' E, [2021-10-19T22:43:25.418384 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in run'
E, [2021-10-19T22:43:25.418401 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in invoke_command' E, [2021-10-19T22:43:25.418455 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in dispatch'
E, [2021-10-19T22:43:25.418484 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/base.rb:485:in start' E, [2021-10-19T22:43:25.418541 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/bin/kitchen:11:in block in <top (required)>'
E, [2021-10-19T22:43:25.418559 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/errors.rb:170:in with_friendly_errors' E, [2021-10-19T22:43:25.418573 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/bin/kitchen:11:in <top (required)>'
E, [2021-10-19T22:43:25.418623 #59473] ERROR -- Kitchen: /usr/bin/kitchen:376:in load' E, [2021-10-19T22:43:25.418653 #59473] ERROR -- Kitchen: /usr/bin/kitchen:376:in '
E, [2021-10-19T22:43:25.418700 #59473] ERROR -- Kitchen: ----End Backtrace-----
E, [2021-10-19T22:43:25.418725 #59473] ERROR -- Kitchen: -Composite Exception--
E, [2021-10-19T22:43:25.418771 #59473] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2021-10-19T22:43:25.418809 #59473] ERROR -- Kitchen: Message: Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT: Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-20.04' version '202107.28.0' is up to date...
==> default: Setting the name of the VM: kitchen-learn_chef-default-ubuntu-2004-8dc31fd8-d005-4cf6-9174-60a965a88ccb
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
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.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1] on default-ubuntu-2004
E, [2021-10-19T22:43:25.418864 #59473] ERROR -- Kitchen: ----------------------
E, [2021-10-19T22:43:25.418885 #59473] ERROR -- Kitchen: ------Backtrace-------
E, [2021-10-19T22:43:25.418905 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/shell_out.rb:70:in rescue in run_command' E, [2021-10-19T22:43:25.418949 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/shell_out.rb:57:in run_command'
E, [2021-10-19T22:43:25.418985 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-vagrant-1.10.0/lib/kitchen/driver/vagrant.rb:481:in run_command' E, [2021-10-19T22:43:25.419034 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-vagrant-1.10.0/lib/kitchen/driver/vagrant.rb:428:in run'
E, [2021-10-19T22:43:25.419069 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-vagrant-1.10.0/lib/kitchen/driver/vagrant.rb:532:in run_vagrant_up' E, [2021-10-19T22:43:25.419120 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-vagrant-1.10.0/lib/kitchen/driver/vagrant.rb:117:in create'
E, [2021-10-19T22:43:25.419147 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:495:in public_send' E, [2021-10-19T22:43:25.419164 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:495:in block in perform_action'
E, [2021-10-19T22:43:25.419180 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:560:in block in synchronize_or_call' E, [2021-10-19T22:43:25.419233 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:558:in synchronize'
E, [2021-10-19T22:43:25.419250 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:558:in synchronize_or_call' E, [2021-10-19T22:43:25.419264 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:524:in block in action'
E, [2021-10-19T22:43:25.419318 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/3.0.0/benchmark.rb:293:in measure' E, [2021-10-19T22:43:25.419338 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:523:in action'
E, [2021-10-19T22:43:25.419393 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:495:in perform_action' E, [2021-10-19T22:43:25.419415 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:404:in create_action'
E, [2021-10-19T22:43:25.419429 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:392:in block (2 levels) in transition_to' E, [2021-10-19T22:43:25.419443 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/lifecycle_hooks.rb:47:in run_with_hooks'
E, [2021-10-19T22:43:25.419504 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:391:in block in transition_to' E, [2021-10-19T22:43:25.419526 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:390:in each'
E, [2021-10-19T22:43:25.419573 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:390:in transition_to' E, [2021-10-19T22:43:25.419606 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:128:in create'
E, [2021-10-19T22:43:25.419623 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command.rb:195:in public_send' E, [2021-10-19T22:43:25.419676 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command.rb:195:in run_action_in_thread'
E, [2021-10-19T22:43:25.419693 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command.rb:166:in `block (2 levels) in run_action'
E, [2021-10-19T22:43:25.419752 #59473] ERROR -- Kitchen: ----End Backtrace-----
E, [2021-10-19T22:43:25.419779 #59473] ERROR -- Kitchen: ---Nested Exception---
E, [2021-10-19T22:43:25.419794 #59473] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2021-10-19T22:43:25.419836 #59473] ERROR -- Kitchen: Message: Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT: Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-20.04' version '202107.28.0' is up to date...
==> default: Setting the name of the VM: kitchen-learn_chef-default-ubuntu-2004-8dc31fd8-d005-4cf6-9174-60a965a88ccb
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
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.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1]
E, [2021-10-19T22:43:25.419878 #59473] ERROR -- Kitchen: ----------------------
E, [2021-10-19T22:43:25.419896 #59473] ERROR -- Kitchen: ------Backtrace-------
E, [2021-10-19T22:43:25.419960 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/shell_out.rb:70:in rescue in run_command' E, [2021-10-19T22:43:25.419980 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/shell_out.rb:57:in run_command'
E, [2021-10-19T22:43:25.419995 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-vagrant-1.10.0/lib/kitchen/driver/vagrant.rb:481:in run_command' E, [2021-10-19T22:43:25.420046 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-vagrant-1.10.0/lib/kitchen/driver/vagrant.rb:428:in run'
E, [2021-10-19T22:43:25.420065 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-vagrant-1.10.0/lib/kitchen/driver/vagrant.rb:532:in run_vagrant_up' E, [2021-10-19T22:43:25.420082 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-vagrant-1.10.0/lib/kitchen/driver/vagrant.rb:117:in create'
E, [2021-10-19T22:43:25.420151 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:495:in public_send' E, [2021-10-19T22:43:25.420170 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:495:in block in perform_action'
E, [2021-10-19T22:43:25.420207 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:560:in block in synchronize_or_call' E, [2021-10-19T22:43:25.420234 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:558:in synchronize'
E, [2021-10-19T22:43:25.420249 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:558:in synchronize_or_call' E, [2021-10-19T22:43:25.420297 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:524:in block in action'
E, [2021-10-19T22:43:25.420322 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/3.0.0/benchmark.rb:293:in measure' E, [2021-10-19T22:43:25.420338 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:523:in action'
E, [2021-10-19T22:43:25.420395 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:495:in perform_action' E, [2021-10-19T22:43:25.420415 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:404:in create_action'
E, [2021-10-19T22:43:25.420469 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:392:in block (2 levels) in transition_to' E, [2021-10-19T22:43:25.420489 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/lifecycle_hooks.rb:47:in run_with_hooks'
E, [2021-10-19T22:43:25.420533 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:391:in block in transition_to' E, [2021-10-19T22:43:25.420555 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:390:in each'
E, [2021-10-19T22:43:25.420570 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:390:in transition_to' E, [2021-10-19T22:43:25.420607 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/instance.rb:128:in create'
E, [2021-10-19T22:43:25.420635 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command.rb:195:in public_send' E, [2021-10-19T22:43:25.420649 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command.rb:195:in run_action_in_thread'
E, [2021-10-19T22:43:25.420692 #59473] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/test-kitchen-3.1.0/lib/kitchen/command.rb:166:in `block (2 levels) in run_action'
E, [2021-10-19T22:43:25.420753 #59473] ERROR -- Kitchen: ----End Backtrace-----

                       *****************************************************

under recipes folder, i have these files:
default.rb kitchen.yml earn-chef.yml

contents of default.rb:**

include_recipe "learn_chef::learn-chef"

                                                           ********

contents of kitchen.yml:*


driver:
name: vagrant

provisioner:
name: chef_solo

platforms:

  • name: ubuntu-20.04
  • name: centos-8

suites:

  • name: default
    run_list:
    • recipe[learn_chef::default]
      attributes:

                                                     ******************
      

****contents of learn-chef.yml

resources:

  • type: "file"
    name: "/etc/motd"
    content: "Learning Chef is fun with YAML!"

                                              ************************
    

I couldn't share the files here, so I pasted contents of some.

It looks like a resource issue, or that is what the message is referring to as it is timing out whilst creating the second vagrant vm:
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.

This is most likely because the box you are trying to run kitchen on probably isn't powerful enough to run more than one Vagrant VM.

You may want to try docker as a provisioner so change the driver configuration to read:

driver:
  name: docker

(you may need to install docker first)