diff --git a/debian-13/Makefile b/debian-13/Makefile index 8a55a88..2dbaade 100644 --- a/debian-13/Makefile +++ b/debian-13/Makefile @@ -5,7 +5,7 @@ HEADLESS ?= true default: install install: - packer build -var 'headless=$(HEADLESS)' . + PKR_VAR_headless="$(HEADLESS)" packer build . clean: rm -rf ./builds diff --git a/debian-13/http/preseed.cfg b/debian-13/http/preseed.cfg index abd559a..27baf9f 100644 --- a/debian-13/http/preseed.cfg +++ b/debian-13/http/preseed.cfg @@ -12,8 +12,8 @@ d-i apt-setup/cdrom/set-first boolean false # (Initial) root account setup d-i passwd/make-user boolean false d-i passwd/root-login boolean true -d-i passwd/root-password password debian -d-i passwd/root-password-again password debian +# d-i passwd/root-password password debian +# d-i passwd/root-password-again password debian # Time d-i clock-setup/utc boolean true diff --git a/debian-13/x86_64-qemu-base.pkr.hcl b/debian-13/x86_64-qemu-base.pkr.hcl index 1653503..2ba47d5 100644 --- a/debian-13/x86_64-qemu-base.pkr.hcl +++ b/debian-13/x86_64-qemu-base.pkr.hcl @@ -23,6 +23,10 @@ variable "memory" { default = 2048 } +variable "ssh_password" { + default = "debian" +} + variable "headless" { default = true } @@ -40,7 +44,7 @@ source "qemu" "debian-13-64-base" { accelerator = "kvm" http_directory = "http" ssh_username = "root" - ssh_password = "debian" + ssh_password = var.ssh_password ssh_timeout = "60m" vm_name = "debian-13-64-base" net_device = "virtio-net" @@ -50,6 +54,8 @@ source "qemu" "debian-13-64-base" { "", " auto=true", " priority=critical", + " passwd/root-password=${var.ssh_password}", + " passwd/root-password-again=${var.ssh_password}", " hostname=trixie", " domain=", " url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",