Deploying a LinuX Container(LXC) seemed like the next logical step in this Proxmox journey. The process is fairly quick and straightforward.

Before we dig in it should first be noted that although Linux Containers and Docker Containers both have “container” in the name, they are very different. I like this Pure blog discussing the differences.

Create a Pool

The first step in deploying LXC is to create a Pool in Proxmox. Click Datacenter in the left-hand pane, then select Pools under permissions, then Create. This is not necessarily an intuitive location so hopefully this screenshot helps.

I decided to be very original and name it Pool 1.

Downloading Templates

Next, we need to grab a template for use with our LXC. Select the storage device, in my case local, and then CT Templates.

In this screenshot, I already have some from previous efforts, but this will be empty on a fresh Proxmox deployment. Fortunately, if you select the Templates button there are a ton of templates to easily add to Proxmox.

And this is only a small handful. Having used Ansible in the past, I was curious how the Ansible template would look.

After choosing to download the template a status screen appears to give updates.

Deploy Container

Finally, we can deploy our container. You can either right-click the host, then Create CT or select Create CT on the top-right of the window.

Choose a name for the container and password. Select the Resource Pool created earlier. The option to proceed won’t appear until all these fields are complete.

Choose the desired template, in this case the ansible one I just downloaded.

Determine disk size and location.

For this test, I stuck with defaults for CPU and Memory.

I did however want to use DHCP for the IP address of the container.

Lastly, enter DNS settings if you like, and finish

A new task window will appear to give status updates.

In this particular instance, the container failed to start after deployment, so I needed to start it manually which succeeded.

Once deployed, I try the IP in a browser

It has instructions to console into the container in Proxmox, and login as root, using the password I configured at deployment.

Next, I am instructed to create an admin password:

Then an optional API key, this optional though so I skip it.

It then asks a few more questions about configuring an email and installing security updates, but I skip those as well as they are optional and this is just a temporary container

Then finally, it is done and I can log in.

Turns out the Ansible template is for Semaphore, which is a UI for Ansible among other things. I may poke around with it later.

That is how to deploy a LXC on Proxmox. Have a great one.

Categories: proxmox