Skip to content

Instantly share code, notes, and snippets.

@heathseals
Forked from fapestniegd/gist:6323820
Created August 26, 2013 15:08
Show Gist options
  • Save heathseals/6342473 to your computer and use it in GitHub Desktop.
Save heathseals/6342473 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