Terraform module for bootstrapping Talos Linux VMs on libvirt/KVM for Omni deployment.
Boots VMs with Talos Linux ISO images, creating an infrastructure foundation ready to be provisioned and managed by Omni. Provides configurable control plane and worker nodes with networking and multi-disk support. The VMs boot from the ISO and await Omni to deploy and configure the actual Talos cluster.
- Terraform >= 1.0
- libvirt/KVM
- Talos Linux ISO
- libvirt storage pool (default: "default")
- Host CPU with x86-64-v2 or higher microarchitecture level (required by Talos Linux)
module "talos_cluster" {
source = "github.com/bashfulrobot/Talos-booter"
cluster_name = "dev-lab"
iso_path = "/path/to/talos.iso"
control_plane_count = 3
worker_count = 3
}module "talos_cluster" {
source = "github.com/bashfulrobot/Talos-booter"
cluster_name = "dev-lab"
iso_path = "/path/to/talos.iso"
libvirt_uri = "qemu+ssh://user@remote-host/system?keyfile=/path/to/ssh/key"
control_plane_count = 3
worker_count = 3
}cluster_name- Name prefix for all resourcesiso_path- Full path to Talos Linux ISO
network_type- Network mode (default: "route")network_cidr- Network CIDR (default: "172.29.187.0/24")network_gateway- Gateway IP (default: "172.29.187.1")dhcp_start_offset- DHCP range starting offset, reserves IPs 1 to offset-1 for static use (default: 31)
control_plane_count- Number of nodes (default: 3)control_plane_vcpu- vCPUs per node (default: 4)control_plane_memory- Memory in MB (default: 4096)control_plane_disk_size- Disk size in bytes (default: 107374182400 = 100GB)control_plane_suffix- Node name suffix (default: "cp")
worker_count- Number of nodes (default: 3)worker_vcpu- vCPUs per node (default: 4)worker_memory- Memory in MB (default: 8192)worker_disk_primary_size- Primary disk size in bytes (default: 107374182400 = 100GB)worker_disk_secondary_size- Secondary disk size in bytes (default: 214748364800 = 200GB)worker_suffix- Node name suffix (default: "wk")
libvirt_pool- Storage pool name (default: "default")libvirt_uri- Connection URI (default: "qemu:///system")autostart- VMs automatically start on host boot (default: true)
The module reserves the first 30 IPs in the network for static assignments (gateway, load balancers, etc.) by default. DHCP starts at offset 31.
For example, with network_cidr = "172.29.187.0/24":
- Reserved for static use:
172.29.187.1-172.29.187.30 - DHCP range:
172.29.187.31-172.29.187.254
You can adjust the reservation size using dhcp_start_offset.
VMs are configured with cpu { mode = "host-model" } to ensure modern CPU features and x86-64-v2+ microarchitecture level required by Talos Linux. This clones the host CPU model while maintaining migration compatibility between similar hosts.
network_name- Created network namecontrol_plane_names- List of control plane VM namesworker_names- List of worker VM namesall_vm_names- All VM names in cluster