Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LXC Utils

A collection of utilities to simplify the management and administration of Linux Containers (LXC). This project aims to provide a robust set of tools for tasks that go beyond the standard LXC command-line interface, such as container migration, filesystem manipulation, and configuration management.

Overview

Managing a fleet of LXC containers can present challenges, especially when dealing with tasks like migrating containers between hosts or adjusting their ID mapping configurations. While the first utility in this set focuses on filesystem ID remapping, the overall purpose of this repository is to build a suite of tools to help automate and streamline these complex administrative tasks.

Key Features:

  • 🔄 Remap UID/GID ranges with configurable offsets

Installation

pip install lxc-utils

Dependencies

  • Required: Python 3.13+
  • Optional: pylibacl for ACL support

To install with ACL support:

# On Ubuntu/Debian
sudo apt-get install libacl1-dev
pip install lxc-utils pylibacl

# Or with Poetry
poetry add pylibacl

Usage

Quick Reference

Most Common Commands

# Dry run to preview changes
lxc-utils remap /var/lib/lxc/container/rootfs --from-base 100000 --to-base 50000000 --dry-run

# Perform actual remapping
lxc-utils remap /var/lib/lxc/container/rootfs --from-base 100000 --to-base 50000000

Getting Help

# General help
lxc-utils --help

# Command-specific help
lxc-utils remap --help

Examples

See examples for detailed scenarios.

Documentation

Development

This project uses Poetry for dependency management.

# Install dependencies
poetry install

# Run tests
poetry run pytest

# Build package
poetry build

Contributing

Contributions are welcome. See contributin.md for details.

License

MIT - see LICENSE file for details.

Support

About

Utilities to assist with the usage of Linux Containers/LXCs.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages