test-kitchen/test-kitchen — pull request #333 by ryotarai (2014-01-21 14:59:27+00:00)
Title: Add `start` action to start the instance VM.

Hi, all.

I added `start` action to start the instance VM.
For example, after rebooting host machine, VM of the instance is halted.

```
$ kitchen login default
ssh: connect to host 127.0.0.1 port 2222: Connection refused
```

Because there is no way to start the VM, I added the new action.
You can start the VM like the following:

```
kitchen start default
-----> Starting Kitchen (v1.1.2.dev)
-----> Starting ...
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[Berkshelf] Skipping Berkshelf with --no-provision
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please make sure the guest additions within the
virtual machine match the version of VirtualBox you have installed on
your host and reload your VM.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.3
[default] Setting hostname...
[default] VM already provisioned. Run `vagrant provision` or use `--provision` to force it
Finished starting (0m15.03s).
-----> Kitchen is finished. (0m15.41s)
```

If the driver does not support `start` action, the user can get messages like the following:

```
$ kitchen start default
-----> Starting Kitchen (v1.1.2.dev)
-----> Starting ...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Kitchen::Driver::Vagrant does not support 'start' action
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
```

Also, I sent a pull request to `kitchen-vagrant` to support `start` action.