Step-by-Step Guide to Install a Kali LXC Container in Proxmox 8.3.2

Proxmox provides a variety of LXC container templates that you can download directly from the console. However, one notable omission is the Kali Linux template. In this guide, I’ll walk you through the steps to set up a Kali LXC container on Proxmox 8.3.2!

  1. Download the Kali LXC Container: Navigate to your local node’s storage, select the ‘CT Templates’ panel, and click on ‘Download from URL.’ This action will open a window that we’ll use shortly.

storage

You can browse all available LXC containers at linuxcontainers.org, for this guide we will be using the Kali template that can be found here

https://images.linuxcontainers.org/images/kali/current/amd64/default/

The Kali images update nightly, we will be using the most recent version 20241225_17:14 (Merry Christmas)

catalog

Locate and download the SHA256SUMS file.

SHAs

After it downloads, open it with your preferred text editor and notate the SHA256 for rootfs.tar.xz.

SHAs

Navigate back to the Kali index page and right-click and copy the link address for the rootfs.tar.xz file.

RootTar

Back in the “Download from URL” window, paste the rootfs.tar.xz address and click “Query URL”. The “File Name” will say rootfs.tar.xz, we’re going to update that field to 2024-12-25-Kali-rootfs.tar.xz so we can keep track of the operating system and version/date. We’re also going to select Hash algorithm “SHA-256” and enter the following checksum we got from SHA256SUMS and click “Download”:

cd5a961fc89ee197e40edb69cad3c8246243339307d20ab130e8a6e5ed5cf424

Download

If everything checks out, you should get a “TASK OK” message:

TaskOK

Now you can check your “CT Templates” and you should see 2024-12-25-Kali-rootfs.tar.xz in there now! To create the new container, click the “Create CT” button at the top right corner of the screen:

NewCT

  1. Deploy the Kali LXC Container: There will be several screens in this enxt section, assume the last step for each is “Click the ‘Next’ button”

In the new dialog box, enter a hostname, set and confirm your root password, and ensure the “Advanced” checkbox is checked:

NewCT

In the “Template” tab, select 2024-12-25-Kali-rootfs.tar.xz from the drop down menu:

NewCT

In the “Disks” tab, we will expand the disk size from 8 to 20 GiBs. This step is important if you plan to install all default Kali packages from kali-linux-default as all packages take everal gigabytes:

NewCT

In the “CPU” tab, we’re going set it to two cores:

NewCT

In the “Memory” tab, set both Memory and Swap to 2048:

NewCT

In the “Network” tab, we’re going to assume the network has DHCP enabled for demonstration purposes and select the IPv4: DHCP option:

NewCT

In the “DNS” tab, we will be leaving the defaults:

NewCT

Lastly, we have the “Confirmation” tab. Check the “Start after created” box and click “Finish”

NewCT

A console window should pop-up, when the output reads “TASK OK”, you should be ready!

NewCT

Now we can navigate to the new CT and open the console. You will login with the username “root” and the password you set previously:

NewCT

If you’ve done everything right so far, you’ll now be at the Kali LXC Shell:

NewCT

We can validate functionality by updating and installing zsh to give us the traditional Kali feel, this one command run as root should give you everything you need to start:

apt update && apt upgrade -y && apt install zsh -y && chsh -s $(which zsh)

NewCT

Once everything finishes, you’ll want to log out and back in. You can use the following command to return you to the login screen:

exit

Once you log back in, you can run the following command to check which shell you are using now:

echo "$SHELL"

NewCT

That is all there is to it! If you want to download and install all of the default Kali linux packages, you can do that by running the following command (Keep in mind this will increase your resource utilization for your container):

apt install kali-linux-default -y