add serial console to template

This commit is contained in:
2023-10-23 12:56:10 +02:00
parent c2cd9fb877
commit 1e4eac0602
3 changed files with 8 additions and 1 deletions

View File

@@ -69,7 +69,6 @@ cloud_init_modules:
# The modules that run in the 'config' stage # The modules that run in the 'config' stage
cloud_config_modules: cloud_config_modules:
- emit_upstart
- ssh-import-id - ssh-import-id
- locale - locale
- set-passwords - set-passwords

View File

@@ -11,4 +11,11 @@ build {
destination = "/etc/cloud/cloud.cfg.d/99-pve.cfg" destination = "/etc/cloud/cloud.cfg.d/99-pve.cfg"
source = "cloudinit/99-pve.cfg" source = "cloudinit/99-pve.cfg"
} }
provisioner "shell" {
inline = [
"sed -i -e 's/GRUB_CMDLINE_LINUX=\".*\"/GRUB_CMDLINE_LINUX=\"quiet console=tty0 console=ttyS0,115200\"/' /etc/default/grub",
"update-grub",
"systemctl enable serial-getty@ttyS0.service"
]
}
} }

View File

@@ -28,6 +28,7 @@ source "proxmox-iso" "debian-12-bookworm-cloudinit-template" {
memory = "2048" memory = "2048"
cloud_init = true cloud_init = true
cloud_init_storage_pool = "local" cloud_init_storage_pool = "local"
serials = ["socket"]
scsi_controller = "virtio-scsi-pci" scsi_controller = "virtio-scsi-pci"
disks { disks {