Added files for Rocky 9; tried some fixes on Almalinux 9 to stop it from crashing

This commit is contained in:
Gregory Ballantine 2024-04-19 09:34:57 -04:00
parent 3210d922bf
commit 1b3a73bf20
4 changed files with 187 additions and 2 deletions

View File

@ -13,14 +13,18 @@ source "proxmox-iso" "almalinux-9" {
template_description = "Almalinux 9.3, generated on ${timestamp()}"
boot_wait = "10s"
boot_key_interval = "200ms"
boot_command = ["<tab><wait1s>", " inst.ks=http://ks.int.metaunix.net/kickstarts/almalinux-9-server.ks<enter><wait5m>"]
boot_command = ["<tab><wait1s>", " inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/almalinux-9-server.ks<enter><wait5m>"]
http_directory = "http"
http_port_max = "8089"
http_port_min = "8080"
os = "l26"
cores = "2"
sockets = "1"
memory = "2048"
disks {
disk_size = "10G"
disk_size = "30G"
storage_pool = "templates"
type = "scsi"
}

57
Rocky-9/rocky-9.pkr.hcl Normal file
View File

@ -0,0 +1,57 @@
variable "proxmox_apiuser" {
type = string
default = "packer"
}
variable "proxmox_apitoken" {
type = string
default = "changeme"
}
source "proxmox-iso" "rocky-9" {
template_name = "rocky-9"
template_description = "Rocky Linux 9.3, generated on ${timestamp()}"
boot_wait = "10s"
boot_key_interval = "200ms"
boot_command = ["<tab><wait1s>", " inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rocky-9-server.ks<enter><wait5m>"]
http_directory = "http"
http_port_max = "8089"
http_port_min = "8080"
os = "l26"
machine = "pc"
scsi_controller = "virtio-scsi-single"
cores = "2"
sockets = "1"
memory = "2048"
disks {
disk_size = "30G"
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 = "kamino"
iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.3-x86_64-boot.iso"
iso_checksum = "sha256:eb096f0518e310f722d5ebd4c69f0322df4fc152c6189f93c5c797dc25f3d2e1"
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.rocky-9"]
}

View File

@ -0,0 +1,62 @@
url --url="https://repo.almalinux.org/almalinux/$releasever/BaseOS/$basearch/os/"
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# System timezone
timezone America/New_York --isUtc
# Crypted root password
rootpw --iscrypted $6$kkuIkd8S9gDUhK8g$1XbqJDCjt1zQAhxb9sC2mE5CGd.D0xV1efu0R8h1e.oovRKtEWqR5KaTDPSTztpxSw2qmDVORZJGnNpiJxUFT1
# MD5 password hashing
authselect --useshadow --passalgo=sha512
# Create my initial user :D
#user --disabled
user --name=xadmin --shell=/bin/bash --homedir=/home/xadmin --iscrypted --password=$6$y6lN/cfPPtlyaTXu$4QUYFl816sxWPuyR.eY6mCJ3ybYLNcF6Pw4ar4K7Dyy9LbedK3PjkTNZfWqSdoPRpJMjtrbpY1xQ.zDXxOTug.
network --device=eth0 --bootproto=dhcp --ipv6=auto --activate
# Run the Setup Agent on first boot
firstboot --disable
# SELinux configuration
selinux --disabled
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype=ext3 --size=1000
part swap --fstype="swap" --recommended
part / --fstype=xfs --size=1 --grow
# Reboot after installation
reboot --eject
%packages
@base
@core
nfs-utils
sudo
qemu-guest-agent
%end
%post
# Update the system
yum -y update
# Istall the EPEL repository
yum -y install epel-release
yum -y install wget vim yum-plugin-versionlock
usermod -aG wheel xadmin
systemctl enable qemu-guest-agent
%end

62
http/rocky-9-server.ks Normal file
View File

@ -0,0 +1,62 @@
url --url="https://repo.almalinux.org/almalinux/$releasever/BaseOS/$basearch/os/"
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# System timezone
timezone America/New_York --isUtc
# Crypted root password
rootpw --iscrypted $6$kkuIkd8S9gDUhK8g$1XbqJDCjt1zQAhxb9sC2mE5CGd.D0xV1efu0R8h1e.oovRKtEWqR5KaTDPSTztpxSw2qmDVORZJGnNpiJxUFT1
# MD5 password hashing
authselect --useshadow --passalgo=sha512
# Create my initial user :D
#user --disabled
user --name=xadmin --shell=/bin/bash --homedir=/home/xadmin --iscrypted --password=$6$y6lN/cfPPtlyaTXu$4QUYFl816sxWPuyR.eY6mCJ3ybYLNcF6Pw4ar4K7Dyy9LbedK3PjkTNZfWqSdoPRpJMjtrbpY1xQ.zDXxOTug.
network --device=eth0 --bootproto=dhcp --ipv6=auto --activate
# Run the Setup Agent on first boot
firstboot --disable
# SELinux configuration
selinux --disabled
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype=ext3 --size=1000
part swap --fstype="swap" --recommended
part / --fstype=xfs --size=1 --grow
# Reboot after installation
reboot --eject
%packages
@base
@core
nfs-utils
sudo
qemu-guest-agent
%end
%post
# Update the system
yum -y update
# Istall the EPEL repository
yum -y install epel-release
yum -y install wget vim yum-plugin-versionlock
usermod -aG wheel xadmin
systemctl enable qemu-guest-agent
%end