Jump to content

[Plugin] LXC Plugin


Recommended Posts

22 minutes ago, wy586 said:

Thank you for your prompt response. I have already uploaded it.

Hmmm, I also now just tried it and it is a bit more complicated that I thought.

On my machine Centos7 also doesn't start properly and it fails starting, sure you can connect to the terminal but the container is not started properly and that's the main issue.

I already found a few similar issues but I have to take a deeper look into why it's failing to start.

 

For now please run Centos7 in a VM if possible, I will definitely look into that but you have to give me a few days.

 

EDIT: Oh I found the answer:

Quote

You cannot boot centos7 on a cgroup2 system.

Source: https://discuss.linuxcontainers.org/t/debian-11-do-not-start-lxc-containers/12581/3 (this is from one of the main developers from LXC)

 

Since Unraid is a cgroup2 system you can't run it, however you barely wont be able to run it on another system because almost everything nowadays is using cgroup2

 

Sure you could switch Unraid to cgroup v1 but then the newer containers won't work and you also have to rebuild all your Docker containers because switching cgroups would require that because cgroup2 is not backward compatible.

Maybe you could run a Centos7 based Docker container and run these "older" services that you are trying to run in there?

 

Sorry for not having better news for you.

  • Thanks 1
Link to comment
14 hours ago, ich777 said:

Hmmm, I also now just tried it and it is a bit more complicated that I thought.

On my machine Centos7 also doesn't start properly and it fails starting, sure you can connect to the terminal but the container is not started properly and that's the main issue.

I already found a few similar issues but I have to take a deeper look into why it's failing to start.

 

For now please run Centos7 in a VM if possible, I will definitely look into that but you have to give me a few days.

 

EDIT: Oh I found the answer:

Source: https://discuss.linuxcontainers.org/t/debian-11-do-not-start-lxc-containers/12581/3 (this is from one of the main developers from LXC)

 

Since Unraid is a cgroup2 system you can't run it, however you barely wont be able to run it on another system because almost everything nowadays is using cgroup2

 

Sure you could switch Unraid to cgroup v1 but then the newer containers won't work and you also have to rebuild all your Docker containers because switching cgroups would require that because cgroup2 is not backward compatible.

Maybe you could run a Centos7 based Docker container and run these "older" services that you are trying to run in there?

 

Sorry for not having better news for you.

Thank you very much for your response. Thank you for your work on The LXC plugin, The LXC plugin is excellent.

  • Like 1
Link to comment
Posted (edited)

Hi there,

I have a problem with docker inside LXC containers - all extractions are very slow and it takes about 30 minutes to run docker container for the first time when it installs all dependencies.  I didnt have this problem on regular VM using the same disk for system.

Bez tytułu.png

2.png

Edited by stefan44
Link to comment
47 minutes ago, stefan44 said:

I have a problem with docker inside LXC containers - all extractions are very slow and it takes about 30 minutes to run docker container for the first time when it installs all dependencies.

Can you please share a bit more details?

What container are you using, what disk are you using, what Backing Storage type are you using. What path are you using?

 

Please also post your Diagnostics.

 

Just as a side note, I updated all my Docker container images a few days ago and I build them inside a LXC container (about 15GB of Docker images) this took around ~1,5 hours, which seems totally fine to me because I have around 160 Docker containers to update, you also have to include the installation from all the necessary packages inside the container images and upload to DockerHub and GHCR.

Link to comment
On 5/24/2024 at 3:10 PM, ich777 said:

I don't know anything about Turnkey, can you explain that a bit in detail, is this a Distribution or something that gets installed or is Turnkey installed in a container?

Turnkey is a set of custom Linux Distributions that are set up for specific usecases. Each use case gets its own installer, such a a Wordpress server, or JS dev stack or MySQL server or a LAMP stack.

 

Turnkey has both baremetal and LXC instances, and Proxmox includes the LXC instances for use in their system. Proxmox uses their own custom branded LCX and do the work to make them work there.

 

https://www.turnkeylinux.org/

 

They are siimilar but orthogonal to the Bitnami style APP/USECASE focused setups.

Link to comment
17 minutes ago, BillDStrong said:

Turnkey has both baremetal and LXC instances, and Proxmox includes the LXC instances for use in their system. Proxmox uses their own custom branded LCX and do the work to make them work there.

Thanks for the explanation.

 

This is something that I plan to release, basically pre-made container archives witch certain applications installed that can be downloaded directly through the CA App.

 

I already have a few proof of concept containers, the most complete one is here.

 

BTW, this container can already be installed:

  1. Open a Unraid terminal and execute:
    wget -O /tmp/lxc_container_template.xml https://github.com/ich777/unraid_lxc_pihole/raw/main/lxc_container_template.xml
  2. Open a browser and go to http://<YOUERSERVERIP>/LXCAddTemplate
  3. Install it
Link to comment
8 hours ago, ich777 said:

Thanks for the explanation.

 

This is something that I plan to release, basically pre-made container archives witch certain applications installed that can be downloaded directly through the CA App.

 

I already have a few proof of concept containers, the most complete one is here.

 

BTW, this container can already be installed:

  1. Open a Unraid terminal and execute:
    wget -O /tmp/lxc_container_template.xml https://github.com/ich777/unraid_lxc_pihole/raw/main/lxc_container_template.xml
  2. Open a browser and go to http://<YOUERSERVERIP>/LXCAddTemplate
  3. Install it

I am going to try out your pihole container now. This is a very cool feature, if it means we will be able to do the same ourselves.

 

I will say Turn key has more than 100+ applications they have been finetuning for more than a decade, and have other niceties such as backup to S3 and other features built in. Adding them is an easy win for you not having to support all those apps.

 

Turnkey is based on Debian Stable, and they provide support for their installs.

 

The apps they provide are less for home use like pihole is, and more for business and work related things. Wordpress setups, CRM, Storefronts etc.

 

They are great to practice on as a dev environment before pushing them to a live server. I think they would be orthogonal to what you are doing.

 

Anyway, thanks for looking.

  • Like 1
Link to comment

Is it possible to have the lxc path set to something else than the cache or the array?

I am trying to put it on a separate nvme that I use for all my docker containers and it doesn't accept the path.

 

/mnt/disks/Samsung_SSD_970_EVO_Plus_1TB_S4EWNF0M532569N/lxc

 

image.thumb.png.cf490ac29efb4a29f4a05b20416136f4.png

Link to comment

do you have a recommend path for updating containers to next gen containers of same distro?

Ubuntu as example

if I edit the source file and distro upgrade, it will upgrade off the old version and install the next gen packages.
 

Link to comment
5 hours ago, bmartino1 said:

do you have a recommend path for updating containers to next gen containers of same distro?

Do it as usual like if it's installed on a physical machine, nothing would stop you from doing a distribution upgrade.

 

5 hours ago, bmartino1 said:

Ubuntu as example

If you execute something like from within the container should do the job just fine (please note that this is specific to Ubuntu) :

apt update
apt install -y ubuntu-release-upgrader-core
apt full-upgrade -y
do-release-upgrade

(here the release upgrader is also installed because it is not installed IIRC)

 

5 hours ago, bmartino1 said:

if I edit the source file and distro upgrade, it will upgrade off the old version and install the next gen packages.

No, LXC is basically a VM but with shared resources/Kernel and you have to upgrade it manually. It does nothing on it's own because it acts like a VM.

  • Like 1
Link to comment

Good evening. Today I made some changes to my server which required moving a couple of DebianVNC LXC containers I created quite awhile ago. I moved them and updated the configs and saw they started but I did not check if they got any further before completing an unrecoverable change to the disk they previously lived. No big deal, I thought, they are handling something simple and easy to setup, I'll just create new containers. Unfortunately, it looks like the DebianVNC option is no longer available. If the feature is no longer a simple button, does anyone happen to have a copy+paste of the commands to install the necessary packages before I try to figure it out on my own?

Link to comment
1 hour ago, mournful-hive3872 said:

If the feature is no longer a simple button, does anyone happen to have a copy+paste of the commands to install the necessary packages before I try to figure it out on my own?

Please give me a bit and I will present a solution that is easy to install. :)

Link to comment

@mournful-hive3872 please make sure to update the plugin before doing the following because I pushed a bugfix to the plugin:

  1. Open up a Unraid terminal and execute this command:
    wget -O /tmp/lxc_container_template.xml https://raw.githubusercontent.com/ich777/unraid_lxc_debian_novnc/master/lxc_container_template.xml
  2. In your Browser navigate to: http://YOURSERVERIP/LXCAddTemplate
  3. Click "Apply"
  4. Wait for the Done button to appear (this can take a bit depending on your Internet connection)

After that you have a fully Debian Bookworm container as before, you even can click the container icon and select WebUI which will take you to the WebUI from the container:

grafik.png.4cb2dd539f8eeb1decfaea98aa4bcdc0.png

 

Hope that helps.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...