With the open-source platform Proxmox, you can not only operate virtual machines but also easily deploy containers. The native format for this is Linux Containers (LXC), for which numerous templates are available. The setup and management are done via a web console, which also offers backup capabilities.
Avatar
Latest posts by Thomas Joos (see all)

After the relatively simple installation of Proxmox, in addition to VMs, you can also create and run containers. By default, these are Linux Containers (LXC) rather than the much more popular Docker containers. LXCs are operating system containers, while Docker encapsulates applications.

However, a Docker environment can also be set up on Proxmox, optionally within an LXC container or a VM.

This also means that only Linux containers can natively be operated on Proxmox, not those with other operating systems such as Windows or FreeBSD. If necessary, however, you can still use a VM.

Containers are managed with the Proxmox Container Toolkit (PCT), which provides a web-based console as well as the CLI tool pct.

Downloading container templates

Here I demonstrate the creation of a container via the web interface using the monitoring software Observium as an example.

To install a container, click on the name of the Proxmox server and then on local<Servername>. On the right side, the available templates appear under Container Templates.

Directory of container templates available for Proxmox

Directory of container templates available for Proxmox

Using the search field, you will find the desired container templates that you can then download to the local server. For Observium, the turnkey-observium image is available, but there are also alternative images.

Downloading the container template for observium

Downloading the container template for observium

After downloading, the image can be found in the Container Templates window. Only these images can be selected in the wizard for creating a container.

Creating a container

Containers can be created by clicking on the Create CT button at the top right of the homepage. This launches a wizard for this task. On the first page, you select the Proxmox server and set the container ID, its name (under "Host"), and a password.

Entering basic data for a new container

Entering basic data for a new container

In the next dialog, you select the previously downloaded image and the storage on the Proxmox server. At this point, it is also possible to use an Ubuntu image for the container and later install Observium within it via a script.

Selecting a template for the new container

Selecting a template for the new container

The further configuration is similar to that for other containers. This includes settings for disk space, CPU, memory, network, and DNS. Containers can access the same resources as VMs.

After starting, the container is visible on the web interface and can be used via the Console after clicking on it. Through the container's context menu, you start the environment if it does not boot up automatically.

Settings for a newly created container with observium

Settings for a newly created container with observium

Managing and cloning containers

By clicking on a container, you can see the menu items on the right side that allow you to manage containers. Proxmox displays the current resource usage under Overview, which you can edit via the corresponding menu item.

The web console hhowing the current resource usage of a container

The web console hhowing the current resource usage of a container

The DNS and Network menu items are responsible for the network settings of the container, while the "Firewall" area handles security.

To create a backup of the container, use Backup. Here, you can create snapshots of the container, which are then found under the corresponding menu item. With these, you can reset containers to an earlier state. User management is done through permissions.

Through the container's context menu on the left side, it is possible to clone the container. Additionally, you can save it with all the set settings as a template. This is then available for creating containers.

Summary

The free virtualization environment Proxmox can run containers in addition to VMs. The native format for this is the LXC specific to Linux, for which numerous templates exist.

After downloading a template from the repository, you can easily create a container based on it with the help of a graphical wizard. This also allows for the convenient adjustment of allocated resources and settings.

Subscribe to 4sysops newsletter!

Individually configured containers can then be saved as templates in turn. The integrated tools also include a backup that secures the state of a container as a snapshot.

avatar
0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account