windowsだけどchefしてみたい(1) virtualbox + vagrant + chef by windows7

chef使ってみたいけどwindows7だし
評判の入門書を買っても読まない可能性が・・・
入門Chef Solo - Infrastructure as Code - 達人出版会

とおもってたら超分かりやすい動画&スライドが
「初めてのChefの教室」を開催しました。(動画&資料) | Engine Yard Blog JP

とりあえず仮想マシンでってことで
参考 -> Vagrant 入門 - Windows 上に Linux の仮想マシンを簡単に用意する - 僕は発展途上技術者

rubyはすでに入れてある状態なので
vagrantインストール

gem install vagrant

virtualboxダウンロード&デフォルトインストール
Downloads – Oracle VM VirtualBox

ここ↓からubuntu 12.04 LTS 64bitを選んでいれる
A list of base boxes for Vagrant - Vagrantbox.es

vagrant box add precise64 http://files.vagrantup.com/precise64.box

あぅ・・・エラー

Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.

Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.

とりあえず環境変数にパス追加

C:\Program Files\Oracle\VirtualBox

いけたっ
起動は

vagrant init precise64
vagrant up

あぅ・・・エラー

The VM failed to remain in the "running" state while attempting to boot.
This is normally caused by a misconfiguration or host system incompatibilities.
Please open the VirtualBox GUI and attempt to boot the virtual machine
manually to get a more informative error message.

・・・わからん
ubuntu 12.04 LTS 32bitでやってみる

vagrant box add precise32 http://files.vagrantup.com/precise32.box

Vagrantfileの記述をprecise64から32へ書き換え
-> config.vm.box = "precise32"

vagrant up

いけたっ

vagrant ssh

`vagrant ssh` isn't available on the Windows platform. You are still able
to SSH into the virtual machine if you get a Windows SSH client (such as
PuTTY). The authentication information is shown below:

あぅ・・・
てことでteratermでやっと入れたー

Host: 127.0.0.1
Port: 2222
Username: vagrant
Password: vagrant

コマンドまとめ

vagrant init #初期化
vagrant up #起動
vagrant halt #停止
vagrant reload #再起動
vagrant package #パッケージ化
vagrant box list #リスト