Skip to content

Latest commit

 

History

History
68 lines (53 loc) · 1.72 KB

README.md

File metadata and controls

68 lines (53 loc) · 1.72 KB

Build CentOS 7 Vagrant Box

Build CentOS 7 Vagrant Box with Packer.

Requirements

Build

cd vagrant-centos
packer build centos7.json

Configuration

User Variable Default Value Description
disk_size 40000 Documentation
headless false Documentation
memory 512 Memory size in MB
mirror A URL of the ISO mirror, default use local ISO, eg: http://mirrors.kernel.org/centos/7.2.1511/isos/x86_64/
ssh_timeout 1800s SSH connect timeout

Example

packer build -var headless=true -var disk_size=100000 base/centos7.json

Publish

# create box version and provider
./make.sh create -v 0.2.0
# upload box file
./make.sh upload -v 0.2.0 -f build/centos-7-x86_64-virtualbox.box
# release box
./make.sh release -v 0.2.0

Test

# get box
vagrant init lostsnow/centos7
# or
vagrant box add lostsnow/centos7 build/centos-7-x86_64-virtualbox.box

vagrant up
vagrant ssh