Skip to content

Instantly share code, notes, and snippets.

@Kazuma
Last active August 29, 2015 14:03
Show Gist options
  • Save Kazuma/0236787c9dd0195d4e50 to your computer and use it in GitHub Desktop.
Save Kazuma/0236787c9dd0195d4e50 to your computer and use it in GitHub Desktop.
CentOS 7 Packer build
{
"builders": [
{
"boot_command": [
"<esc><wait>",
"linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg ",
"<enter><wait>"
],
"boot_wait": "10s",
"guest_os_type": "RedHat_64",
"headless": true,
"http_directory": "./",
"iso_checksum": "ee505335bcd4943ffc7e6e6e55e5aaa8da09710b6ceecda82a5619342f1d24d9",
"iso_checksum_type": "sha256",
"iso_url": "http://ftp.iij.ad.jp/pub/linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso",
"shutdown_command": "sudo shutdown -P now",
"ssh_password": "vagrant",
"ssh_username": "vagrant",
"ssh_wait_timeout": "3000s",
"type": "virtualbox-iso",
"vboxmanage": [
[
"modifyvm",
"{{ .Name }}",
"--pae",
"on"
]
],
"vm_name": "box"
}
],
"post-processors": [
{
"output": "CentOS-7.0-x86_64.box",
"type": "vagrant"
}
]
}
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use text mode install
text
# Run the Setup Agent on First boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=jp --xlayouts='jp'
# System language
lang en_US.UTF-8
# custom
#firewall --enabled --service=ssh
firewall --disabled
selinux --disabled
# Network information
network --bootproto=dhcp --device=enp0s3 --onboot=on --ipv6=auto --activate
network --hostname=localhost.localdomain
# Root password
rootpw vagrant
# Do not configure the X Window System
skipx
# System imezone
timezone Asia/Tokyo --isUtc
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --all --initlabel --drives=sda
autopart --type=lvm
reboot
%packages
@core
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment