Overview
Talos boots into maintenance mode on first start, waiting for a machine configuration to be pushed via the Talos API. OpenNebula provides network configuration to the VM through context variables incontext.sh.
Talos reads these variables to configure networking before entering maintenance mode, so talosctl apply-config can reach the node.
Prerequisites
- An OpenNebula cluster with at least one hypervisor node
- The OpenNebula CLI tools (
onevm,onetemplate, etc.) or access to the Sunstone web UI talosctlinstalled locally (installation guide)kubectlinstalled locally
Download the Talos disk image
Talos provides pre-built OpenNebula disk images via Image Factory. Use the following command to download the disk image: Use the following command to upload the image to OpenNebula:Configure network context
OpenNebula passes network configuration to VMs via context variables incontext.sh.
Talos reads the ETH0_* (and ETH1_*, etc.) variables to configure each network interface at boot time.
Talos triggers interface configuration on ETH*_MAC key presence, regardless of the NETWORK variable.
Using automatic network context (FIXED and RANGED pools)
SetNETWORK to "YES" in the VM context so that OpenNebula automatically populates the ETH*_ variables from the NIC definitions.
This requires the address pool to carry IP data (i.e. FIXED or RANGED type, not ETHER).
Using manual network variables for MAC-only pools
If the address pool type isETHER (MAC-only, no IP data), set NETWORK to "NO" and specify the interface parameters manually.
This prevents OpenNebula from overwriting the ETH*_ variables with empty strings.
YOUR_STATIC_IP, YOUR_GATEWAY_IP, and YOUR_DNS_IP with values appropriate for your network.
The $NIC[MAC] expression is resolved by OpenNebula at instantiation time from the NIC definition.
Create a virtual machine template
Below is a minimal VM template that boots Talos in maintenance mode with a static IP. Adjust resource values, disk size, and network names for your environment. ReplaceYOUR_NETWORK_NAME with the name of your OpenNebula virtual network, YOUR_STATIC_IP with the desired IP address for the node, and TALOS_IMAGE_NAME with the image name used in the upload step above.
Boot the VMs
Use the following command to start a control plane VM:RUNNING state.
Talos will boot and enter maintenance mode.
You can observe the boot progress from the VNC console in Sunstone, or via onevm show talos-cp-1.
Apply machine configuration
Export the node IP addresses as environment variables:_out/controlplane.yaml, _out/worker.yaml, and _out/talosconfig.
Note: Check the install disk name before applying the configuration. UseUse the following command to apply the configuration to the control plane node:talosctl get disks --insecure --nodes $CONTROL_PLANE_IPand updateinstall.diskin the generated YAML if needed (e.g.,/dev/vda).
Bootstrap the cluster
Use the following commands to configuretalosctl to use your new cluster:
Retrieve kubeconfig
Use the following commands to retrieve the kubeconfig and verify the cluster:Embed machine config using USER_DATA
Instead of pushing config via the Talos API after boot, you can embed the machine configuration directly in the VM context using theUSER_DATA variable.
Talos reads USER_DATA from the context and applies it automatically on first boot, bypassing maintenance mode.
This method works with any address pool type, including ETHER.
USER_DATA value.
Security note: TheUSER_DATAvariable is stored in the OpenNebula database and visible via the OpenNebula API to any user with access to the VM template or instance. Machine configurations contain sensitive data including cluster CA keys and bootstrap tokens. Usingtalosctl apply-config(the default approach above) avoids storing secrets in OpenNebula context entirely.
Troubleshooting
Node does not reach maintenance mode
-
Verify the context variables injected by OpenNebula using the CLI:
Check the
CONTEXTsection in the output and confirmETH0_MAC,ETH0_IP, andETH0_GATEWAYare present and non-empty. -
If using
NETWORKset to"YES"with anETHER-type pool, OpenNebula setsETH0_IPto an empty string, causing Talos to fail with a parse error. Switch toNETWORKset to"NO"with manualETH*_variables as described in the configure network context section, or use the USER_DATA method.
talosctl apply-config times out
- Confirm the node IP is reachable from your workstation.
- Check that the Talos maintenance mode API port (TCP 50000) is not blocked by a firewall.
- Verify the IP in the context matches what you expect by running
onevm show <VM_ID>.
Disk not found during install
Use the following command to list available disks while the node is in maintenance mode:install.disk in your controlplane.yaml (or worker.yaml) to match the correct device path, then re-apply the configuration.