Not Able to Create Unprivileged LXC container

TheShaper

New Member
Feb 21, 2019
3
0
1
35
Hello,

I already have multiple container running in privileged mode.
I discovered the way to migrate into unprivileged with the backup and restore trick.

I have existing hand made template for debian 8 and 9. I'm not able to create CT in unprivileged but backup and restore trick still working.

What "backup and restore" do that I need to do during creation ?

Regards.
 
First attempt :


Code:
tar: var/spool/postfix/dev/urandom: Cannot mknod: Operation not permitted
tar: var/spool/postfix/dev/random: Cannot mknod: Operation not permitted

I deleted these two directories for testing then :

Second attempt after deleting postfix files :

Code:
tar: bin/vdir: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/bzegrep: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/tar: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/true: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/zmore: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/systemd-escape: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/kmod: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/ypdomainname: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/bzfgrep: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/zcat: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/fgrep: Cannot change ownership to uid 100000, gid 100000: Invalid argument
tar: bin/bzmore: Cannot change ownership to uid 100000, gid 100000: Invalid argument

......

(tons of same errors with all files)

Regards
 
Hi Janssensm,

As I said, I already tried to rm and touch the postfix files. Sadly, other errors happens after that.
The "tar" errors on all CT files.
I actually create and restore with the "ignore-unpack-errors" flag but I'm a bit afraid about the consequences for the container.

If anyone have more information about potential issues, it could help.

Thx for your answers.

Regards,
 
Hi,

just know encountered the same error as TheShaper.

I created a container image using this guide https://pve.proxmox.com/wiki/Debian_Appliance_Builder, then stopped the machine and created a tar archive from it.
This tar archive is now used as template when creating a new container with pct create.

When creating, I get the same error as TheShaper (happens to all files in archive).
Code:
tar: ./bin: Cannot change ownership to uid 100000, gid 100000: Invalid argument

Any ideas on how to fix this. Am new to the proxmox community, sry if making a newbie mistake ;)
Thx for your help :)

Cheers,
 
I have succeed converted the lxc to another proxmox (A host).

1. backup lxc to nfs or other storage ,
2. in the A host, click nfs storage , click content, choose the backup file, click restore , check Unique and uncheck Unprivileged container, and then click restore ---completed .
 
This problem still exists! Currently it is not possible to use the backup / restore function from LXC Containers, because of the upper described Problem. I always getting the same error, when i want to restore a backup from an unprivilged LXC Container. I tried it with every compression setting (None, LZO, GZIP)!

"tar: ./bin: Cannot change ownership to uid 100000, gid 100000: Invalid argument"

Any Solution for this? Actually it seems that the backup / restore Feature is unusable / broken.
 
  • Like
Reactions: kmundi
I have succeed converted the lxc to another proxmox (A host).

1. backup lxc to nfs or other storage ,
2. in the A host, click nfs storage , click content, choose the backup file, click restore , check Unique and uncheck Unprivileged container, and then click restore ---completed .

This way doesn't work for me.

My workaround:
1. Create a container from a template in proxmox with the same os and unprivileged.
2. Go to the volume
Code:
cd /rpool/data/subvol-104-disk-0
3. Delete all data from template
Code:
rm -rf *
4. Extract image from lxd/lxc-container
Code:
tar xzvf icinga2.tar.gz
5. Successful start of container
Code:
pct start 104
 

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!