1. vim /etc/cron.daily/lxc-update-template
  2. chmod +x /etc/cron.daily/lxc-update-template
#!/bin/bash
# =============================================================================
# Script Name: update_lxc_template.sh
# Version: 1.0
# Description: Starts the 'template' LXC container, performs an update &
#              upgrade inside it, and shuts it back down after.
# =============================================================================

CONTAINER="template"

echo "[DEBUG] Starting $CONTAINER..."
lxc-start -n "$CONTAINER"
Tags

Install Necessary Packages on Both Nodes

Begin by installing Incus and its associated tools on both node1 and node2.

  • apt update sudo apt install incus incus-tools

    The incus-tools package includes utilities like lxc-to-incus, which facilitates the migration of LXC containers to Incus.

Tags

1. Listing Available Images To view available Debian images:

  • incus image list images: debian

2. Launching a New Container To create and start a new container named debian13-container on the 16C32T node:

Tags

LXC

  1. https://wiki.debian.org/LXC
  2. ai lxc bridge-utils dnsmasq
  3. sc-status lxc lxcfs lxc-net
  4. LXCHOSTNAME=template
  5. export MIRROR=http://ftp.de.debian.org/debian
  6. lxc-create -n $LXCHOSTNAME -t debian -- -r bookworm
  7. lxc-start -n $LXCHOSTNAME
  8. lxc-ls -f
  9. lxc-info -n $LXCHOSTNAME -l DEBUG
  10. t /var/log/lxc/$LXCHOSTNAME.log 
  11. lxc-attach -n $LXCHOSTNAME adduser DEINUSER
  12. lxc-attach -n $LXCHOSTNAME adduser DEI
Tags
#!/bin/bash
# =============================================================================
# Script Name: lxc_list_login.sh
# Version: 03
# Description: Lists LXC containers, checks their statuses, and allows login.
# =============================================================================

# Required commands
REQUIRED_CMDS=("lxc-ls" "lxc-info" "lxc-start" "lxc-attach")

# Check if required commands are available
for CMD in "${REQUIRED_CMDS[@]}"; do
    if ! command -v "$CMD" &> /dev/null; then
        echo "The command $CMD is not installed.
Tags
#!/bin/bash
# v01

# List and check LXC containers
echo "Listing all LXC containers..."
CONTAINERS=($(lxc-ls -1))

# Check if there are any containers
if [[ ${#CONTAINERS[@]} -eq 0 ]]; then
    echo "There are no LXC containers."
    exit 1
fi

echo "Found ${#CONTAINERS[@]} container(s): ${CONTAINERS[@]}"
echo "----------------------------------"

# Loop over each container
for LXCHOSTNAME in "${CONTAINERS[@]}"; do
    echo "Processing container: $LXCHOSTNAME"

    # Stop the container
    echo "Stopping container $LXCHOSTNAME..."
    if !
#!/bin/bash
# =============================================================================
# Script Name: lxc_create_container.sh
# Version: 1.1
# Description: This script creates a new LXC container from a template, assigns
#              a unique MAC address, updates the hostname and /etc/hosts file,
#              and verifies internet access.
# =============================================================================

# Prompt for the new container hostname
read -e -p "LXCHOSTNAME: " LXCHOSTNAME
export LXCHOSTNAME

# Check if the template containe
Tags
#!/bin/bash
# =============================================================================
# Script Name: lxc_list_sed.sh
# Version: 1.10
# Description: This script lists all LXC containers, checks their statuses, and
#              updates the SENDMAILTO field in /etc/logcheck/logcheck.conf for 
#              running containers.
Tags
#!/bin/bash
# =============================================================================
# Script Name: lxc_package_install.sh
# Version: 1.1
# Author: Andreas Fleckl
# Description: This script installs a specified package in all running LXC
#              containers.

e2scrub_all.service

Online ext4 Metadata Check for All Filesystems was skipped because of an unmet condition check (ConditionCapability=CAP_SYS_RAWIO)

https://linux.debian.bugs.dist.narkive.com/950nrKYJ/bug-926138-e2scrub-reap-service-fails-in-lxc


 

Tags