Fixes for restricted environment

This commit is contained in:
2026-04-17 23:45:25 +02:00
parent 63fd768d6c
commit d12d90ea54
2 changed files with 28 additions and 0 deletions

View File

@@ -60,6 +60,18 @@ variable "vm_folder" {
default = "" default = ""
} }
variable "resource_pool" {
type = string
description = "Resource pool name (use 'Resources' for standalone ESXi hosts)"
default = "Resources"
}
variable "http_ip" {
type = string
description = "IP of the Packer host NIC reachable by the build VM (required on multi-NIC hosts)"
default = ""
}
# ── VM hardware ────────────────────────────────────────────────────────────── # ── VM hardware ──────────────────────────────────────────────────────────────
variable "vm_name" { variable "vm_name" {
@@ -148,6 +160,7 @@ source "vsphere-iso" "debian" {
cluster = var.cluster cluster = var.cluster
datastore = var.datastore datastore = var.datastore
folder = var.vm_folder folder = var.vm_folder
resource_pool = var.resource_pool
# VM identity # VM identity
vm_name = var.vm_name vm_name = var.vm_name
@@ -191,6 +204,7 @@ source "vsphere-iso" "debian" {
# Packer starts a local HTTP server to serve the preseed file. # Packer starts a local HTTP server to serve the preseed file.
http_directory = "${path.root}/http" http_directory = "${path.root}/http"
http_ip = var.http_ip
http_port_min = 8100 http_port_min = 8100
http_port_max = 8199 http_port_max = 8199

View File

@@ -60,6 +60,18 @@ variable "vm_folder" {
default = "" default = ""
} }
variable "resource_pool" {
type = string
description = "Resource pool name (use 'Resources' for standalone ESXi hosts)"
default = "Resources"
}
variable "http_ip" {
type = string
description = "IP of the Packer host NIC reachable by the build VM (required on multi-NIC hosts)"
default = ""
}
# ── VM hardware ────────────────────────────────────────────────────────────── # ── VM hardware ──────────────────────────────────────────────────────────────
variable "vm_name" { variable "vm_name" {
@@ -148,6 +160,7 @@ source "vsphere-iso" "debian" {
cluster = var.cluster cluster = var.cluster
datastore = var.datastore datastore = var.datastore
folder = var.vm_folder folder = var.vm_folder
resource_pool = var.resource_pool
# VM identity # VM identity
vm_name = var.vm_name vm_name = var.vm_name
@@ -191,6 +204,7 @@ source "vsphere-iso" "debian" {
# Packer starts a local HTTP server to serve the preseed file. # Packer starts a local HTTP server to serve the preseed file.
http_directory = "${path.root}/http" http_directory = "${path.root}/http"
http_ip = var.http_ip
http_port_min = 8100 http_port_min = 8100
http_port_max = 8199 http_port_max = 8199