fix: fix defaults for pve 8.x (#4)
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #4
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-committed-by: Robert Kaussow <mail@thegeeklab.de>
This commit is contained in:
Robert Kaussow 2024-01-14 20:58:18 +01:00 committed by Robert Kaussow
parent aba59ee684
commit d7508a2704
5 changed files with 26 additions and 25 deletions

View File

@ -4,3 +4,5 @@ HashiCorp
ISOs
bitop
VMID
kickstart
VM

View File

@ -24,7 +24,7 @@ Download the **latest** release.
### Step 2 - Download the Guest Operating Systems ISOs
1. Download the required guest operating system ISO images (e.g. `Rocky-9.0-x86_64-minimal.iso`).
1. Download the required guest operating system ISO images (e.g. `Rocky-9.3-x86_64-minimal.iso`).
2. Obtain the checksum type (e.g. `sha256`, `md5`, etc.) and checksum value for each guest operating system `.iso` image. This will be used in the build input variables.
3. Upload the guest operating system `.iso` images to your Proxmox server.
@ -38,7 +38,7 @@ If required, modify the configuration and scripts files.
## Build
Initialize packer and start a build.
Initialize packer and start a build. Packer creates a local HTTP server to provide the kickstart file for the VM. For this to work, the Proxmox server must be able to reach the host IP of the Packer host.
> **Info:** Using the force flag will automatically remove existing _templates_ with a matching name or VMID.

View File

@ -3,12 +3,11 @@ vm_id = 910
vm_guest_os_keyboard = "de(nodeadkeys)"
vm_guest_os_timezone = "Europe/Berlin"
vm_cloud_init = true
vm_cloud_init_storage_pool = "storage01"
vm_qemu_agent = true
// Proxmox Settings
proxmox_iso_pool = "local:iso"
proxmox_iso_file = "Rocky-9.0-x86_64-minimal.iso"
proxmox_iso_file = "Rocky-9.3-x86_64-minimal.iso"
proxmox_template_description = "Rocky Linux 9 Template"
proxmox_template_name = "rocky-9-cloud"

View File

@ -2,7 +2,7 @@ packer {
required_version = ">= 1.8.3"
required_plugins {
proxmox = {
version = "1.1.2"
version = "1.1.6"
source = "github.com/hashicorp/proxmox"
}
}
@ -52,7 +52,6 @@ source "proxmox-iso" "rocky-linux-9" {
disk_size = "${var.vm_disk_size}"
format = "${var.proxmox_storage_format}"
storage_pool = "${var.proxmox_storage_pool}"
storage_pool_type = "${var.proxmox_storage_pool_type}"
type = "scsi"
}
@ -61,6 +60,7 @@ source "proxmox-iso" "rocky-linux-9" {
// Removable Media Settings
iso_file = "${var.proxmox_iso_pool}/${var.proxmox_iso_file}"
http_content = "${local.data_source_content}"
http_interface = "${var.http_interface}"
// Boot and Provisioning Settings
boot_wait = "10s"

View File

@ -48,12 +48,6 @@ variable "proxmox_storage_pool" {
default = "local-lvm"
}
variable "proxmox_storage_pool_type" {
type = string
description = "The type of the storage pool."
default = "lvm-thin"
}
variable "proxmox_template_description" {
type = string
description = "Description of the template, visible in the Proxmox interface."
@ -110,7 +104,7 @@ variable "vm_cpu_cores" {
variable "vm_cpu_type" {
type = string
description = "The CPU type to emulate."
default = "host"
default = "x86-64-v2-AES"
}
variable "vm_mem_size" {
@ -140,7 +134,7 @@ variable "vm_disk_thin_provisioned" {
variable "vm_network_adapter_model" {
type = string
description = "Model of the virtual network adapter."
default = "e1000"
default = "virtio"
}
variable "vm_network_adapter_bridge" {
@ -173,6 +167,12 @@ variable "vm_qemu_agent" {
default = false
}
variable "http_interface" {
type = string
description = "Name of the network interface that Packer gets HTTPIP from."
default = ""
}
// Communicator Settings and Credentials
variable "build_password" {
type = string