Install container from linux mint LXC template

stuckj

Active Member
Apr 9, 2019
7
3
43
45
Hi there,

I'm trying to get the latest Linux mint Ulyssa (20.1) lxc template to install in Proxmox via the web UI and am running into trouble. I grabbed the image from the linuxcontainers image repo here: https://images.linuxcontainers.org/images/mint/ulyssa/amd64/default/. Specifically, this was the latest rootfs image at the time I'm posting this: https://images.linuxcontainers.org/images/mint/ulyssa/amd64/default/20210525_08:51/rootfs.tar.xz. I uploaded this into the container templates via the web UI. Then, tried creating a template via the web UI using that template.

It seems proxmox doesn't recognize the "linuxmint" ID from /etc/os-release in the template and fails with an error. This is the exact error:

Code:
extracting archive '/var/lib/vz/template/cache/mint-ulyssa-20210525-rootfs.tar.xz'
Total bytes read: 872192000 (832MiB, 40MiB/s)
Detected container architecture: amd64
unknown ID 'linuxmint' in /etc/os-release file, trying fallback detection
unable to open file '/etc/network/interfaces.tmp.13283' - No such file or directory
TASK ERROR: unable to create CT 101 - error in setup task PVE::LXC::Setup::post_create_hook


Is this a supported operation (to install an LXC template that is not from proxmox via pveam)? And, if so...is there something I need to change to make this work?

I have Linux Mint working in a VM just fine already, but I wanted to try a container as I prefer the greater flexibility they give.

Any help would be appreciated. :)

Thanks!,
-John
 
Last edited:
As an update. I was able to get this to work by editing /etc/os-release and setting ID to ubuntu. And, editing /etc/lsb-release and setting it to the values from the ubuntu 20.04 container template (Linux Mint 20.1 is build off of ubuntu 20.04). That allowed it to install. And, I just changed those values back in the installed container.

However...that's not really ideal since you need to remember to change those back anytime you install from the lxc template. Also, you can't use the downloaded template directly (you have to update it if you download a newer template).

Is there a different way to do this that doesn't require hacks?
 
Another update. You can't change those values back in the container else the container will fail to start the next time you reboot or stop / start it. So, you actually must leave those values indicating the OS is ubuntu.

I don't know what further implications that has (not sure what apps might use the os / lsb information). But, it seems...not ideal.

Any way to do this that's less hacky?
 
I hadn't realized it, but I guess linuxcontainers.org is sponsored by Canonical. I had put the direct mirror link in there, but it looks like they changed the repos to be on a canonical domain. I'll update the original post.

But, if you just take the `us` off the front of my original links and it will redirect to what looks like the local canonical mirror for you. For me, https://images.linuxcontainers.org/images/mint/ulyssa/amd64/default/ redirects to https://us.lxd.images.canonical.com/images/mint/ulyssa/amd64/default/.
 
  • Like
Reactions: Pedulla
I was able to get this to work by editing /etc/os-release and setting ID to ubuntu. And, editing /etc/lsb-release
Did you change just the name line or the whole file(s)?

And I'm assuming you decompressed the image, edited the files, and recompressed the image; correct?
Did you have to do anything with the ownership of the files you changed?
 
Last edited:
Hi,

Same issue for AmazonLinux

Code:
Formatting '/var/lib/vz/images/109/vm-109-disk-0.raw', fmt=raw size=8589934592 preallocation=off
Creating filesystem with 2097152 4k blocks and 524288 inodes
Filesystem UUID: d1390a42-9a90-4b71-9755-bc467438369c
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
extracting archive '/var/lib/vz/template/cache/amazonlinux-default_20220203_amd64.tar.xz'
Total bytes read: 262103040 (250MiB, 81MiB/s)
Detected container architecture: amd64
unknown ID 'amzn' in /etc/os-release file, trying fallback detection
TASK ERROR: unable to create CT 109 - unable to detect OS distribution

Best Regards
 
Did you change just the name line or the whole file(s)?

And I'm assuming you decompressed the image, edited the files, and recompressed the image; correct?
Did you have to do anything with the ownership of the files you changed?
Yep. Decompress, edit, and re-compress. I left ownership as it was.

In the end I dumped the container and just went back to linux mint running in a VM. It would be nice if we could run standard containers from linuxcontainers in proxmox. Unfortunately, I think without changes on proxmox's side (or the hacks I mentioned) I don't think you can. Hoping we'll hear back from someone at proxmox on this. :)
 
  • Like
Reactions: Pedulla
I must be doing something wrong.
It installs okay and runs as root but I can't add any users and several (if not all) of the system files that would normally be owned by root:root are owned by ubuntu:ubuntu.
Not sure what that's all about.
 
I've just answered how I figured out to get around the issue, albeit on Pimox 7 with the latest version of Debian Bookworm (14 June 2023) container:

unable to open file '/etc/network/interfaces.tmp.xxxx' - No such file or directory

I've added my solution in this post:
https://forum.proxmox.com/threads/looking-for-rootfs-tar-xz.108821/#post-564530
(summary - Leave Static set, but don't enter any IPs. Edit /etc/systemd/network/eth0.network, add static IP + gateway, reboot)

It is more relevant to leave it there than duplicate here because it was specifically relating to Pimox 7, than just Proxmox, but it might help you guys here.
 

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!