<commit_before>= Knife ESX

= DESCRIPTION:

This is the unofficial Opscode Knife plugin for ESX. This plugin gives knife the ability to create, bootstrap, and manage virtual machines in a VMWare ESX/ESXi host.

You'll need an ESX(i)4/5 host with SSH enabled and a privileged user account to connect to it via SSH:

You'll also need a base VM template (a VMDK in fact) with CentOS/Ubuntu/Fedora and vmware-tools installed.

http://github.com/rubiojr/knife-esx

= INSTALLATION:

Be sure you are running the latest version Chef. Versions earlier than 0.10.0 don't support plugins:

    gem install chef

This plugin is distributed as a Ruby Gem. To install it, run:

    gem install knife-esx

Depending on your system's configuration, you may need to run this command with root privileges.

= CONFIGURATION:

In order to communicate with the ESX Cloud API you will have to tell Knife about your Username and API Key.  The easiest way to accomplish this is to create some entries in your <tt>knife.rb</tt> file:

    knife[:esx_host] = "Your ESX host address"
    knife[:esx_username]  = "root"
    knife[:esx_password]  = "<PASSWORD>"

You also have the option of passing your ESX Host/Username/Password into the individual knife subcommands using the <tt>--esx-host</tt> <tt>--esx-username</tt> and <tt>--esx-password</tt> command options

    # provision a new Ubuntu 11.10 VM
    knife esx vm create --template-file ~/.chef/bootstrap/ubuntu11.10-gems.erb \
                        --vm-disk /path-to/ubuntu1110-x64-vmware-tools.vmdk \
                        --vm-name knife-esx-test-ubuntu \
                        --datastore datastore1
                        --esx-host my-test-host \
                        --esx-password secret

		#provision a new ubuntu 12.04 VM using a template on the ESXi Host with the --use-template option

		 - the command assumes that you have an ubuntu template located at /vmfs/volumes/datastore2/ubuntu12.04-template-x64/ubuntu12.04-template-x64.vmdk. In this example we also changed the location of the datastore from the default datastore1 to datastore2

			knife esx vm create --esx-username root \
			--vm-name ubuntu-12.04-vm \
				                --datastore datastore2 \
				                --esx-host server1 \
				                --esx-password secret \
												--use-template ubuntu12.04-template-x64.vmdk

= SUBCOMMANDS:

This plugin provides the following Knife subcommands.  Specific command options can be found by invoking the subcommand with a <tt>--help</tt> flag

== knife esx vm create

Provisions a new virtual machine in the ESX host and then perform a Chef bootstrap (using the SSH protocol).  The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server. The main assumption is a baseline OS installation exists (provided by the provisioning). It is primarily intended for Chef Client systems that talk to a Chef server.  By default the virtual machine is bootstrapped using the {ubuntu10.04-gems}[https://github.com/opscode/chef/blob/master/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb] template.  This can be overridden using the <tt>-d</tt> or <tt>--template-file</tt> command options.

== knife esx vm delete

Deletes an existing virtual machine in the currently configured ESX host by the virtual machine name. You can find the instance id by entering 'knife esx vm list'. Please note - this does not delete the associated node and client objects from the Chef server.

== knife esx vm list

Outputs a list of all virtual machines in the currently configured ESX host.  Please note - this shows all the virtual machines available in the ESX host, some of which may not be currently managed by the Chef server.

= LICENSE:

Author:: <NAME> (<<EMAIL>>)
Copyright:: Copyright (c) 2011 <NAME>
License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software<commit_msg>Updated README.rdoc to include information on the --use-template option<commit_after>= Knife ESX

= DESCRIPTION:

This is the unofficial Opscode Knife plugin for ESX. This plugin gives knife the ability to create, bootstrap, and manage virtual machines in a VMWare ESX/ESXi host.

You'll need an ESX(i)4/5 host with SSH enabled and a privileged user account to connect to it via SSH:

You'll also need a base VM template (a VMDK in fact) with CentOS/Ubuntu/Fedora and vmware-tools installed.

http://github.com/rubiojr/knife-esx

= INSTALLATION:

Be sure you are running the latest version Chef. Versions earlier than 0.10.0 don't support plugins:

    gem install chef

This plugin is distributed as a Ruby Gem. To install it, run:

    gem install knife-esx

Depending on your system's configuration, you may need to run this command with root privileges.

= CONFIGURATION:

In order to communicate with the ESX Cloud API you will have to tell Knife about your Username and API Key.  The easiest way to accomplish this is to create some entries in your <tt>knife.rb</tt> file:

    knife[:esx_host] = "Your ESX host address"
    knife[:esx_username]  = "root"
    knife[:esx_password]  = "<PASSWORD>"

You also have the option of passing your ESX Host/Username/Password into the individual knife subcommands using the <tt>--esx-host</tt> <tt>--esx-username</tt> and <tt>--esx-password</tt> command options

    # provision a new Ubuntu 11.10 VM
    knife esx vm create --template-file ~/.chef/bootstrap/ubuntu11.10-gems.erb \
                        --vm-disk /path-to/ubuntu1110-x64-vmware-tools.vmdk \
                        --vm-name knife-esx-test-ubuntu \
                        --datastore datastore1
                        --esx-host my-test-host \
                        --esx-password secret

    #provision a new ubuntu 12.04 VM using a template on the ESXi Host with the --use-template option - the command assumes that you have an ubuntu template located at /vmfs/volumes/datastore2/ubuntu12.04-template-x64/ubuntu12.04-template-x64.vmdk. In this example we also changed the location of the datastore from the default datastore1 to datastore2
    knife esx vm create --esx-username root \
                        --vm-name ubuntu-12.04-vm \
                        --datastore datastore2 \
                        --esx-host server1 \
                        --esx-password secret \
                        --use-template ubuntu12.04-template-x64.vmdk

= SUBCOMMANDS:

This plugin provides the following Knife subcommands.  Specific command options can be found by invoking the subcommand with a <tt>--help</tt> flag

== knife esx vm create

Provisions a new virtual machine in the ESX host and then perform a Chef bootstrap (using the SSH protocol).  The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server. The main assumption is a baseline OS installation exists (provided by the provisioning). It is primarily intended for Chef Client systems that talk to a Chef server.  By default the virtual machine is bootstrapped using the {ubuntu10.04-gems}[https://github.com/opscode/chef/blob/master/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb] template.  This can be overridden using the <tt>-d</tt> or <tt>--template-file</tt> command options.

== knife esx vm delete

Deletes an existing virtual machine in the currently configured ESX host by the virtual machine name. You can find the instance id by entering 'knife esx vm list'. Please note - this does not delete the associated node and client objects from the Chef server.

== knife esx vm list

Outputs a list of all virtual machines in the currently configured ESX host.  Please note - this shows all the virtual machines available in the ESX host, some of which may not be currently managed by the Chef server.

= LICENSE:

Author:: <NAME> (<<EMAIL>>)
Copyright:: Copyright (c) 2011 <NAME>
License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
{'fraction_non_alphanumeric': 0.07274456198740045, 'fraction_numerical': 0.016640912872934743, 'mean_word_length': 3.0568948891031824, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6144380', 'n_tokens_mistral': 2556, 'n_tokens_neox': 2307, 'n_words': 1075}