create container all failed

k-123

Well-Known Member
Mar 3, 2017
50
5
48
Hi all, my pve can not create container from template now, it was ok before.
have 2 proxmox , and mounted nfs share as container template / vm folder.

have tried:
1. do dist-upgrade
2. reboot pve
3. check read/write permission (create txt file from proxmox terminal to nfs share folder. passed.)
4. delete template image (from pve web console) and re-download and try again.
5. try different templates.
6. confirmed nfs permission settings correct.
still can't create container currently.

logs as below:
Code:
Virtual Environment 4.4-12/e71b7a74
Storage 'gzdsm01' on node 'pve-01'
Search:
Logs
()
Formatting '/mnt/pve/gzdsm01/images/125/vm-125-disk-1.raw', fmt=raw size=8589934592
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 2097152 4k blocks and 524288 inodes
Filesystem UUID: ece48aef-055f-465f-8bff-60dbbd32f1ff
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables:  0/64     done                           
Writing inode tables:  0/64     done                           
Creating journal (32768 blocks): done
Multiple mount protection is enabled with update interval 5 seconds.
Writing superblocks and filesystem accounting information:  0/64     done

extracting archive '/mnt/pve/gzdsm01/template/cache/ubuntu-16.04-standard_16.04-1_amd64.tar.gz'
tar: /mnt/pve/gzdsm01/template/cache/ubuntu-16.04-standard_16.04-1_amd64.tar.gz: Cannot open: Permission denied
tar: Error is not recoverable: exiting now
TASK ERROR: command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf /mnt/pve/gzdsm01/template/cache/ubuntu-16.04-standard_16.04-1_amd64.tar.gz --totals --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-xattr-write' -C /var/lib/lxc/125/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2

============================================

Virtual Environment 4.4-12/e71b7a74
Storage 'gzdsm01' on node 'pve-01'
Search:
Logs
()
Formatting '/mnt/pve/gzdsm01/images/125/vm-125-disk-1.raw', fmt=raw size=8589934592
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 2097152 4k blocks and 524288 inodes
Filesystem UUID: 1fa7bf4e-5cef-4538-b140-320926a82abb
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables:  0/64     done                           
Writing inode tables:  0/64     done                           
Creating journal (32768 blocks): done
Multiple mount protection is enabled with update interval 5 seconds.
Writing superblocks and filesystem accounting information:  0/64     done

extracting archive '/mnt/pve/gzdsm01/template/cache/ubuntu-14.04-standard_14.04-1_amd64.tar.gz'
tar: /mnt/pve/gzdsm01/template/cache/ubuntu-14.04-standard_14.04-1_amd64.tar.gz: Cannot open: Permission denied
tar: Error is not recoverable: exiting now
TASK ERROR: command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf /mnt/pve/gzdsm01/template/cache/ubuntu-14.04-standard_14.04-1_amd64.tar.gz --totals --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-xattr-write' -C /var/lib/lxc/125/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2


======================

Virtual Environment 4.4-12/e71b7a74

Formatting '/mnt/pve/gzdsm01/images/125/vm-125-disk-1.raw', fmt=raw size=8589934592
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 2097152 4k blocks and 524288 inodes
Filesystem UUID: 714d58b7-1606-48e9-9fb4-f25f9b33d50e
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables:  0/64     done                           
Writing inode tables:  0/64     done                           
Creating journal (32768 blocks): done
Multiple mount protection is enabled with update interval 5 seconds.
Writing superblocks and filesystem accounting information:  0/64     done

extracting archive '/mnt/pve/gzdsm01/template/cache/centos-7-default_20160205_amd64.tar.xz'
tar: /mnt/pve/gzdsm01/template/cache/centos-7-default_20160205_amd64.tar.xz: Cannot open: Permission denied
tar: Error is not recoverable: exiting now
TASK ERROR: command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf /mnt/pve/gzdsm01/template/cache/centos-7-default_20160205_amd64.tar.xz --totals --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-xattr-write' -C /var/lib/lxc/125/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2

BR
 
are you trying to create an unprivileged container? if so, the extraction of the template / backup happens as unprivileged user, so you need to allow read access to the tar archive for that user.
 
the default mapping (as indicated in your log) is
'u:0:100000:65536 g:0:100000:65536', which means that root (uid/guid 0) in the container / namespace gets mapped to uid/guid 100000 on the host.
 

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!