-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjammy.pkr.hcl
More file actions
34 lines (31 loc) · 856 Bytes
/
jammy.pkr.hcl
File metadata and controls
34 lines (31 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
packer {
required_plugins {
qemu = {
source = "github.com/hashicorp/qemu"
version = "~> 1"
}
}
}
source "qemu" "ubuntu" {
cd_files = ["./cloud-init/*"]
cd_label = "cidata"
disable_vnc = true
disk_image = true
disk_size = "8G"
efi_boot = true
format = "raw"
headless = "true"
iso_checksum = "file:https://cloud-images.ubuntu.com/jammy/current/SHA256SUMS"
iso_url = "http://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
output_directory = "output"
shutdown_command = "echo 'packer' | sudo -S shutdown -P now"
ssh_password = "password"
ssh_username = "root"
vm_name = "ubuntu_jammy.img"
}
build {
sources = ["source.qemu.ubuntu"]
provisioner "shell" {
script = "setup.sh"
}
}