mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-21 15:53:16 +01:00
fix boot command and other small improvements
This commit is contained in:
parent
a9a688ccd6
commit
865ea5db0e
@ -1,6 +1,6 @@
|
||||
# Ubuntu Server Focal
|
||||
# Ubuntu Server Noble (24.04.x)
|
||||
# ---
|
||||
# Packer Template to create an Ubuntu Server (Focal) on Proxmox
|
||||
# Packer Template to create an Ubuntu Server (Noble 24.04.x) on Proxmox
|
||||
|
||||
# Variable Definitions
|
||||
variable "proxmox_api_url" {
|
||||
@ -75,14 +75,17 @@ source "proxmox-iso" "ubuntu-server-noble" {
|
||||
|
||||
# PACKER Boot Commands
|
||||
boot_command = [
|
||||
"c<wait>",
|
||||
"linux /casper/vmlinuz --- autoinstall ds=\"nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/\"",
|
||||
"<enter><wait>",
|
||||
"initrd /casper/initrd",
|
||||
"<enter><wait>",
|
||||
"boot","<enter>"]
|
||||
"<esc><wait>",
|
||||
"e<wait>",
|
||||
"<down><down><down><end>",
|
||||
"<bs><bs><bs><bs><wait>",
|
||||
"autoinstall ds=nocloud-net\\;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ---<wait>",
|
||||
"<f10><wait>"
|
||||
]
|
||||
|
||||
boot = "c"
|
||||
boot_wait = "10s"
|
||||
communicator = "ssh"
|
||||
|
||||
# PACKER Autoinstall Settings
|
||||
http_directory = "http"
|
||||
@ -100,7 +103,8 @@ source "proxmox-iso" "ubuntu-server-noble" {
|
||||
# ssh_private_key_file = "~/.ssh/id_rsa"
|
||||
|
||||
# Raise the timeout, when installation takes longer
|
||||
ssh_timeout = "20m"
|
||||
ssh_timeout = "30m"
|
||||
ssh_pty = true
|
||||
}
|
||||
|
||||
# Build Definition to create the VM Template
|
||||
@ -115,11 +119,12 @@ build {
|
||||
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done",
|
||||
"sudo rm /etc/ssh/ssh_host_*",
|
||||
"sudo truncate -s 0 /etc/machine-id",
|
||||
"sudo apt-get -y autoremove --purge",
|
||||
"sudo apt-get -y clean",
|
||||
"sudo apt-get -y autoclean",
|
||||
"sudo apt -y autoremove --purge",
|
||||
"sudo apt -y clean",
|
||||
"sudo apt -y autoclean",
|
||||
"sudo cloud-init clean",
|
||||
"sudo rm -f /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg",
|
||||
"sudo rm -f /etc/netplan/00-installer-config.yaml",
|
||||
"sudo sync"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user