libvirtd system extension, installs it on a server with the configuration files that the extension’s services need, connects kubectl to the cluster, and checks that the host is ready.
This page installs Talos Linux on a server from an ISO. To use a cloud instance or a virtual machine on another hypervisor as the host, install Talos Linux with that platform’s guide, such as AWS, GCP, or Proxmox, using a Talos Linux image that includes the
libvirtd extension. Add the files from Step 3 to the machine configuration with talosctl patch machineconfig --nodes <host-ip> --patch hypervisor-users.yaml, then continue from Step 7.Before you begin
The steps on this page require:- A server that meets the requirements.
talosctlv1.15 or later.kubectl, to access the cluster in Step 6.
Step 1: Build an image with the libvirtd extension
Create a Talos Linux ISO that includes the libvirtd extension.
- CLI
- UI
Image Factory builds Talos Linux images with system extensions and identifies each combination of extensions by a schematic ID. The following steps use the Image Factory API to create a schematic with the
libvirtd extension and download its Talos Linux ISO.-
Run the following command to create
schematic.yaml, a schematic that adds thelibvirtdextension: -
Submit the schematic to Image Factory:
Image Factory responds with the schematic ID in the
idfield:The schematic ID is derived from the schematic’s contents, so this schematic always returns the same ID. -
Save the schematic ID, the Talos Linux version, and the server’s architecture in variables. Replace
<schematic-id>with the ID from the response,<talos-version>with v1.15.0-alpha.1 or later, and<arch>withamd64orarm64: -
Download the ISO that the server boots from:
Step 2: Boot the server from the ISO
The following steps boot the server into maintenance mode and prepare it for installation.- Boot the server from the ISO downloaded in Step 1. Talos Linux starts in maintenance mode, which means it runs from memory and waits for a machine configuration.
-
Save the IP address shown on the server’s console in a variable. If no display is connected, find the address in your DHCP server’s leases:
- Remove the installation media by unplugging the USB drive or unmounting the ISO, so that it cannot be selected as the install disk.
Step 3: Create the configuration files the extension needs
Two of thelibvirtd extension’s services, ext-virtqemud and ext-virtstoraged, start only after the host has /etc/passwd and /etc/group files. Talos Linux does not create these files, so they are added through the machine configuration with EtcFileConfig documents.
Create a configuration patch that defines both files:
/etc, see Managing User-Owned Files.
The next step adds this file to the generated machine configuration, so every host installed from it includes the files.
Step 4: Install Talos Linux
Applying a machine configuration to the server installs Talos Linux to its disk, and the configuration’s installer image determines what is installed. The following steps generate a machine configuration that installs Talos Linux with thelibvirtd extension and apply it to the server.
-
List the disks available on a server by running the following command against its IP address:
Save the ID of the disk to install to, such as
sdaornvme0n1, and a name for the cluster in variables: -
Generate the machine configuration. The
--install-imageflag points to the installer image built from your schematic, so the installed system includes thelibvirtdextension, and the--config-patchflag adds the files from Step 3:The command writes the machine configuration filescontrolplane.yamlandworker.yaml, and atalosconfigfile fortalosctl. -
Apply the control plane configuration to the server, which makes it the cluster’s control plane. Talos Linux installs to the disk and reboots:
-
Point
talosctlat the generatedtalosconfigfile, and set the server as its endpoint: -
After the server finishes rebooting, bootstrap the cluster. Run this command once:
Step 5: Add worker hosts (optional)
To run virtual machines on more than one server, add servers to the cluster as workers. Each worker is a hypervisor host with its own virtual machines.- Boot each server from the ISO downloaded in Step 1. After it boots, remove its installation media.
-
Save the servers’ IP addresses in a variable:
-
Check each server’s disks. The worker configuration installs Talos Linux to
/dev/$DISK_NAME, the same disk as on the first server:If a server has no disk with that ID, create a patch that installs Talos Linux to a different disk. Replace<disk-id>with the ID of the disk to install to: -
Apply the worker configuration to each server that installs to the same disk as the first server:
For a server that needs the patch from the previous step, apply the worker configuration with the patch instead:
Step 6: Access the cluster with kubectl
After the cluster is bootstrapped, Kubernetes starts on the hosts. Download akubeconfig file for the cluster and point kubectl at it:
STATUS column shows Ready once the node has finished starting, which can take a few minutes after bootstrap.
Step 7: Check that the hosts are ready
To confirm that thelibvirtd extension is installed, run:
NAME column lists libvirtd.
The extension runs the ext-virtqemud service, which Talos uses to start virtual machines. To confirm that the service is running, run:
ext-virtqemud with the state Running when the host is ready to run virtual machines. To check a worker host, run the same commands with its IP address.