Add Debian 13 Packer build configuration
This commit is contained in:
69
debian-13/x86_64-qemu-base.pkr.hcl
Normal file
69
debian-13/x86_64-qemu-base.pkr.hcl
Normal file
@@ -0,0 +1,69 @@
|
||||
packer {
|
||||
required_plugins {
|
||||
qemu = {
|
||||
version = ">= 1.1.3"
|
||||
source = "github.com/hashicorp/qemu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "iso_url" {
|
||||
default = "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-13.0.0-amd64-netinst.iso"
|
||||
}
|
||||
|
||||
variable "iso_hash" {
|
||||
default = "sha256:e363cae0f1f22ed73363d0bde50b4ca582cb2816185cf6eac28e93d9bb9e1504"
|
||||
}
|
||||
|
||||
variable "disk_size" {
|
||||
default = 102400
|
||||
}
|
||||
|
||||
variable "memory" {
|
||||
default = 2048
|
||||
}
|
||||
|
||||
variable "headless" {
|
||||
default = true
|
||||
}
|
||||
|
||||
source "qemu" "debian-13-64-base" {
|
||||
iso_url = var.iso_url
|
||||
iso_checksum = "${var.iso_hash}"
|
||||
output_directory = "builds/qemu/debian-13-64-base"
|
||||
shutdown_command = "/usr/bin/systemctl poweroff"
|
||||
disk_interface = "virtio"
|
||||
disk_size = var.disk_size
|
||||
memory = var.memory
|
||||
headless = var.headless
|
||||
format = "qcow2"
|
||||
accelerator = "kvm"
|
||||
http_directory = "http"
|
||||
ssh_username = "root"
|
||||
ssh_password = "debian"
|
||||
ssh_timeout = "60m"
|
||||
vm_name = "debian-13-64-base"
|
||||
net_device = "virtio-net"
|
||||
boot_wait = "5s"
|
||||
boot_command = [
|
||||
"<down>",
|
||||
"<tab>",
|
||||
" auto=true",
|
||||
" priority=critical",
|
||||
" hostname=trixie",
|
||||
" domain=",
|
||||
" url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
|
||||
"<enter>"
|
||||
]
|
||||
}
|
||||
|
||||
build {
|
||||
name = "debian-base"
|
||||
sources = ["source.qemu.debian-13-64-base"]
|
||||
|
||||
provisioner "shell" {
|
||||
scripts = [
|
||||
"scripts/aptupdate.sh",
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user