Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add accelerator variable into Packer templates (handy for MacOS users) #125

Merged
merged 1 commit into from
Jul 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion my_centos-7.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"_comment1": "NAME=my_centos-7-x86_64 CENTOS_VERSION=7 CENTOS_TYPE=NetInstall CENTOS_TAG=2003 PACKER_IMAGES_OUTPUT_DIR=/var/tmp/ packer build -only=qemu my_centos-7.json",
"builders": [
{
"accelerator": "kvm",
"accelerator": "{{ user `accelerator` }}",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos{{ user `centos_version` }}/my-ks.cfg<enter>"
],
Expand Down Expand Up @@ -116,6 +116,7 @@
}
],
"variables": {
"accelerator": "kvm",
"centos_mirror": "http://ftp.cvut.cz/centos/",
"centos_tag": "{{ env `CENTOS_TAG` }}",
"centos_type": "{{ env `CENTOS_TYPE` }}",
Expand Down
3 changes: 2 additions & 1 deletion my_ubuntu-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"_comment2": "NAME=my_ubuntu-16.04-server-amd64 UBUNTU_IMAGES_URL=http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/installer-amd64/current/images PACKER_IMAGES_OUTPUT_DIR=/var/tmp/ packer build my_ubuntu-server.json",
"builders": [
{
"accelerator": "kvm",
"accelerator": "{{ user `accelerator` }}",
"boot_command": [
"<tab>",
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu-server/{{ user `preseed_file_name` }} ",
Expand Down Expand Up @@ -120,6 +120,7 @@
}
],
"variables": {
"accelerator": "kvm",
"cpus": "2",
"disk_size": "51200",
"headless": "false",
Expand Down
3 changes: 2 additions & 1 deletion my_windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"_comment1": "NAME=my_windows-10-enterprise-x64-eval WINDOWS_VERSION=10 VIRTIO_WIN_ISO=./packer_cache/virtio-win.iso ISO_URL=https://software-download.microsoft.com/download/pr/19041.264.200511-0456.vb_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso PACKER_IMAGES_OUTPUT_DIR=/var/tmp/ TMPDIR=/var/tmp/ packer build -only=qemu my_windows.json",
"builders": [
{
"accelerator": "kvm",
"accelerator": "{{ user `accelerator` }}",
"communicator": "winrm",
"cpus": "{{ user `cpus` }}",
"disk_size": "{{ user `disk_size` }}",
Expand Down Expand Up @@ -139,6 +139,7 @@
}
],
"variables": {
"accelerator": "kvm",
"autounattend": "http/windows-{{ env `WINDOWS_VERSION` }}/Autounattend.xml",
"cpus": "2",
"disk_size": "51200",
Expand Down
3 changes: 2 additions & 1 deletion ubuntu-desktop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"_comment3": "NAME=ubuntu-16.04-desktop-amd64 UBUNTU_IMAGES_URL=http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/installer-amd64/current/images PACKER_IMAGES_OUTPUT_DIR=/var/tmp/ packer build -only=qemu ubuntu-desktop.json",
"builders": [
{
"accelerator": "kvm",
"accelerator": "{{ user `accelerator` }}",
"boot_command": [
"<tab>",
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu-desktop/{{ user `preseed_file_name` }} ",
Expand Down Expand Up @@ -108,6 +108,7 @@
}
],
"variables": {
"accelerator": "kvm",
"cpus": "2",
"disk_size": "51200",
"headless": "false",
Expand Down
3 changes: 2 additions & 1 deletion ubuntu-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"_comment2": "NAME=ubuntu-16.04-server-amd64 UBUNTU_IMAGES_URL=http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/installer-amd64/current/images PACKER_IMAGES_OUTPUT_DIR=/var/tmp/ packer build -only=qemu ubuntu-server.json",
"builders": [
{
"accelerator": "kvm",
"accelerator": "{{ user `accelerator` }}",
"boot_command": [
"<tab>",
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu-server/{{ user `preseed_file_name` }} ",
Expand Down Expand Up @@ -101,6 +101,7 @@
}
],
"variables": {
"accelerator": "kvm",
"cpus": "2",
"disk_size": "51200",
"headless": "false",
Expand Down
3 changes: 2 additions & 1 deletion windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_comment4": "NAME=windows-server-2019-standard-x64-eval WINDOWS_VERSION=2019 VIRTIO_WIN_ISO=./packer_cache/virtio-win.iso ISO_URL=https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso PACKER_IMAGES_OUTPUT_DIR=/var/tmp/ TMPDIR=/var/tmp/ packer build -only=qemu windows.json",
"builders": [
{
"accelerator": "kvm",
"accelerator": "{{ user `accelerator` }}",
"communicator": "winrm",
"cpus": "{{ user `cpus` }}",
"disk_size": "{{ user `disk_size` }}",
Expand Down Expand Up @@ -137,6 +137,7 @@
}
],
"variables": {
"accelerator": "kvm",
"autounattend": "http/windows-{{ env `WINDOWS_VERSION` }}/Autounattend.xml",
"cpus": "2",
"disk_size": "51200",
Expand Down