packer-templates/ubuntu/ubuntu-22.04-amd64.json

98 lines
4.1 KiB
JSON
Raw Normal View History

2023-06-04 02:35:11 +00:00
{
"builders": [
{
"boot_command": [
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"c<wait5>",
"set gfxpayload=keep<enter><wait5>",
"linux /casper/vmlinuz <wait5>",
"autoinstall quiet fsck.mode=skip <wait5>",
"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait5>",
"ds=\"nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/\" <wait5>",
"---<enter><wait5>",
"initrd /casper/initrd<enter><wait5>",
"boot<enter>"
],
"boot_wait": "1s",
"cpus": "{{ user `cpus` }}",
"disk_size": "{{user `disk_size`}}",
"headless": "{{ user `headless` }}",
"http_directory": "{{user `http_directory`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"memory": "{{ user `memory` }}",
"output_directory": "{{ user `build_directory` }}/packer-{{user `template`}}-qemu",
"shutdown_command": "echo 'ubuntu' | sudo -S shutdown -P now",
"ssh_password": "ubuntu",
"ssh_port": 22,
"ssh_timeout": "10000s",
"ssh_username": "ubuntu",
"type": "qemu",
"vm_name": "{{ user `template` }}",
"vnc_bind_address": "{{ user `vnc_bind_address` }}",
"qemuargs": [
[ "-m", "{{ user `memory` }}" ],
[ "-display", "{{ user `qemu_display` }}" ]
]
}
],
"post-processors": [
{
"type": "compress",
"output": "{{ user `build_directory` }}/{{user `box_basename`}}.img.gz"
}
],
"provisioners": [
{
"environment_vars": [
"HOME_DIR=/home/ubuntu",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
"no_proxy={{user `no_proxy`}}"
],
"execute_command": "echo 'ubuntu' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
"expect_disconnect": true,
"scripts": [
"{{template_dir}}/scripts/update.sh",
"{{template_dir}}/scripts/networking.sh",
"{{template_dir}}/scripts/cleanup.sh",
"{{template_dir}}/../common/minimize.sh"
],
"type": "shell"
}
],
"variables": {
"box_basename": "ubuntu-22.04",
"build_directory": "builds",
"build_timestamp": "{{isotime \"20060102150405\"}}",
"cpus": "2",
"disk_size": "65536",
"guest_additions_url": "",
"headless": "",
"http_directory": "{{template_dir}}/http",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"iso_checksum": "5e38b55d57d94ff029719342357325ed3bda38fa80054f9330dc789cd2d43931",
"iso_name": "ubuntu-22.04.2-live-server-amd64.iso",
"memory": "2048",
"mirror": "http://releases.ubuntu.com",
"mirror_directory": "22.04.2",
"name": "ubuntu-22.04-amd64",
"no_proxy": "{{env `no_proxy`}}",
"preseed_path": "preseed.cfg",
"qemu_display": "none",
"template": "ubuntu-22.04-amd64.img",
"version": "TIMESTAMP",
"vnc_bind_address": "127.0.0.1"
}
}