From 8fa506613b848f0a2960c9b12772648efc386693 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Thu, 18 Apr 2024 11:25:21 -0400 Subject: [PATCH] Created config for ALmalinux 9 --- Almalinux-9/almalinux-9.pkr.hcl | 47 +++++++++++++++++++++++++++++++++ almalinux-9.pkr.hcl | 23 ---------------- 2 files changed, 47 insertions(+), 23 deletions(-) create mode 100644 Almalinux-9/almalinux-9.pkr.hcl delete mode 100644 almalinux-9.pkr.hcl diff --git a/Almalinux-9/almalinux-9.pkr.hcl b/Almalinux-9/almalinux-9.pkr.hcl new file mode 100644 index 0000000..f32c03b --- /dev/null +++ b/Almalinux-9/almalinux-9.pkr.hcl @@ -0,0 +1,47 @@ +variable "proxmox_apiuser" { + type = string + default = "packer" +} + +variable "proxmox_apitoken" { + type = string + default = "changeme" +} + +source "proxmox-iso" "almalinux-9" { + template_name = "almalinux-9" + template_description = "Almalinux 9.3, generated on ${timestamp()}" + boot_wait = "10s" + boot_key_interval = "250ms" + boot_command = ["", " inst.ks=http://ks.int.metaunix.net/kickstarts/almalinux-9-server.ks"] +# shutdown_command = "echo 'packer' | sudo -S poweroff" + disks { + disk_size = "10G" + storage_pool = "templates" + type = "scsi" + } + network_adapters { + bridge = "vmbr0" + model = "virtio" + } + + proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/" + insecure_skip_tls_verify = true + username = "${var.proxmox_apiuser}" + password = "${var.proxmox_apitoken}" + node = "geonosis" + + iso_url = "https://repo.almalinux.org/almalinux/9.3/isos/x86_64/AlmaLinux-9.3-x86_64-boot.iso" + iso_checksum = "sha256:af5377a1d16bbe599ea91a8761ad645f2f54687075802bdc0c0703ee610182e9" + iso_storage_pool = "iso" + unmount_iso = true + iso_download_pve = true + + ssh_username = "xadmin" + ssh_password = "packer" + ssh_timeout = "20m" +} + +build { + sources = ["source.proxmox-iso.almalinux-9"] +} diff --git a/almalinux-9.pkr.hcl b/almalinux-9.pkr.hcl deleted file mode 100644 index 6632078..0000000 --- a/almalinux-9.pkr.hcl +++ /dev/null @@ -1,23 +0,0 @@ -source "qemu" "almalinux-9" { - iso_url = "https://repo.almalinux.org/almalinux/9.3/isos/x86_64/AlmaLinux-9.3-x86_64-boot.iso" - iso_checksum = "sha256:af5377a1d16bbe599ea91a8761ad645f2f54687075802bdc0c0703ee610182e9" - output_directory = "/srv/kvm/templates/" - shutdown_command = "echo 'packer' | sudo -S poweroff" - disk_size = "5000M" - format = "qcow2" - accelerator = "kvm" - headless = "true" - ssh_username = "xadmin" - ssh_password = "packer" - ssh_timeout = "20m" - vnc_bind_address = "0.0.0.0" - vm_name = "almalinux-9" - net_device = "virtio-net" - disk_interface = "virtio" - boot_wait = "10s" - boot_command = [" text inst.ks=http://ks-v1.int.metaunix.net/kickstarts/almalinux-9-server.ks"] -} - -build { - sources = ["source.qemu.almalinux-9"] -}