Systemd 261 is the latest version of the init system and service manager for Linux, introducing numerous new features and improvements. This guide will explain how to use the new features of systemd 261, focusing on practical and immediate aspects for system administrators and developers.

Systemd is a fundamental component for managing processes and services in many Linux distributions. The new features introduced in this version improve service management, security, support for cloud environments, containers, and virtual machines, making systemd more flexible and powerful.

  • System administrators: Discover how to better manage services, improve security, and use new network features.
  • Developers: Take advantage of new APIs and configuration options to optimize your applications.
  • Advanced users: Learn how to leverage new container and virtual machine features for development and production environments.

This guide will provide you with the knowledge needed to make the most of the new features of systemd 261, making your system management more efficient and secure.

Prerequisites

  • Operating system: Linux with systemd 261 installed
  • Hardware: TPM (Trusted Platform Module) for some security features
  • Additional software:
    • Varlink for accessing cloud services
    • D-Bus for service management

PROCEDURE: Configuring the cloud Instance Metadata Service in systemd 261

By the end of this guide, you will be able to configure the new cloud Instance Metadata Service in systemd 261, allowing local programs to access cloud metadata through a unified interface.

  • Step 1: Verify the systemd version

    systemd --version

  • Step 2: Configure the hwdb.d/40-imds.hwdb file

    Modify the configuration file to identify supported cloud platforms. Open the file with a text editor:

    sudo nano /usr/lib/udev/hwdb.d/40-imds.hwdb

    Verify that the file contains entries for supported cloud platforms, such as Amazon EC2, Microsoft Azure, Google Compute Engine, etc.

  • Step 3: Compile the hwdb database

    sudo systemd-hwdb update

  • Step 4: Enable and start systemd-imdsd

    sudo systemctl enable systemd-imdsd

  • Step 5: Configure network access to cloud metadata services (optional)

    If you want to limit network access to cloud metadata services for recognized platforms, modify the systemd-imdsd service configuration file:

    Add or modify the RestrictAddressFamily= line to specify allowed address families.

  • Step 6: Verify the configuration

    Verify that the systemd-imdsd service is running and that cloud metadata is accessible:

    Use appropriate tools to access cloud metadata and verify that the data is correctly retrieved.

Verification and Troubleshooting

After configuring and implementing the new features of systemd 261, it is essential to verify proper operation and resolve any issues.

Functionality Testing

  • Verification of the cloud Instance Metadata Service:
    • Run the command systemctl status systemd-imdsd to ensure the service is active and running.
  • TPM support check:
    • Ensure that systemd-boot and systemd-stub correctly measure SMBIOS data in PCR 1.
  • Network feature testing:
    • Verify the use of Varlink methods for managing network connections.
  • Verification of systemd-resolved:
    • Ensure that DNS cache sizes are correctly configured.
  • Boot feature testing:
  • Checking container and virtual machine features:
    • Verify that systemd-nspawn correctly forwards journal entries and preserves the file descriptor store.
    • Test the new features of systemd-vmspawn, such as support for bind-volume and headless console operation.

Problem Resolution

  • Issues with systemd-imdsd:
  • Conflicts with cloud-init:
  • TPM issues:
  • Network issues:
  • Issues with systemd-resolved:
  • Boot issues:

For more details and specific troubleshooting, consult the complete changelog.

By the end of this guide, you will have a comprehensive overview of the new features introduced in systemd 261 and be ready to leverage the new features to improve your system management.

Educational Summary

  • Cloud Instance Metadata Service: systemd-imdsd allows access to cloud metadata through a unified interface, supporting various cloud platforms.
  • TPM Support: New options such as ConditionSecurity=measured-os and SMBIOS measurements for enhanced security.
  • Service Manager: Support for Live Update Orchestration and Kexec Handover, with persistence of file descriptor stores.
  • Service Management: New properties such as ReloadCount and ConditionFraction for more granular service control.
  • Networking: Updates to systemd-networkd and systemd-resolved for more flexible network and DNS management.
  • Containers and VMs: New features for systemd-nspawn and systemd-vmspawn for advanced container and virtual machine management.

Call to Practice

Explore the new features of systemd 261 and experiment with the options described. For more details, consult the complete changelog.

Editorial Note and Disclaimer

The guides and content published on GoYou are the result of independent research and analysis activities, for informational, educational, and in-depth purposes.

GoYou does not constitute a journalistic publication or an editorial product pursuant to Law No. 62/2001 and does not engage in real-time information activities.

The GoYou project does not provide professional, technical, legal, or financial advice and disclaims all liability for the misuse of the information published.

In the Crypto sector, every investment involves risks: readers are invited to always inform themselves autonomously before making any decision.