# Knife vsphere plugin

**URL:** <https://discourse.chef.io/t/knife-vsphere-plugin/3185>\
**Category:** Chef Infra (archive)\
**Created:** [October 14, 2012, 8:19pm UTC](https://discourse.chef.io/t/knife-vsphere-plugin/3185 "2012-10-14T20:19:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Storey](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Jeff\_Storey](https://discourse.chef.io/u/Jeff_Storey)\
**Post date:** [October 14, 2012, 8:19pm UTC](https://discourse.chef.io/t/knife-vsphere-plugin/3185/1 "2012-10-14T20:19:13Z")

</div>

I’m starting to look at the vsphere knife plugin for creating VMs and  
provisioning them with Chef. One thing that is confusing me is how to specify  
the chef server to use, and where to specify the pem validation files. Where  
does that get set?

---

<div class="post-metadata">

**Author:** ![dcondomitti](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/dcondomitti/32/104_2.png) [@dcondomitti](https://discourse.chef.io/u/dcondomitti)\
**Post date:** [October 14, 2012, 8:40pm UTC](https://discourse.chef.io/t/knife-vsphere-plugin/3185/2 "2012-10-14T20:40:30Z")

</div>

knife.rb either in your chef repository's .chef directory, or ~/.chef. My company-specific file looks something like this:

current\_dir = File.dirname( **FILE** )  
log\_level :info  
log\_location STDOUT  
node\_name "chefusername"  
client\_key "#{current\_dir}/chefusername.pem"  
validation\_client\_name "org-validator"  
validation\_key "#{current\_dir}/org-validator.pem"  
chef\_server\_url "[Sign In - Chef Manage](https://api.opscode.com/organizations/orgname)"  
cookbook\_path ["#{current\_dir}/../cookbooks"]  
encrypted\_data\_bag\_secret "#{current\_dir}/encrypted\_data\_bag\_secret"

knife[:sort\_status\_reverse] = true  
knife[:vsphere\_host] = "[vsphere-hostname.example.com](http://vsphere-hostname.example.com)"  
knife[:vsphere\_user] = "username"  
knife[:vsphere\_pass] = "dat password"  
knife[:vsphere\_dc] = "OrgName"  
knife[:vsphere\_insecure] = false # require valid SSL certificates, use true  
# if using self-signed certificates that aren't  
# trusted in your local cacert.pem

On Sunday, October 14, 2012 at 4:19 PM, [jeff.storey@nextcentury.com](mailto:jeff.storey@nextcentury.com) wrote:

> I'm starting to look at the vsphere knife plugin for creating VMs and  
> provisioning them with Chef. One thing that is confusing me is how to specify  
> the chef server to use, and where to specify the pem validation files. Where  
> does that get set?
