You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

191 lines
4.6 KiB

/**
* MSVSphere Packer template variables.
*/
variable "os_version_9" {
description = "The target MSVSphere 9 version"
type = string
11 months ago
default = "9.3"
}
// TODO: switch to the boot ISO on production
variable "iso_url_9_x86_64" {
description = "MSVSphere 9 x86_64 installation ISO URL"
type = string
default = "https://repo1.msvsphere-os.ru/msvsphere/9/isos/x86_64/MSVSphere-9.3-x86_64-netinstall.iso"
}
variable "iso_checksum_9_x86_64" {
description = "MSVSphere 9 x86_64 installation ISO checksum"
type = string
default = "file:https://repo1.msvsphere-os.ru/msvsphere/9/isos/x86_64/MSVSphere-9.3-x86_64-netinstall.iso.CHECKSUM"
}
variable "headless" {
description = "Start the VM without a GUI console if true"
type = bool
default = true
}
variable "cpus" {
description = "The number of CPUs for a VM"
type = number
default = 2
}
variable "memory" {
description = "The amount of RAM in megabytes"
type = number
default = 2048
}
variable "boot_wait" {
description = "Time to wait before interacting with an OS bootloader menu"
type = string
default = "10s"
}
variable "root_shutdown_command" {
description = "The VM shutdown command"
type = string
default = "/sbin/shutdown -hP now"
}
variable "ssh_timeout" {
description = "The SSH connection timeout"
type = string
default = "1800s"
}
variable "post_cpus" {
description = "The number of CPUs to set for the VM after build"
type = number
default = 1
}
variable "post_memory" {
description = "The amount of RAM to set for the VM after build"
type = number
default = 1024
}
variable "http_directory" {
description = "The kickstart files directory path"
type = string
default = "http"
}
variable "uefi_ovmf_code" {
description = "QEMU/KVM UEFI firmware path"
type = string
// on Fedora use "/usr/share/OVMF/OVMF_CODE.fd"
default = "/usr/share/edk2/ovmf/OVMF_CODE.fd"
}
variable "uefi_ovmf_vars" {
description = "QEMU/KVM UEFI firmware variables path"
type = string
// on Fedora use "/usr/share/OVMF/OVMF_VARS.fd"
default = "/usr/share/edk2/ovmf/OVMF_VARS.fd"
}
variable "qemu_binary" {
description = "QEMU binary path"
type = string
// on Fedora use "/usr/bin/qemu-kvm"
default = "/usr/libexec/qemu-kvm"
}
/**
* Vagrant-specific settings.
*/
variable "vagrant_disk_size" {
description = "The VM disk size in megabytes"
type = number
default = 20000
}
variable "vagrant_boot_cmd_9_x86_64_bios" {
description = "The boot command for x86_64 VMs in a BIOS mode"
type = list(string)
default = [
"<tab> inst.text inst.gpt ",
"inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/msvsphere-9-vagrant.x86_64.ks",
"<enter><wait>"
]
}
variable "vagrant_ssh_username" {
description = "A login to use for SSH authentication"
type = string
default = "vagrant"
}
variable "vagrant_ssh_password" {
description = "A password to use for SSH authentication"
type = string
default = "vagrant"
}
variable "vagrant_shutdown_command" {
description = "The VM shutdown command"
type = string
default = "echo vagrant | sudo -S /sbin/shutdown -hP now"
}
variable "vnc_bind_address" {
description = "The Packer VNC server bind address"
type = string
default = "127.0.0.1"
}
variable "vnc_port_min" {
description = "The minimum port to use for Packer VNC server"
type = number
default = 5900
}
variable "vnc_port_max" {
description = "The maxium port to use for Packer VNC server"
type = number
default = 6000
}
/**
* Generic Cloud-specific settings.
*/
variable "gencloud_disk_size" {
description = "The VM disk size"
type = string
default = "10G"
}
variable "gencloud_boot_cmd_9_x86_64_uefi" {
description = "The boot command for x86_64 VMs in UEFI mode"
type = list(string)
default = [
"c<wait>",
"linuxefi",
" /images/pxeboot/vmlinuz",
" inst.stage2=hd:LABEL=MSVSphere-9-3-BaseOS-x86_64 ro",
" inst.text biosdevname=0 net.ifnames=0",
" inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/msvsphere-9-gencloud.x86_64.ks",
"<enter>",
"initrdefi /images/pxeboot/initrd.img",
"<enter>",
"boot<enter><wait>"
]
}
variable "gencloud_ssh_username" {
description = "A login to use for SSH authentication"
type = string
default = "root"
}
variable "gencloud_ssh_password" {
description = "A password to use for SSH authentication"
type = string
default = "msvsphere"
}