Create a LXC container

Hello all,

Has anyone tried making a LXC container for Proxmox for Dietpi? I can see some considerable benefit to having something like this.

I’ve tried a couple times, and no dice.

I’ll continue trying but if anyone has done this, let me know.

We have container images available: Index of /downloads/images

The problem is that they contain an fstab which tries to mount root and boot partition. We need to remove any drive handling from those, which is not required or even conflicting with most container platforms.

Another issue is that they did not contain a network stack. AFAIK LXC containers are expected to configure their own network e.g. via ifupdown? We need to create two container image types, one with network support and one in cases where this host network is used directly.

Linking the related GitHub issue: Image | LXC container · Issue #5204 · MichaIng/DietPi · GitHub

Just dropping by to say Hi, as a huge Proxmox and now DietPi fan and of course I would also endorse an “official” (or without quotes as a matter of fact) LXC image for Proxmox (or bare LXD).

I’ll follow this tread and the changelog if anything comes up. Also gladly test it out.

there is an debian template for proxmox maybe trying to use the dietpi convert scrippt is possible?

So we hav an dietpi lxc template?!

Will try it this night!

I did try these conversions with a Debian template but had no success.
I did it on a different way by converting it from a running DietPi VM with a script.

Thanks for the trigger: Let me write a short blog post in the next days how I did this.

@tropy, @eisengrau, @mciarciaglini: I quickly wrote a blog post: DietPi LXC containers in Proxmox – DietPi Blog

In case of errors and possible description enhancements please leave a comment in the DietPi blog so that I can improve this “quick&dirty” post. :slight_smile:

i just digd down a bit and found that on download page there is an proxmox lxc download avaible

What do you mean? Could you provide a link?
Did this work?

@StephanStS thank you for your work! Unfortunately I tried running the scrpt, as per your description in your blog post. After copying the files from the VM filesystem to the /tmp template, it fails with:

400 too many arguments
pct create [OPTIONS]

Looks like something is wrong when parsing the correct parameters to pct create lxc.

Can you post the whole command line you used (in the step 3.1 of the blog post)?