1. Information

2. Installation

  • Enter the following commands at command line.

    sudo apt-get install bridge-utils debootstrap lxd
    sudo systemctl status lxc-net
    sudo systemctl --type service
    ip address
    lxc-net.service         loaded failed failed  LXC network bridge setup

3. Configuration

4. Container Creation

  • Enter the following commands at command line.

    # Create privileged container.
    sudo lxc-create -n <name> -t debian -- -r bullseye
    ls -al /var/lib/lxc
    # Start container in background.
    sudo lxc-start -n <name>
    # Connect to container.
    sudo lxc-attach -n <name>
    
    # Create unprivileged container.

5. Container Configuration

  • Enter the following commands at command line.

    ip address
    ls -al /etc/resolv.conf
    cat /etc/resolv.conf
    
    scp -p smru@10.10.1.2:/media/Windows/Software/_Delta/delta-linux-tools-#.#.#-1-all.deb .
    dpkg -i delta-linux-tools-#.#.#-1-all.deb
    
    smru config apt                         # Configure apt repositories.
    
    smru install basic-tools                # Install apt-utils, curl and wget.
    
    smru setup bash                         # Install and configure bash shell for each user.
    smru setup cron                         # Install and configure cron.
    smru setup editor                       # Install and set default editor to vim.tiny for each user.
    smru setup locale                       # Install and configure locale.
    smru setup timezone                     # Install and configure time zone.
    
    smru setup inventory                    # Install and configure inventory.
    smru setup openssh                      # Install and configure openssh server.
    smru setup sudo                         # Install and configure sudo for each user.
    
    smru setup legacy-ethernet 10.10.1.# 10.10.1.170 10.10.1.1 smru.shoklo-unit.com
  • Restart the container.

  • Enter the following commands at a Command Line.

    ip address
    ls -al /etc/resolv.conf
    cat /etc/resolv.conf
    
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    sudo apt-get autoremove
    sudo apt-get autoclean
    
    cat /etc/debian_version
    df
    
    sudo smru setup snmp-server 10.10.1.12  # Install and configure snmp server.
    sudo smru setup vim                     # Install and configure vim editor for each user.
    
    sudo grep -Ei --color=always "bad |brok|cann|crit|deni|err:|erro|fail|igno|insu|leak|lost|miss|not |such|unab|warn" /var/log/syslog
    sudo zgrep -i 'systemd-networkd-wait-online' /var/log/syslog*
    sudo zgrep -i 'lost carrier' /var/log/syslog*