I’m working on RHEL 5 deployment on KVM host . I managed to bootstrap fully
functional RHEL chef node using postinstallation command and chef-full distro
parameter :
#knife bootstrap IP -d chef-full
After that new chef client is listed in the clients list . There is no problem
with that .
Now I want to automate the same task but when creating new VM .Since there is
no template for the RHEL5 I used the one from Centos5 .
When I run this command KVM VM will be created but some sort of error shows
up anyway and chef client won’t be installed on new RHEL5 VM . I expected
this would bootstrap new client as well .
knife kvm vm create -VV --template-file ~/.chef/bootstrap/centos5-gems.erb
–vm-disk /root/IMAGES/rhel-5.8-x86_64.qcow2 --vm-name ELVIS -ssh-user root
–ssh-password secret --pool default --kvm-host 10.63.31.144
DEBUG: Using configuration from /root/.chef/knife.rb Creating VM…
Connecting to KVM host 10.63.31.144 (ssh)…
root@10.63.31.144’s password:
Importing VM disk…
Uploading file… (rhel-5.8-x86_64.qcow2)
Progress: 100% completed
VM Name: ELVIS
VM Memory: 512 MB
Waiting server…
/usr/lib64/ruby/gems/1.8/gems/knife-kvm-0.1.2/lib/chef/knife/kvm_vm_create.rb:193:in
run': private method
addresses’ called for
#Fog::Compute::Libvirt::Server:0x7f0e5a9a0e10 (NoMethodError)
from
/usr/lib64/ruby/gems/1.8/gems/knife-kvm-0.1.2/lib/chef/knife/kvm_vm_create.rb:191:in
loop' from /usr/lib64/ruby/gems/1.8/gems/knife-kvm-0.1.2/lib/chef/knife/kvm_vm_create.rb:191:in
run’
from
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/lib/chef/knife.rb:402:in
run_with_pretty_exceptions' from /usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/lib/chef/knife.rb:168:in
run’
from
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/lib/chef/application/knife.rb:123:in
run' from /usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/knife:25 from /usr/bin/knife:19:in
load’
from /usr/bin/knife:19
???
/Vlad .