I tried to do kitchen create with this kitchen.yml:
---
driver_plugin: vagrant
transport:
name: ssh
ssh_key: /home/aida/Documents/chef-repo/.chef/aida.pem
provisioner:
name: chef_solo
driver_config:
provider: libvirt
platforms:
- name: rhel7
driver_config:
box: qcow-libvrit
box_url: file:///home/aida/Documents/packer/builds/libvirt-centos7.box
customize:
memory: 1024
network:
- ['private_network', {ip: '192.168.33.33'}]
suites:
- name: default
run_list:
- recipe[gtd_buildhost::default]
attributes:
but I couldnt do it!
I got:
-----> Starting Kitchen (v1.16.0)
-----> Creating <default-rhel7>...
Bringing machine 'default' up with 'libvirt' provider...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
even, vagrant up is not working and I couldn't understand what is the issue!
So I change my kitchen.yml to:
---
driver_plugin: vagrant
transport:
name: ssh
ssh_gateway_username: vagrant
username: vagrant
password: vagrant
ssh_key: /home/aida/Documents/chef-repo/.chef/aida.pem
provisioner:
name: chef_solo
driver_config:
provider: libvirt
platforms:
- name: rhel7
driver_config:
box: qcow-libvrit
box_url: file:///home/aida/Documents/packer/builds/libvirt-centos7.box
vagrantfiles:
- /home/aida/Documents/chef-solo/cookbooks/gtd_buildhost/Vagrantfile.rb
suites:
- name: default
run_list:
- recipe[gtd_buildhost::default]
attributes:
and it works now. But it`s strange! because some time is working and sometimes I had a same SSH connection problem