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.
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
pip install lxc-utils- Required: Python 3.13+
- Optional:
pylibaclfor 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# 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# General help
lxc-utils --help
# Command-specific help
lxc-utils remap --helpSee examples for detailed scenarios.
- 📖 Full Documentation - Complete documentation index
- 🔧 API Reference - Using as a Python library
- ⚙️ Technical Details - Architecture and internals
- 🤝 Contributing - How to contribute
This project uses Poetry for dependency management.
# Install dependencies
poetry install
# Run tests
poetry run pytest
# Build package
poetry buildContributions are welcome. See contributin.md for details.
MIT - see LICENSE file for details.
- 🐛 Issues: GitHub Issues
- 📖 Documentation: See
docs/directory - 💬 Discussions: GitHub Discussions