虚拟化容器管理器-Incus
2024-09-11 17:33:42 阿炯

Incus 是一个容器和虚拟机管理器。用于编排管理应用型容器、系统型容器及虚拟机实例的管理工具,它是对 Canonical LXD 的继承与发展,引入了更多的存储驱动支持。采用Go语言开发并在ApacheV2.0协议下授权使用。

Incus is a modern, secure and powerful system container and virtual machine manager.


它基于 LXC 运行容器,基于 QEMU 运行虚拟机,提供了一种无缝的云体验,可以从开发者的笔记本电脑扩展到最多 50 台服务器的完整集群。除了管理容器和虚拟机之外,Incus 还提供了各种选项来管理存储和网络。

在 LXC-Incus 项目中,容器被分为两类:一是应用型容器(当前流行的产品主要有 docker 、podman、Containerd)、一是系统型容器(主要由 LXC 驱动,当前流行的管理工具是 LXD)。此二者之间的区别是:应用型容器智能运行一个APP、系统型容器可以同时运行多个APP(可以媲美于虚拟机)。Incus的服务端组件支持在多个 Linux发行版上部署(目前尚不支持Windows或Mac-Unix发行版);客户端组件可以在 Linux/Windows/Mac-Unix平台上部署。


It provides a unified experience for running and managing full Linux systems inside containers or virtual machines. Incus supports images for a large number of Linux distributions (official Ubuntu images and images provided by the community) and is built around a very powerful, yet pretty simple, REST API. Incus scales from one instance on a single machine to a cluster in a full data center rack, making it suitable for running workloads both for development and in production. Incus allows you to easily set up a system that feels like a small private cloud. You can run any type of workload in an efficient way while keeping your resources optimized.


Features


Core API

Secure by design (through unprivileged containers, resource restrictions, authentication, ...)
Intuitive (with a simple, clear API and crisp command line experience)
Scalable (from containers on your laptop to clusters of thousands of compute nodes)
Event based (providing logging, operation, and lifecycle events)
Remote usage (same API used for local and network access)
Project support (as a way to compartmentalize sets of images and profiles)

Instances and profiles

Image based (with images for a wide variety of Linux distributions, published daily)
Instances (containers and virtual-machines)
Configurable through profiles (applicable to both containers and virtual machines)

Backup and export

Backup and recovery (for all objects managed by Incus)
Snapshots (to save and restore the state of an instance)
Container and image transfer (between different hosts, using images)
Instance migration (importing existing instances or transferring them between servers)

Configurability

Multiple storage backends (with configurable storage pools and storage volumes)
Network management (including bridge creation and configuration, cross-host tunnels, ...)
Advanced resource control (CPU, memory, network I/O, block I/O, disk usage and kernel resources)
Device passthrough (USB, GPU, unix character and block devices, NICs, disks and paths)

最新版本:6.5
2024年9月在继v6.4版本发布仅一个月后推出了全新更新的v6.5。此次更新的重点在于大幅提升性能,并引入了一系列新功能,进一步优化了用户体验和系统管理。

性能提升:任务优化带来效率飞跃
为了显著提升效率,Incus 6.5 对以往耗时较长的任务进行了深度优化。例如,启动检查、配置文件和设备的处理等操作经过优化后,性能提升了 20 到 30 倍之多。原本需要几十分钟完成的任务,现在几秒钟内即可搞定,为用户节省了大量时间和资源。

实例自动重启:确保服务连续性
新版本的一大亮点是实例的自动重启功能。当应用容器意外退出时,系统会在一分钟内自动尝试重启多达 10 次。这项功能在面对应用崩溃或重载等问题时,能快速恢复服务,有效保证了应用的连续性和稳定性,特别适用于对稳定性有高要求的生产环境。

CLI 优化:更灵活的输出格式
为了提升命令行界面(CLI)的使用体验,v6.5 对列表命令输出进行了改进,使其更一致且更具定制性。用户可以使用 “–format” 和 “–columns” 选项来自定义输出格式,使脚本编写和自动化任务更加便捷。这种灵活的输出方式尤其对开发者和系统管理员非常有利,能更轻松地进行数据分析和任务处理。

虚拟化增强:QEMU 钩子和实时磁盘调整
在虚拟化方面,v6.5 加强了对虚拟机管理的支持,特别是引入了新的 QEMU 钩子和脚本功能。通过 QEMU 机器协议(QMP),用户可以对虚拟机进行详细的配置和动态响应,满足复杂和特定的需求。此外v6.5 首次支持虚拟机的实时磁盘调整,允许用户在不重启系统的情况下对根磁盘或附加磁盘进行调整。这使得用户能够立即利用扩展的存储容量,极大地提升了实时数据管理的灵活性。

网络改进:OVN 负载均衡器的健康检查支持
在网络方面也进行了重要升级,增加了对 OVN 负载均衡器的健康检查初步支持。通过配置健康检查间隔、故障阈值等自定义参数,用户可以更好地监控和管理后端服务的性能,确保系统的可靠性和服务可用性。

v6.5 带来了显著的性能提升和丰富的新功能,强化了系统的效率和稳定性。无论是自动重启功能、实时磁盘调整,还是对虚拟化和网络的支持增强,都让用户在使用容器和虚拟机管理时更加得心应手。

官方主页:
https://linuxcontainers.org/

https://github.com/lxc/incus