Defs Reference¶
This page is auto-generated from the platform and spec data files. It documents all template variables (defs) used by each platform.
Configuration Defaults¶
These defaults are set in ~/.config/osimager/config.json (or built-in if not configured):
| Variable | Default Value |
|---|---|
boot_disk_size |
16384 |
cpu_cores |
2 |
cpu_sockets |
1 |
memory |
2048 |
Local ISO Platforms¶
virtualbox¶
Builder type: virtualbox-iso
Platform defs:
| Variable | Value |
|---|---|
local |
True |
Template variables referenced (>>var<<):
cd_label— specfirmware— computediso_checksum— speciso_name— speciso_path— locationiso_url— speclocal_only— computedname— computedvms_path— location
Value replacements (%>var<%):
cd_files
Numeric expressions (#>expr<#):
boot_disk_sizecpu_sockets*cpu_coresmemory
Eval expressions (E>expr<E):
'' if >>local_only<< else '>>iso_path<</>>iso_name<<''>>iso_checksum<<' if len('>>iso_checksum<<') else 'none''>>iso_path<</>>iso_name<<' if >>local_only<< else '>>iso_url<<'
vmware¶
Builder type: vmware-iso
Platform defs:
| Variable | Value |
|---|---|
local |
True |
Template variables referenced (>>var<<):
cd_label— specfirmware— computediso_checksum— speciso_name— speciso_path— locationiso_url— speclocal_only— computedname— computedvms_path— location
Value replacements (%>var<%):
cd_files
Numeric expressions (#>expr<#):
boot_disk_sizecpu_corescpu_sockets*cpu_coresmemory
Eval expressions (E>expr<E):
'' if >>local_only<< else '>>iso_path<</>>iso_name<<''>>iso_checksum<<' if len('>>iso_checksum<<') else 'none''>>iso_path<</>>iso_name<<' if >>local_only<< else '>>iso_url<<'
qemu¶
Builder type: qemu
Platform defs:
| Variable | Value |
|---|---|
libvirt_uri |
`` |
Template variables referenced (>>var<<):
boot_disk_size— config defaultcd_label— speciso_checksum— speciso_name— speciso_path— locationiso_url— speclocal_only— computedname— computedvms_path— location
Value replacements (%>var<%):
cd_files
Numeric expressions (#>expr<#):
cpu_corescpu_socketsmemory
Eval expressions (E>expr<E):
'' if >>local_only<< else '>>iso_path<</>>iso_name<<''>>iso_checksum<<' if len('>>iso_checksum<<') else 'none''>>iso_path<</>>iso_name<<' if >>local_only<< else '>>iso_url<<''host' if os.access('/dev/kvm', os.W_OK) else 'max''kvm' if os.access('/dev/kvm', os.W_OK) else 'none'
hyperv¶
Builder type: hyperv-iso
Platform defs:
| Variable | Value |
|---|---|
hyperv_generation |
2 |
local |
True |
switch_name |
Default Switch |
Template variables referenced (>>var<<):
cd_label— speciso_checksum— speciso_name— speciso_path— locationiso_url— speclocal_only— computedname— computedswitch_name— computedvms_path— location
Value replacements (%>var<%):
cd_files
Numeric expressions (#>expr<#):
boot_disk_sizecpu_sockets*cpu_coreshyperv_generationmemory
Eval expressions (E>expr<E):
'' if >>local_only<< else '>>iso_path<</>>iso_name<<''>>iso_checksum<<' if len('>>iso_checksum<<') else 'none''>>iso_path<</>>iso_name<<' if >>local_only<< else '>>iso_url<<'
xenserver¶
Builder type: xenserver-iso
Platform defs:
| Variable | Value |
|---|---|
local |
True |
Template variables referenced (>>var<<):
cd_label— speciso_checksum— speciso_name— speciso_path— locationiso_url— speclocal_only— computedname— computedvms_path— location
Value replacements (%>var<%):
cd_files
Numeric expressions (#>expr<#):
boot_disk_sizecpu_sockets*cpu_coresmemory
Eval expressions (E>expr<E):
'' if >>local_only<< else '>>iso_path<</>>iso_name<<''>>iso_checksum<<' if len('>>iso_checksum<<') else 'none''>>iso_path<</>>iso_name<<' if >>local_only<< else '>>iso_url<<'
Enterprise Platforms¶
vsphere¶
Builder type: vsphere-iso
Platform defs:
| Variable | Value |
|---|---|
thin_disk |
False |
vm_network |
VM Network |
Template variables referenced (>>var<<):
cd_label— speccluster— locationdatacenter— locationdatastore— locationesxi_host— locationfirmware— computedfolder— locationiso_checksum— speciso_name— speciso_path— locationiso_url— speclocal_only— computedlocation_name— computedname— computedspec_name— specvm_network— location
Value replacements (%>var<%):
cd_filesthin_disk
Numeric expressions (#>expr<#):
boot_disk_sizecpu_sockets*cpu_coresmemory
Eval expressions (E>expr<E):
'>>iso_checksum<<' if len('>>iso_checksum<<') else 'none''>>iso_path<</>>iso_name<<' if >>local_only<< else '>>iso_url<<''windows' if '>>spec_name<<'.startswith('win') else 'linux'
Vault/credential variables:
| Variable | Vault Path |
|---|---|
vsphere-password |
vsphere/>>location_name<<:password |
vsphere-server |
vsphere/>>location_name<<:server |
vsphere-username |
vsphere/>>location_name<<:username |
proxmox¶
Builder type: proxmox-iso
Platform defs:
| Variable | Value |
|---|---|
shutcmd |
False |
Template variables referenced (>>var<<):
boot_disk_size— config defaultbuild_id— computedcd_label— specfirmware— computediso_checksum— speciso_name— speciso_path— locationiso_storage_pool— locationiso_url— speclocal_only— computedlocation_name— computedproxmox_node— locationvm_storage_pool— location
Value replacements (%>var<%):
cd_files
Numeric expressions (#>expr<#):
cpu_corescpu_socketsmemory
Eval expressions (E>expr<E):
'' if >>local_only<< else '>>iso_path<</>>iso_name<<''>>iso_checksum<<' if len('>>iso_checksum<<') else 'none''>>iso_storage_pool<<:iso/>>iso_name<<' if >>local_only<< else '>>iso_url<<''false' if >>local_only<< else 'true''ovmf' if '>>firmware<<' == 'efi' else 'seabios'{'efi_storage_pool': '>>vm_storage_pool<<', 'efi_type': '4m'} if '>>firmware<...
Vault/credential variables:
| Variable | Vault Path |
|---|---|
name |
{{ build_name }} |
proxmox-password |
proxmox/>>location_name<<:password |
proxmox-server |
proxmox/>>location_name<<:server |
proxmox-username |
proxmox/>>location_name<<:username |
Cloud Platforms¶
azure¶
Builder type: azure-arm
Platform defs:
| Variable | Value |
|---|---|
boot |
False |
image_version |
latest |
shutcmd |
False |
vm_size |
Standard_D2s_v3 |
Template variables referenced (>>var<<):
azure_image_offer— specazure_image_publisher— specazure_image_sku— specazure_location— locationazure_resource_group— locationimage_version— computedlocation_name— computedname— computedspec_name— specvm_size— computed
Value replacements (%>var<%):
azure_replication_regions
Eval expressions (E>expr<E):
'Windows' if '>>spec_name<<'.startswith('win') else 'Linux'
Vault/credential variables:
| Variable | Vault Path |
|---|---|
az-bastion-hostname |
azure/>>location_name<<:bastion_hostname |
az-bastion-keyfile |
azure/>>location_name<<:bastion_keyfile |
az-bastion-username |
azure/>>location_name<<:bastion_username |
client-id |
azure/>>location_name<<:client_id |
client-secret |
azure/>>location_name<<:client_secret |
gallery-name |
azure/>>location_name<<:gallery_name |
gallery-resource-group |
azure/>>location_name<<:gallery_resource_group |
gallery-subscription-id |
azure/>>location_name<<:gallery_subscription_id |
subscription-id |
azure/>>location_name<<:subscription_id |
tenant-id |
azure/>>location_name<<:tenant_id |
gcp¶
Builder type: googlecompute
Platform defs:
| Variable | Value |
|---|---|
boot |
False |
disk_type |
pd-ssd |
machine_type |
n1-standard-2 |
shutcmd |
False |
state_timeout |
15m |
Template variables referenced (>>var<<):
disk_type— computedgcp_image_family— specgcp_region— locationgcp_source_image_family— specgcp_source_image_project_id— specgcp_zone— locationlocation_name— computedmachine_type— computedname— computedstate_timeout— computed
Vault/credential variables:
| Variable | Vault Path |
|---|---|
gcp-bastion-hostname |
gcp/>>location_name<<:bastion_hostname |
gcp-bastion-password |
gcp/>>location_name<<:bastion_password |
gcp-bastion-username |
gcp/>>location_name<<:bastion_username |
gcp-creds |
gcp/>>location_name<<:credentials_json |
project-id |
gcp/>>location_name<<:project_id |
service-account-email |
gcp/>>location_name<<:service_account_email |
aws¶
Builder type: amazon-ebs
Platform defs:
| Variable | Value |
|---|---|
boot |
False |
instance_type |
t3.medium |
shutcmd |
False |
Template variables referenced (>>var<<):
aws_ami_filter_name— specaws_region— locationaws_subnet_id— locationaws_vpc_id— locationinstance_type— computedlocation_name— computedname— computed
Value replacements (%>var<%):
aws_ami_owners
Vault/credential variables:
| Variable | Vault Path |
|---|---|
aws-access-key |
aws/>>location_name<<:access_key |
aws-secret-key |
aws/>>location_name<<:secret_key |
Special Platforms¶
none¶
Builder type: null
Platform defs:
| Variable | Value |
|---|---|
boot |
False |
shutcmd |
False |
Computed Defs¶
These defs are computed during the build pipeline and are available for template substitution:
| Variable | Source | Description |
|---|---|---|
name |
CLI or spec | VM/image name (hostname or spec name) |
fqdn |
Computed | Fully qualified domain name (name + domain) |
ip |
CLI or DNS | IP address (from CLI arg or DNS lookup) |
platform |
CLI | Platform name from target |
location |
CLI | Location name from target |
dist |
Spec provides | Distribution name |
version |
Spec provides | Full version string |
major |
Computed | Major version number |
minor |
Computed | Minor version number |
arch |
Spec provides | Architecture (x86_64, aarch64, etc.) |
firmware |
Location or default | Firmware type (bios or efi) |
base_path |
Settings | OSImager package base directory |
data_path |
Settings | Data directory path |
user_dir |
Settings | User config directory (~/.config/osimager) |
temp_dir |
Computed | Temporary build directory |
spec_dir |
Computed | Spec data directory path |
spec_name |
Computed | Spec identifier (dist-version-arch) |
platform_name |
CLI | Platform name |
location_name |
CLI | Location name |
platform_type |
Platform config | Packer builder type |
subnet |
Computed | Subnet from CIDR |
prefix |
Computed | Network prefix from CIDR |
netmask |
Computed | Netmask from CIDR prefix |
gateway |
Location or CIDR | Gateway address |
dns1 |
Location DNS | Primary DNS server |
dns2 |
Location DNS | Secondary DNS server |
dns_search |
Location DNS | DNS search domain |
ntp1 |
Location NTP | Primary NTP server |
iso_url |
Spec or local | ISO download URL |
iso_name |
Computed | ISO filename |
iso_checksum |
Computed | ISO checksum value |
local_only |
Settings | Whether to use local ISOs only |