Skip to content

Instantly share code, notes, and snippets.

@fapestniegd
Created August 23, 2013 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fapestniegd/6323820 to your computer and use it in GitHub Desktop.
Save fapestniegd/6323820 to your computer and use it in GitHub Desktop.
[ ! -d ~/.chef ] && mkdir -p ~/.chef
cat<<EOF > .chef/knife.rb
knife[:vsphere_host] = "virtualcenter.eftdomain.net"
knife[:vsphere_user] = "${LOGNAME}"
knife[:vsphere_pass] = "${WINDOWS_PASSWORD}"
knife[:vsphere_dc] = "Nashville"
knife[:vsphere_insecure] = true
EOF
chmod 600 .chef/knife.rb
proxyon; export GEM_HOME=~/lib; gem install knife-vsphere --no-ri --no-rdoc
export "PATH=$PATH:$HOME/lib/bin"
knife vsphere vm list
knife vsphere vm list --folder EFTLAB_VMs
knife vsphere vm list --folder EFTLAB_VMs/Templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment