mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-07 08:54:04 +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 Definitions
|
||||||
variable "proxmox_api_url" {
|
variable "proxmox_api_url" {
|
||||||
@ -75,14 +75,17 @@ source "proxmox-iso" "ubuntu-server-noble" {
|
|||||||
|
|
||||||
# PACKER Boot Commands
|
# PACKER Boot Commands
|
||||||
boot_command = [
|
boot_command = [
|
||||||
"c<wait>",
|
"<esc><wait>",
|
||||||
"linux /casper/vmlinuz --- autoinstall ds=\"nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/\"",
|
"e<wait>",
|
||||||
"<enter><wait>",
|
"<down><down><down><end>",
|
||||||
"initrd /casper/initrd",
|
"<bs><bs><bs><bs><wait>",
|
||||||
"<enter><wait>",
|
"autoinstall ds=nocloud-net\\;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ---<wait>",
|
||||||
"boot","<enter>"]
|
"<f10><wait>"
|
||||||
|
]
|
||||||
|
|
||||||
|
boot = "c"
|
||||||
boot_wait = "10s"
|
boot_wait = "10s"
|
||||||
|
communicator = "ssh"
|
||||||
|
|
||||||
# PACKER Autoinstall Settings
|
# PACKER Autoinstall Settings
|
||||||
http_directory = "http"
|
http_directory = "http"
|
||||||
@ -100,7 +103,8 @@ source "proxmox-iso" "ubuntu-server-noble" {
|
|||||||
# ssh_private_key_file = "~/.ssh/id_rsa"
|
# ssh_private_key_file = "~/.ssh/id_rsa"
|
||||||
|
|
||||||
# Raise the timeout, when installation takes longer
|
# Raise the timeout, when installation takes longer
|
||||||
ssh_timeout = "20m"
|
ssh_timeout = "30m"
|
||||||
|
ssh_pty = true
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build Definition to create the VM Template
|
# 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",
|
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done",
|
||||||
"sudo rm /etc/ssh/ssh_host_*",
|
"sudo rm /etc/ssh/ssh_host_*",
|
||||||
"sudo truncate -s 0 /etc/machine-id",
|
"sudo truncate -s 0 /etc/machine-id",
|
||||||
"sudo apt-get -y autoremove --purge",
|
"sudo apt -y autoremove --purge",
|
||||||
"sudo apt-get -y clean",
|
"sudo apt -y clean",
|
||||||
"sudo apt-get -y autoclean",
|
"sudo apt -y autoclean",
|
||||||
"sudo cloud-init clean",
|
"sudo cloud-init clean",
|
||||||
"sudo rm -f /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg",
|
"sudo rm -f /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg",
|
||||||
|
"sudo rm -f /etc/netplan/00-installer-config.yaml",
|
||||||
"sudo sync"
|
"sudo sync"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user