Start unmanaged container from the Web UI?

raboof

New Member
Apr 20, 2020
4
0
1
41
Hi,

I have a custom-built LXC container (not based on any of the distro's explicitly supported at https://git.proxmox.com/?p=pve-cont...e0649d1779f4e709c207dcecf4ed62cf4;hb=HEAD#l18 ).

I have a non-root PAM user, and it seems elegant to not require root.

When I start the container from the Web UI, it fails because it cannot detect the OS. I read https://forum.proxmox.com/threads/i...reate-unable-to-detect-os-distribution.63323/ and it seems the solution is to run the container as 'unmanaged', but I don't see how to do this from the Web UI.

Is this possible?


Kind regards,

Arnout
 
Hi,

I have a custom-built LXC container (not based on any of the distro's explicitly supported at https://git.proxmox.com/?p=pve-cont...e0649d1779f4e709c207dcecf4ed62cf4;hb=HEAD#l18 ).

How did you created this CT in Proxmox VE? As if you say we don't support your distro (what is it?) our creation code path should error out.

When I start the container from the Web UI, it fails because it cannot detect the OS. I read https://forum.proxmox.com/threads/i...reate-unable-to-detect-os-distribution.63323/ and it seems the solution is to run the container as 'unmanaged', but I don't see how to do this from the Web UI.

Is this possible?
Can be, but we'd need some more details about what runs in the CT.
 
> How did you created this CT in Proxmox VE?

I created the image using 'nix' (all the details are at https://github.com/raboof/mastodon-bot-nix, though I'm not sure they're relevant here)

I have tested running the container on a system with 'lxd', there it works.

I uploaded the tarball into proxmox with the Storage section of the Web UI.

> what is it?

There isn't really a distro inside the image, it's just some Linux executables, scripts etc. The packages are derived from NixOS.
 
> How did you created this CT in Proxmox VE?

I created the image using 'nix' (all the details are at https://github.com/raboof/mastodon-bot-nix, though I'm not sure they're relevant here)

I have tested running the container on a system with 'lxd', there it works.
That's not answering how you created the Container in Proxmox VE that's how you created the rootfs, albeit that's also relevant.

I uploaded the tarball into proxmox with the Storage section of the Web UI.

So you have not yet a container configuration? That makes more sense. So you will have to use the "unmanaged" ostype, as anything else will fail.

Use the CLI for that, e.g., the following command should get you quite in the right direction:

Bash:
pct create 200  /local/path/to/rootfs.tar.gz --cores 2 --net0 name=eth0,bridge=vmbr0 --unprivileged 1 --start 1 --features nesting=1 --ostype unmanaged

Adapt vmid if 200 is not free (or desired), the path to the rootfs.tar can be either a fully local path or using the Proxmox VE volid (see pvesm list <storage> for how to get that).

You then need to handle networking inside the CT "yourself", but I guess nixOS handles that just fine.

There isn't really a distro inside the image, it's just some Linux executables, scripts etc. The packages are derived from NixOS.
"some Linux executables, scripts etc." that sounds like being quite similar to what most Distros consist of ;)
 
That's not answering how you created the Container in Proxmox VE that's how you created the rootfs, albeit that's also relevant.

Ah, right, sorry - I don't have all the nomenclature internalized just yet, I'll try to be more careful :)

Use the CLI for that

My PAM user doesn't have root, so AFAICS I cannot use the pct command-line tool (it returns "please run as root").

So you will have to use the "unmanaged" ostype, as anything else will fail.

Thanks for confirming. I tried to create the CT with the 'Create CT' button at the top-right of the web UI, but didn't find an option to set the ostype there. Did I miss it, or should I arrange root access?

You then need to handle networking inside the CT "yourself", but I guess nixOS handles that just fine.

We'll see ;)

"some Linux executables, scripts etc." that sounds like being quite similar to what most Distros consist of ;)

Heh, yes, of course ;)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!