5
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Packerを使用して自分仕様のboxを作成する

Last updated at Posted at 2015-11-21

自分仕様のboxファイルを作成するで自分仕様のboxファイルを作成したけど、かなり省略しているので、vagrantで使用するには、実用上好ましくありませんでした。

そこで、調べたらPackerっていうのがあるんですね。
Packerを使ってマシンイメージを自動ビルド出来るようにしておけば、かなり楽になりますね。

ただ、このPackerは設定ファイルをJSONで書く必要があるんですが、相当面倒っぽい。そこで、更に調べたら、bentoの設定ファイルがgithubにありました。

bentoのgithub

早速ダウンロードしてJSONファイルを編集したりして、ビルドして出来ました。

私は、virtualboxのイメージが作成出来れば良かったので、以下のコマンド使ってビルドしました。

/usr/local/bin/packer build -only=virtualbox-iso centos-7.1-x86_64.json

上記のgithubから落としたファイルを探せばキックスタートインストールのファイルも入ってます。OSのJSONファイルですが、centos、debian、fedora、freebsd、macosx、rhel、sles、ubunts、solarisのJSONがありました。

2017/02/20 追加
MacのParallels Desktop 12 Proで以下を行うと、vagrantでParallelsのゲストOSが作成出来た。

packer build -only=parallels-iso centos-7.3-x86_64.json

5
7
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
5
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?