|
|
|
/**
|
|
|
|
* MSVSphere Packer template variables.
|
|
|
|
*/
|
|
|
|
|
|
|
|
variable "os_version_9" {
|
|
|
|
description = "The target MSVSphere 9 version"
|
|
|
|
type = string
|
|
|
|
default = "9.4"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "os_version_8" {
|
|
|
|
description = "The target MSVSphere 8 version"
|
|
|
|
type = string
|
|
|
|
default = "8.10"
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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.4-x86_64-netinstall.iso"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "iso_url_8_x86_64" {
|
|
|
|
description = "MSVSphere 8 x86_64 installation ISO URL"
|
|
|
|
type = string
|
|
|
|
default = "https://rsync.inferitos.ru/msvsphere/8/isos/x86_64/MSVSphere-8.10-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.4-x86_64-netinstall.iso.CHECKSUM"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "iso_checksum_8_x86_64" {
|
|
|
|
description = "MSVSphere 8 x86_64 installation ISO checksum"
|
|
|
|
type = string
|
|
|
|
default = "file:https://rsync.inferitos.ru/msvsphere/8/isos/x86_64/MSVSphere-8.10-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/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/OVMF/OVMF_VARS.fd"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "qemu_binary" {
|
|
|
|
description = "QEMU binary path"
|
|
|
|
type = string
|
|
|
|
// on Fedora use "/usr/bin/qemu-kvm"
|
|
|
|
default = "/usr/bin/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 = [
|
|
|
|
"<up><wait><tab> inst.text inst.gpt inst.lang=en_US.UTF-8 ",
|
|
|
|
"inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/msvsphere-9-vagrant.x86_64.ks",
|
|
|
|
"<enter><wait>"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vagrant_boot_cmd_8_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-8-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-4-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_boot_cmd_8_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-8-10-BaseOS-x86_64 ro",
|
|
|
|
" inst.text biosdevname=0 net.ifnames=0",
|
|
|
|
" inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/msvsphere-8-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"
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* OVF-specific settings.
|
|
|
|
*/
|
|
|
|
|
|
|
|
variable "vmware_disk_size" {
|
|
|
|
description = "The VM disk size in megabytes"
|
|
|
|
type = number
|
|
|
|
default = 20000
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ovf_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-ovf.x86_64.ks",
|
|
|
|
"<enter><wait>"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ovf_ssh_username" {
|
|
|
|
description = "A login to use for SSH authentication"
|
|
|
|
type = string
|
|
|
|
default = "root"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ovf_ssh_password" {
|
|
|
|
description = "A password to use for SSH authentication"
|
|
|
|
type = string
|
|
|
|
default = "msvsphere"
|
|
|
|
}
|