LoginSignup
6
6

More than 5 years have passed since last update.

vagrant & Veewee を windows 上で利用する

Last updated at Posted at 2014-04-12

vagrant の導入(Windows)
http://www.vagrantup.com/
ここから msi を取ってきてインストール

勝手にパスが引かれるのでいきなり vagrant コマンドが使えるようになる
試しに公式からubuntuイメージを取ってきていれる

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

どうすれば ssh できるか見る

vagrant ssh-config

試してみる

ssh vagrant@127.0.0.1 -p2222

設定を突っ込むと楽

vagrant ssh-config >> ~/.ssh/config

Veewee の導入
適当に clone する

git clone git://github.com/jedi4ever/veewee.git

終わったら bundle install

cd veewee
bundle install

gem json のインストールでこけたら
http://rubyinstaller.org/downloads/
にいって Development Kit の For use with Ruby 2.0 (x64 – 64bits only) をダウンロード
http://cdn.rubyinstaller.org/archives/devkits/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

ダウンロードしたディレクトリに移動

cd "~\Downloads\DevKit-mingw64-64-4.7.2-20130224-1432-sfx"
ruby dk.rb init
ruby dk.rb install

veewee に戻って、Boxの作成に入る
まずは template を veewee に作成させる

cd veewee
bundle exec veewee vbox templates

いろいろ出力されるので、ここからいい感じのものを抜き出す
今回はこれを利用する

bundle exec veewee vbox define 'debian-wheezy' 'Debian-7.2.0-amd64-netboot'

ビルド中に落ちるのでこのファイル
c:/Ruby/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/config.rb
の先頭に以下のものを追加。(もっといい方法があるはず・・。

Encoding.default_external = "utf-8"

ビルドする

bundle exec veewee vbox build debian-wheezy

export すればいい感じにできる

bundle exec veewee vbox export debian-wheezy

早速されをできあがったボックスを登録して起動

vagrant init debian-wheezy
vagrant up

はい、終わり、疲れた

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6