Chef provision a esxi virtual machine or a virtual server

We need to install esxi knife plugin on our workstation


gem install knife-esx

Add below params in knife.rb

knife[:esx_host] = "esx"
knife[:esx_username] = "root"
knife[:esx_password] = "password of your esxi server"

Need to create a ubuntu template ( or custom OS template as per requirement )
Below example shows how to provision a ubuntu template .

ssh root@esxi

mkdir -p /vmfs/volumes/datastore1/esx-gem/templates

vmkfstools -i /vmfs/volumes/datastore1/ubuntu-12.10-x64_template/*.vmdk –diskformat thin /vmfs/volumes/datastore1/esx-gem/templates/ubuntu-12.10-x64_template.vmdk

esx template list ( should display the template we installed )


knife esx vm create --vm-name server1 --use-template ubuntu-12.10-x64_template --verbose true --distro ubuntu12.04-19-gems --vm-memory 2048 -x provision -i ~/.ssh/id_rsa

3 comments:

Web Designers Pitampura said...

I really appreciate your professional approach. These are pieces of very useful information that will be of great use for me in future.

vmware jobs in hyderabad said...

Nice post. You pointed on very important facts by this post. This is really very informative and useful information. Thanks for sharing this post.apply vmware jobs in hyderabad.

Calendar Printable said...

Best Calendar Printable in India Book Affordable Calendar Printable September 2017 At Affordable Price, Please Visit Our Website :- September 2017 Calendar Printable