[Plugin] LXC Plugin


Recommended Posts

30 minutes ago, gxlwrc said:

After the installation, click Start and there is no response. It still cannot be restarted several times. It can only be started by restarting the raid

Can you please be a bit more specific?

Where do you click start? Can you maybe post screenshots from what isn't working exactly?

On what Unraid version are you? Can you maybe post your Diagnostics?

 

Have you read the first page on how to use LXC? Have you seen that you have to enable cgroup2 on Unraid for some distributions?

Link to comment
6 minutes ago, ich777 said:

你能更具体一点吗?

你在哪里点击开始?你能从不完全工作的东西中发布屏幕截图吗?

你在哪个Unraid版本上?您可以发布您的诊断信息吗?

 

你读过如何使用LXC的第一页吗?你有没有看到你必须在Unraid上为某些发行版启用cgroup2?

My version is 6.11.5,I'm afraid I really didn't notice that cgroup 2 must be enabled for some distributions on Unraid

1.png

2.png

3.png

Link to comment
13 minutes ago, gxlwrc said:

My version is 6.11.5,I'm afraid I really didn't notice that cgroup 2 must be enabled for some distributions on Unraid

Please enable it and see if it helps. If not, let me know and I will look into that.

 

I've now tried a fresh install on a second machine and it just works fine OOB even with cgroup v1.

Can you post your Diagnostics please, I think something is messing with the cgroup on your System...

 

No issue over here:

grafik.thumb.png.4d16a210d7a5834d8ab38479b8e4e8bc.png

...even on cgroup v1

Link to comment
2分钟前,ich777 说:

你在 /boot/extra 中有大量的软件包,你真的需要所有这些吗?

某些软件包可能弄乱了 cgroups。

 

LXC以前是否工作过,或者这是您第一次安装LXC?

您是否尚未尝试重新启动?

好了,我先试试启用解袭组2~

Link to comment
3 minutes ago, ich777 said:

You have a ton of packages in /boot/extra, do you really need all of them?

It is possible that some of the packages are messing with the cgroups.

 

Was LXC working before or is this the first time you've installed LXC?

Have you yet tried to reboot?

I have tried many times. LXC can only work normally after the unraid is restarted

Link to comment
8 minutes ago, gxlwrc said:

I have tried many times. LXC can only work normally after the unraid is restarted

As said above, no issue over here and I can start or restart any LXC container that I want.

 

I would strongly recommend that you remove the packages from /boot/extra and try if it's the same without the packages, if not, one of the packages causes the issue.

Link to comment
15 minutes ago, ich777 said:

As said above, no issue over here and I can start or restart any LXC container that I want.

 

I would strongly recommend that you remove the packages from /boot/extra and try if it's the same without the packages, if not, one of the packages causes the issue.

Both methods have been tried. After enabling cgroup 2 and deleting the software packages you mentioned, it still doesn't work~I don't know what to do

Link to comment
15 minutes ago, gxlwrc said:

Both methods have been tried. After enabling cgroup 2 and deleting the software packages you mentioned, it still doesn't work~I don't know what to do

Can you please post a screenshot from your settings?

Where is your LXC directory located? Please double check that your LXC directory is not on a share which is moved by the Mover.

 

Can you please open up a Unraid terminal and post the output from:

ls -la /boot/config/plugins/lxc/packages

 

I've never seen such an issue before, have you any custom scripts in place which are actually messing with the cgroup?

Link to comment
12 hours ago, ich777 said:

Can you please post a screenshot from your settings?

Where is your LXC directory located? Please double check that your LXC directory is not on a share which is moved by the Mover.

 

Can you please open up a Unraid terminal and post the output from:

ls -la /boot/config/plugins/lxc/packages

 

I've never seen such an issue before, have you any custom scripts in place which are actually messing with the cgroup?

 

4.png

5.png

Link to comment
45 minutes ago, gxlwrc said:

 

4.png

 

I really can't tell what's happening on your system and why it don't want to work.

 

Now contacted someone else where I know LXC is running and he confirmed that he is also on LXC-5.0.2 and has no issue whatsoever like me.

 

Can you maybe post your Diagnostics again so that I can go through them, maybe some other left over package on your system causes that.

 

The share lxc on your system is set to Only use cache correct?

Link to comment
2小时前,ich777 说:

我真的不知道你的系统上发生了什么,为什么它不想工作。

 

现在联系了我知道 LXC 正在运行的其他人,他确认他也在 LXC-5.0.2 上,并且像我一样没有任何问题。

 

您能否再次发布您的诊断程序,以便我可以浏览它们,也许您系统上的其他剩余软件包会导致这种情况。

 

系统上的共享 lxc 设置为仅使用缓存正确吗?

 

6.png

tower-diagnostics-20230125-2140.zip

Link to comment
37 minutes ago, gxlwrc said:

 

6.png

I really can't see anything obvious from the logs and why it isn't working on your system.

 

If you start the container from the GUI can you open up a terminal too or does this fail too?

Have you yet tried after uninstalling the plugin to also remove the lxc directory that was created on your cache and install the plugin again and see if that makes any difference?

 

Otherwise I really don't know what to do next because this is really something that I've never seen before.

Is it somehow possible that the LXC container image that was downloaded for Debian in your case got somehow corrupted? Have you yet tried any other distribution than Debian?

Please try removing the download folder which is located in your cache folder in your lxc directory and try to install the Debian again, maybe it can't pull the image correctly, that's my best guess.

Link to comment
28 minutes ago, ich777 said:

I really can't see anything obvious from the logs and why it isn't working on your system.

 

If you start the container from the GUI can you open up a terminal too or does this fail too?

Have you yet tried after uninstalling the plugin to also remove the lxc directory that was created on your cache and install the plugin again and see if that makes any difference?

 

Otherwise I really don't know what to do next because this is really something that I've never seen before.

Is it somehow possible that the LXC container image that was downloaded for Debian in your case got somehow corrupted? Have you yet tried any other distribution than Debian?

Please try removing the download folder which is located in your cache folder in your lxc directory and try to install the Debian again, maybe it can't pull the image correctly, that's my best guess.

Yes, I deleted everything~and then re-build LXC, and re-downloaded all kinds of containers, including Debian and Centos, which can't run. I noticed that when I click start in the browser world to try to run the established container, the browser page will flash quickly for several times~I don't know whether the browser will affect this

Link to comment
34 minutes ago, gxlwrc said:

the browser page will flash quickly for several times

Usually it should refresh the page once to update the status from the container status.

 

34 minutes ago, gxlwrc said:

I don't know whether the browser will affect this

The LXC pluin is confirmed to work on Chrome, Brave and Firefox. Anyways the browser shouldn't affect the behaviour of the plugin whatsoever.

Link to comment

Every time I create a container with Ubuntu (have tried anything else besides the default Debian one), it always creates a Debian container. I am able to do it via the command line. I've tried different releases with no luck.

 

Edit: it won't start though

image.thumb.png.8aa986a8f06aed301e7d9c58108f14e5.png

 

Config:

 

 

image.png

Edited by Exes
Link to comment
6 hours ago, Exes said:

it always creates a Debian container

I don‘t understand. How do you check that it always creates a Debian one?

 

6 hours ago, Exes said:

Edit: it won't start though

Have you read the first post that you have to enable cgroup v2 on Unraid to be able to run newer containers which use systemd?

 

EDIT: I've tried it now on my system with cgroup v1 (I'm not really a Ubuntu person so I have to try it on my own):

 

Create the LXC Container:

1.png.940c7bcbff947c6d5155cc5770078b84.png

 

This is the screen where it pulled the image:

2.png.13c4dc5dc153525c3887a9fa69082218.png

 

After I go back to the LXC tab:

3.png.7a8af605deafd3409d7b0fb6c79dcc15.png

 

This is the configuration:

4.png.ab681ba472f3e875f74cbd41f6830a73.png

 

And after that I tried to start the container from the Unraid terminal and got this:

5.png.ccabb1e803232ab41d4dc54570863f49.png

 

Well it was not starting on cgroup v1 after I switched to cgroup v2 it looked completely different:

6.png.44710274b340720cffb4c3d341f0a449.png

 

So it seems you are using cgroup v1 on your system but I still don't know what you mean that it fails to create a Ubuntu LXC container...?

 

BTW cgroup v2 will be the default on Unraid 6.12.0

Link to comment
21 hours ago, ich777 said:

Usually it should refresh the page once to update the status from the container status.

 

The LXC pluin is confirmed to work on Chrome, Brave and Firefox. Anyways the browser shouldn't affect the behaviour of the plugin whatsoever.

I gave up~I really can't find a solution

Link to comment
28 minutes ago, gxlwrc said:

I gave up~I really can't find a solution

I also can't tell why it's not working on your machine, just look one post above yours, even if I start a container in the foreground it is working fine with cgroup v2 but not with cgroup v1.

 

BTW, I've gone through the new Diagnostics that you've sent, you still haven't enabled cgroup v2 there on your Unraid installation.

Can you maybe post a screenshot where you've enabled cgroup v2?

Link to comment
19 hours ago, ich777 said:

I don‘t understand. How do you check that it always creates a Debian one?

 

Have you read the first post that you have to enable cgroup v2 on Unraid to be able to run newer containers which use systemd?

 

EDIT: I've tried it now on my system with cgroup v1 (I'm not really a Ubuntu person so I have to try it on my own):

 

Create the LXC Container:

1.png.940c7bcbff947c6d5155cc5770078b84.png

 

This is the screen where it pulled the image:

2.png.13c4dc5dc153525c3887a9fa69082218.png

 

After I go back to the LXC tab:

3.png.7a8af605deafd3409d7b0fb6c79dcc15.png

 

This is the configuration:

4.png.ab681ba472f3e875f74cbd41f6830a73.png

 

And after that I tried to start the container from the Unraid terminal and got this:

5.png.ccabb1e803232ab41d4dc54570863f49.png

 

Well it was not starting on cgroup v1 after I switched to cgroup v2 it looked completely different:

6.png.44710274b340720cffb4c3d341f0a449.png

 

So it seems you are using cgroup v1 on your system but I still don't know what you mean that it fails to create a Ubuntu LXC container...?

 

BTW cgroup v2 will be the default on Unraid 6.12.0

Quote

I don‘t understand. How do you check that it always creates a Debian one?

In the logs it always says DebianLXC and has the Debian logo

 

I added the cgroup2 to my syslinux and it actually created it this time but the container still won't start

image.png.2509ce0c74cd685b2afd16f39990f9f8.png

 

Here is my config 

image.thumb.png.53f3b44a088b4307177b89746dd0abe8.png

Link to comment

Awesome to see this! LXC has been something that I've sorely missed since migrating from Proxmox years back. Install was straightforward and got a Debian container going, no fuss. Anxious to see where this goes and crossing fingers that maybe this can be mainlined into Unraid proper down the road?

 

Have had a handful of custom scripts that I haven't migrated to docker yet that run infrequently and it has been a terrible waste keeping a full fat VM running 24/7 just for these. Moving them back over to LXC is going to be such a nice change.

 

One thing I do have to ask: Am I missing something to see the container memory usage? I'm seeing the other container stats but it's not showing the memory usage.

Edited by cr08
Link to comment

Thank you for creating this plugin. First time trying LXC and it is awesome. Created default DebianLXC and it worked fine. It starts in 1 or 2 seconds which is amazing. Tried your backup script and ran into this error. Not a big deal but just wanted to let you know

tar: ./rootfs/var/lib/apt/lists/deb.debian.org_debian-security_dists_bullseye-security_main_i18n_Translation-en: file name is too long (max 99); not dumped

tar: Exiting with failure status due to previous errors
Backup Failed!

Edit: Though it says Backup Failed, it did create tar file. Did not attempt restoring.

 

Edited by csrihari
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.