packer についての内容

https://github.com/boxcutter/centos

# ディレクトリ移動
cd ~/dev/me/packer/boxcutter_centos66

# 設定ファイルがgithub にあるのでclone する
git clone git@github.com:boxcutter/centos.git

cd centos

http/ks7.cfg も以下の設定に変更する
lang ja_JP.UTF-8
timezone Asia/Tokyo

# build する
packer build centos66.json

挫折

build しようとするとエラー表示が出る。

% packer build centos66.json
virtualbox-iso output will be in this color.
vmware-iso output will be in this color.

Build 'vmware-iso' errored: Failed creating VMware driver: Unable to initialize any driver for this platform. The errors
from each driver are shown below. Please fix at least one driver
to continue:
* Fusion application not found at path: /Applications/VMware Fusion.app
* Fusion application not found at path: /Applications/VMware Fusion.app

https://github.com/boxcutter/centos

To build all the boxes, you will need Packer and the desktop virtualization software VirtualBox and VMware Fusion for Mac installed.

VMware Fusion for Macもインストールしなきゃいけないみたいだが有料(10,000円)なので挫折

と思いきやbuild できた?

一部エラーがでたけどビルド終わったって書いてあるし、仮想のCentOSも立ち上がった。

Build 'virtualbox-iso' finished.

==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Failed creating VMware driver: Unable to initialize any driver for this platform. The errors
from each driver are shown below. Please fix at least one driver
to continue:
* Fusion application not found at path: /Applications/VMware Fusion.app
* Fusion application not found at path: /Applications/VMware Fusion.app


==> Builds finished. The artifacts of successful builds are:
--> virtualbox-iso: 'virtualbox' provider box: box/virtualbox/centos66-nocm-0.1.0.box

続き

Box-Cutter で CentOS 7 の box を作る

box に登録する

% vagrant box add centos66 box/virtualbox/centos66-nocm-0.1.0.box 
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'centos66' (v0) for provider: 
    box: Unpacking necessary files from: file:///Users/srg/dev/me/packer/boxcutter_centos66/centos/box/virtualbox/centos66-nocm-0.1.0.box
==> box: Successfully added box 'centos66' (v0) for 'virtualbox'!

できたかな?