I would really appreciate some help fixing this problem.
Summary
Since upgrading an LXC container host from bookworm to trixie, copying an unprivileged container using lxc-copy fails every time, both for old (bookworm host created containers) and new (trixie host created containers).
Reproducing the problem
Creating the test container
Below is the error-free creation of a trixie container. (N.B. It makes no difference if the mgrantprg@leonidas:~$ systemd-run --quiet --user --scope --property “Delegate=yes” – lxc-create -t download test
form is used).
mgrantprg@leonidas:~$ lxc-create -t download test
Downloading the image index
DIST RELEASE ARCH VARIANT BUILD
snip...
Distribution:debian
Release:trixie
Architecture:amd64
Using image from local cache
Unpacking the rootfs
You just created a Debian trixie amd64 (20260205_05:24) container.
To enable SSH, run: apt install openssh-server
No default root or user password are set by LXC.
The Failure
Attempts to copy the container always fail with the same output:-
mgrantprg@leonidas:~$ lxc-copy -n test -N test1
lxc-copy: test: ../src/lxc/mount_utils.c: move_detached_mount: 326 Permission denied - Failed to attach detached mount 5 to filesystem at 3
lxc-copy: test: ../src/lxc/storage/dir.c: dir_mount: 195 Permission denied - Failed to mount “/home/mgrantprg/.local/share/lxc/test1/rootfs” onto “/home/mgrantprg/.local/share/lxc/test1/rootfs”
lxc-copy: test: ../src/lxc/storage/rsync.c: lxc_rsync: 91 Failed mounting “dir:/home/mgrantprg/.local/share/lxc/test1/rootfs” onto “/home/mgrantprg/.local/share/lxc/test1/rootfs”
lxc-copy: test: ../src/lxc/storage/storage.c: storage_copy: 511 Failed to rsync from “/usr/lib/x86_64-linux-gnu/lxc/rootfs” into “/home/mgrantprg/.local/share/lxc/test1/rootfs”
lxc-copy: test: ../src/lxc/lxccontainer.c: copy_storage: 3541 Error copying storage.lxc-copy: test: ../src/lxc/tools/lxc_copy.c: do_clone: 394 Failed to clone
Output from debug log level to an output file produces
lxc-copy -l debug -o debugoutput.txt -n test -N test1
snip...
mgrantprg@leonidas:~$ cat debugoutput.txt
lxc-copy test 20260208142332.287 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142332.287 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142332.287 TRACE commands - ../src/lxc/commands.c:lxc_cmd_timeout:525 - Connection refused - Command "get_init_pid" failed to connect command socket
lxc-copy test 20260208142332.287 TRACE commands - ../src/lxc/commands.c:lxc_cmd_timeout:525 - Connection refused - Command "get_state" failed to connect command socket
lxc-copy test 20260208142332.287 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:4939 - Chowned 4((null)) to -1:1000
lxc-copy test 20260208142332.287 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142332.287 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142332.287 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142332.287 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142332.287 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4157" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208142332.287 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4157" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208142332.287 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4157" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208142332.287 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4157" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208142332.287 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142332.287 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142332.287 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142332.291 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4157 0 100000 1 1000 1000 1"
lxc-copy test 20260208142332.295 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4157 0 100000 1 1000 1000 1"
lxc-copy test 20260208142332.295 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142332.295 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5020 - Chowned 4((null)) to 0:1000
lxc-copy test 20260208142332.295 TRACE utils - ../src/lxc/utils.c:wait_exited:352 - Reaped child process 4157
lxc-copy test 20260208142332.295 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:4939 - Chowned 4(/home/mgrantprg/.local/share/lxc/test1/rootfs) to -1:1000
lxc-copy test 20260208142332.295 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142332.295 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142332.295 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142332.295 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142332.295 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4162" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208142332.295 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4162" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208142332.296 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4162" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208142332.296 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4162" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208142332.296 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142332.296 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142332.296 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142332.300 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4162 0 100000 1 1000 1000 1"
lxc-copy test 20260208142332.304 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4162 0 100000 1 1000 1000 1"
lxc-copy test 20260208142332.304 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142332.305 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5020 - Chowned 4(/home/mgrantprg/.local/share/lxc/test1/rootfs) to 0:1000
lxc-copy test 20260208142332.305 TRACE utils - ../src/lxc/utils.c:wait_exited:352 - Reaped child process 4162
lxc-copy test 20260208142332.305 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142332.305 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142332.305 DEBUG storage - ../src/lxc/storage/storage.c:get_storage_by_name:209 - Detected rootfs type "dir"
lxc-copy test 20260208142332.305 TRACE storage - ../src/lxc/storage/storage.c:storage_copy:422 - Initialized dir storage driver
lxc-copy test 20260208142332.305 TRACE dir - ../src/lxc/storage/dir.c:dir_clonepaths:53 - Created new path "/home/mgrantprg/.local/share/lxc/test1/rootfs" for dir storage driver
lxc-copy test 20260208142332.305 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142332.305 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142332.305 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142332.305 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142332.305 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4167" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208142332.305 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4167" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208142332.305 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4167" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208142332.305 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4167" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208142332.306 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142332.306 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142332.306 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142332.310 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4167 0 100000 1 1000 1000 1"
lxc-copy test 20260208142332.315 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4167 0 100000 1 1000 1000 1"
lxc-copy test 20260208142332.315 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142332.315 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5020 - Chowned 4(/home/mgrantprg/.local/share/lxc/test1/rootfs) to 0:1000
lxc-copy test 20260208142332.315 TRACE utils - ../src/lxc/utils.c:wait_exited:352 - Reaped child process 4167
lxc-copy test 20260208142332.316 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing uid mapping for "4173" in new user namespace: nsuid 0 - hostid 100000 - range 65536
lxc-copy test 20260208142332.316 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing gid mapping for "4173" in new user namespace: nsuid 0 - hostid 100000 - range 65536
lxc-copy test 20260208142332.316 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing uid mapping for "4173" in new user namespace: nsuid 65536 - hostid 1000 - range 1
lxc-copy test 20260208142332.316 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing gid mapping for "4173" in new user namespace: nsuid 65536 - hostid 1000 - range 1
lxc-copy test 20260208142332.316 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142332.316 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142332.316 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142332.321 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4173 0 100000 65536 65536 1000 1"
lxc-copy test 20260208142332.326 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4173 0 100000 65536 65536 1000 1"
lxc-copy test 20260208142332.326 TRACE conf - ../src/lxc/conf.c:run_userns_fn:4420 - Calling function "lxc_storage_rsync_exec_wrapper"
lxc-copy test 20260208142332.327 TRACE mount_utils - ../src/lxc/mount_utils.c:can_use_mount_api:582 - Kernel supports mount api
lxc-copy test 20260208142332.327 TRACE mount_utils - ../src/lxc/mount_utils.c:can_use_bind_mounts:607 - Kernel supports bind mounts in the new mount api
lxc-copy test 20260208142332.327 TRACE mount_utils - ../src/lxc/mount_utils.c:move_detached_mount:328 - Attach detached mount 6 to filesystem at 4
lxc-copy test 20260208142332.327 TRACE dir - ../src/lxc/storage/dir.c:dir_mount:197 - Mounted "/home/mgrantprg/.local/share/lxc/test/rootfs" onto "/usr/lib/x86_64-linux-gnu/lxc/rootfs"
lxc-copy test 20260208142332.327 TRACE rsync - ../src/lxc/storage/rsync.c:lxc_rsync:87 - Mounted "/home/mgrantprg/.local/share/lxc/test/rootfs" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs"
lxc-copy test 20260208142332.327 ERROR mount_utils - ../src/lxc/mount_utils.c:move_detached_mount:326 - Permission denied - Failed to attach detached mount 6 to filesystem at 4
lxc-copy test 20260208142332.327 ERROR dir - ../src/lxc/storage/dir.c:dir_mount:195 - Permission denied - Failed to mount "/home/mgrantprg/.local/share/lxc/test1/rootfs" onto "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142332.327 ERROR rsync - ../src/lxc/storage/rsync.c:lxc_rsync:91 - Failed mounting "dir:/home/mgrantprg/.local/share/lxc/test1/rootfs" onto "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142332.328 ERROR storage - ../src/lxc/storage/storage.c:storage_copy:511 - Failed to rsync from "/usr/lib/x86_64-linux-gnu/lxc/rootfs" into "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142332.328 ERROR lxccontainer - ../src/lxc/lxccontainer.c:copy_storage:3541 - Error copying storage.
lxc-copy test 20260208142332.328 TRACE commands - ../src/lxc/commands.c:lxc_cmd_timeout:525 - Connection refused - Command "get_state" failed to connect command socket
lxc-copy test 20260208142332.329 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing uid mapping for "4178" in new user namespace: nsuid 0 - hostid 100000 - range 65536
lxc-copy test 20260208142332.329 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing gid mapping for "4178" in new user namespace: nsuid 0 - hostid 100000 - range 65536
lxc-copy test 20260208142332.329 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing uid mapping for "4178" in new user namespace: nsuid 65536 - hostid 1000 - range 1
lxc-copy test 20260208142332.329 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing gid mapping for "4178" in new user namespace: nsuid 65536 - hostid 1000 - range 1
lxc-copy test 20260208142332.329 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142332.329 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142332.329 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142332.335 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4178 0 100000 65536 65536 1000 1"
lxc-copy test 20260208142332.341 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4178 0 100000 65536 65536 1000 1"
lxc-copy test 20260208142332.341 TRACE conf - ../src/lxc/conf.c:run_userns_fn:4420 - Calling function "lxc_rmdir_onedev_wrapper"
lxc-copy test 20260208142332.341 INFO lxccontainer - ../src/lxc/lxccontainer.c:container_destroy:3042 - Destroyed directory "/home/mgrantprg/.local/share/lxc/test1" for "test1"
lxc-copy test 20260208142332.341 ERROR lxc_copy - ../src/lxc/tools/lxc_copy.c:do_clone:394 - Failed to clone
lxc-copy test 20260208142422.123 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142422.123 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142422.124 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142422.124 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142422.124 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142422.124 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142422.125 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142422.125 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142422.125 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142422.139 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142422.140 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142422.140 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142422.140 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142422.140 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142422.140 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142422.140 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142422.140 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142422.147 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142422.147 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142422.147 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142422.147 DEBUG storage - ../src/lxc/storage/storage.c:get_storage_by_name:209 - Detected rootfs type "dir"
lxc-copy test 20260208142422.147 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142422.147 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142422.147 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142422.147 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142422.148 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142422.148 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142422.148 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142422.154 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142422.155 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142422.155 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142422.155 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142422.162 ERROR mount_utils - ../src/lxc/mount_utils.c:move_detached_mount:326 - Permission denied - Failed to attach detached mount 6 to filesystem at 4
lxc-copy test 20260208142422.162 ERROR dir - ../src/lxc/storage/dir.c:dir_mount:195 - Permission denied - Failed to mount "/home/mgrantprg/.local/share/lxc/test1/rootfs" onto "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142422.162 ERROR rsync - ../src/lxc/storage/rsync.c:lxc_rsync:91 - Failed mounting "dir:/home/mgrantprg/.local/share/lxc/test1/rootfs" onto "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142422.163 ERROR storage - ../src/lxc/storage/storage.c:storage_copy:511 - Failed to rsync from "/usr/lib/x86_64-linux-gnu/lxc/rootfs" into "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142422.163 ERROR lxccontainer - ../src/lxc/lxccontainer.c:copy_storage:3541 - Error copying storage.
lxc-copy test 20260208142422.163 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142422.163 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142422.163 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142422.170 INFO lxccontainer - ../src/lxc/lxccontainer.c:container_destroy:3042 - Destroyed directory "/home/mgrantprg/.local/share/lxc/test1" for "test1"
lxc-copy test 20260208142422.170 ERROR lxc_copy - ../src/lxc/tools/lxc_copy.c:do_clone:394 - Failed to clone
lxc-copy test 20260208142938.455 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142938.455 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142938.455 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142938.455 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142938.455 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142938.455 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142938.456 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142938.456 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142938.456 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142938.463 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142938.463 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142938.463 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142938.463 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142938.463 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142938.464 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142938.464 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142938.464 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142938.472 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142938.472 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142938.472 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-copy test 20260208142938.472 DEBUG storage - ../src/lxc/storage/storage.c:get_storage_by_name:209 - Detected rootfs type "dir"
lxc-copy test 20260208142938.472 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208142938.472 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142938.472 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208142938.472 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208142938.473 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142938.473 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142938.473 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142938.482 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208142938.482 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142938.482 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142938.482 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142938.490 ERROR mount_utils - ../src/lxc/mount_utils.c:move_detached_mount:326 - Permission denied - Failed to attach detached mount 6 to filesystem at 4
lxc-copy test 20260208142938.490 ERROR dir - ../src/lxc/storage/dir.c:dir_mount:195 - Permission denied - Failed to mount "/home/mgrantprg/.local/share/lxc/test1/rootfs" onto "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142938.490 ERROR rsync - ../src/lxc/storage/rsync.c:lxc_rsync:91 - Failed mounting "dir:/home/mgrantprg/.local/share/lxc/test1/rootfs" onto "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142938.490 ERROR storage - ../src/lxc/storage/storage.c:storage_copy:511 - Failed to rsync from "/usr/lib/x86_64-linux-gnu/lxc/rootfs" into "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208142938.490 ERROR lxccontainer - ../src/lxc/lxccontainer.c:copy_storage:3541 - Error copying storage.
lxc-copy test 20260208142938.491 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208142938.491 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208142938.491 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208142938.499 INFO lxccontainer - ../src/lxc/lxccontainer.c:container_destroy:3042 - Destroyed directory "/home/mgrantprg/.local/share/lxc/test1" for "test1"
lxc-copy test 20260208142938.499 ERROR lxc_copy - ../src/lxc/tools/lxc_copy.c:do_clone:394 - Failed to clone
Output from trace log level to an output file produces
mgrantprg@leonidas:~$ lxc-copy -l trace -o traceoutput.txt -n test -N test1
snip...
mgrantprg@leonidas:~$ cat traceoutput.txt
lxc-copy test 20260208143108.458 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-copy test 20260208143108.458 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-copy test 20260208143108.459 TRACE commands - ../src/lxc/commands.c:lxc_cmd_timeout:525 - Connection refused - Command "get_init_pid" failed to connect command socket
lxc-copy test 20260208143108.459 TRACE commands - ../src/lxc/commands.c:lxc_cmd_timeout:525 - Connection refused - Command "get_state" failed to connect command socket
lxc-copy test 20260208143108.459 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:4939 - Chowned 4((null)) to -1:1000
lxc-copy test 20260208143108.459 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208143108.459 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208143108.459 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208143108.459 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208143108.460 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4346" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208143108.460 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4346" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208143108.460 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4346" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208143108.460 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4346" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208143108.460 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208143108.460 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208143108.460 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208143108.470 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4346 0 100000 1 1000 1000 1"
lxc-copy test 20260208143108.474 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4346 0 100000 1 1000 1000 1"
lxc-copy test 20260208143108.474 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208143108.474 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5020 - Chowned 4((null)) to 0:1000
lxc-copy test 20260208143108.474 TRACE utils - ../src/lxc/utils.c:wait_exited:352 - Reaped child process 4346
lxc-copy test 20260208143108.474 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:4939 - Chowned 4(/home/mgrantprg/.local/share/lxc/test1/rootfs) to -1:1000
lxc-copy test 20260208143108.474 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208143108.474 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208143108.474 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208143108.474 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208143108.474 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4351" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208143108.474 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4351" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208143108.474 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4351" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208143108.474 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4351" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208143108.474 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208143108.474 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208143108.474 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208143108.478 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4351 0 100000 1 1000 1000 1"
lxc-copy test 20260208143108.481 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4351 0 100000 1 1000 1000 1"
lxc-copy test 20260208143108.481 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208143108.481 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5020 - Chowned 4(/home/mgrantprg/.local/share/lxc/test1/rootfs) to 0:1000
lxc-copy test 20260208143108.481 TRACE utils - ../src/lxc/utils.c:wait_exited:352 - Reaped child process 4351
lxc-copy test 20260208143108.482 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-copy test 20260208143108.482 INFO confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-copy test 20260208143108.482 DEBUG storage - ../src/lxc/storage/storage.c:get_storage_by_name:209 - Detected rootfs type "dir"
lxc-copy test 20260208143108.482 TRACE storage - ../src/lxc/storage/storage.c:storage_copy:422 - Initialized dir storage driver
lxc-copy test 20260208143108.482 TRACE dir - ../src/lxc/storage/dir.c:dir_clonepaths:53 - Created new path "/home/mgrantprg/.local/share/lxc/test1/rootfs" for dir storage driver
lxc-copy test 20260208143108.482 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 0 hostid 100000 range 1
lxc-copy test 20260208143108.482 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type u nsid 1000 hostid 1000 range 1
lxc-copy test 20260208143108.482 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 0 hostid 100000 range 1
lxc-copy test 20260208143108.482 INFO conf - ../src/lxc/conf.c:add_idmap_entry:4867 - Adding id map: type g nsid 1000 hostid 1000 range 1
lxc-copy test 20260208143108.482 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4356" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208143108.482 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing uid mapping for "4356" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208143108.482 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4356" in new user namespace: nsuid 0 - hostid 100000 - range 1
lxc-copy test 20260208143108.482 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5030 - Establishing gid mapping for "4356" in new user namespace: nsuid 1000 - hostid 1000 - range 1
lxc-copy test 20260208143108.482 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208143108.482 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208143108.482 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208143108.486 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4356 0 100000 1 1000 1000 1"
lxc-copy test 20260208143108.489 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4356 0 100000 1 1000 1000 1"
lxc-copy test 20260208143108.489 NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1481 - Dropped supplimentary groups
lxc-copy test 20260208143108.489 TRACE conf - ../src/lxc/conf.c:userns_exec_mapped_root:5020 - Chowned 4(/home/mgrantprg/.local/share/lxc/test1/rootfs) to 0:1000
lxc-copy test 20260208143108.490 TRACE utils - ../src/lxc/utils.c:wait_exited:352 - Reaped child process 4356
lxc-copy test 20260208143108.490 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing uid mapping for "4362" in new user namespace: nsuid 0 - hostid 100000 - range 65536
lxc-copy test 20260208143108.490 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing gid mapping for "4362" in new user namespace: nsuid 0 - hostid 100000 - range 65536
lxc-copy test 20260208143108.490 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing uid mapping for "4362" in new user namespace: nsuid 65536 - hostid 1000 - range 1
lxc-copy test 20260208143108.490 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing gid mapping for "4362" in new user namespace: nsuid 65536 - hostid 1000 - range 1
lxc-copy test 20260208143108.490 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208143108.490 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208143108.490 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208143108.493 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4362 0 100000 65536 65536 1000 1"
lxc-copy test 20260208143108.496 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4362 0 100000 65536 65536 1000 1"
lxc-copy test 20260208143108.496 TRACE conf - ../src/lxc/conf.c:run_userns_fn:4420 - Calling function "lxc_storage_rsync_exec_wrapper"
lxc-copy test 20260208143108.497 TRACE mount_utils - ../src/lxc/mount_utils.c:can_use_mount_api:582 - Kernel supports mount api
lxc-copy test 20260208143108.497 TRACE mount_utils - ../src/lxc/mount_utils.c:can_use_bind_mounts:607 - Kernel supports bind mounts in the new mount api
lxc-copy test 20260208143108.497 TRACE mount_utils - ../src/lxc/mount_utils.c:move_detached_mount:328 - Attach detached mount 6 to filesystem at 4
lxc-copy test 20260208143108.497 TRACE dir - ../src/lxc/storage/dir.c:dir_mount:197 - Mounted "/home/mgrantprg/.local/share/lxc/test/rootfs" onto "/usr/lib/x86_64-linux-gnu/lxc/rootfs"
lxc-copy test 20260208143108.497 TRACE rsync - ../src/lxc/storage/rsync.c:lxc_rsync:87 - Mounted "/home/mgrantprg/.local/share/lxc/test/rootfs" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs"
lxc-copy test 20260208143108.497 ERROR mount_utils - ../src/lxc/mount_utils.c:move_detached_mount:326 - Permission denied - Failed to attach detached mount 6 to filesystem at 4
lxc-copy test 20260208143108.497 ERROR dir - ../src/lxc/storage/dir.c:dir_mount:195 - Permission denied - Failed to mount "/home/mgrantprg/.local/share/lxc/test1/rootfs" onto "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208143108.497 ERROR rsync - ../src/lxc/storage/rsync.c:lxc_rsync:91 - Failed mounting "dir:/home/mgrantprg/.local/share/lxc/test1/rootfs" onto "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208143108.498 ERROR storage - ../src/lxc/storage/storage.c:storage_copy:511 - Failed to rsync from "/usr/lib/x86_64-linux-gnu/lxc/rootfs" into "/home/mgrantprg/.local/share/lxc/test1/rootfs"
lxc-copy test 20260208143108.498 ERROR lxccontainer - ../src/lxc/lxccontainer.c:copy_storage:3541 - Error copying storage.
lxc-copy test 20260208143108.498 TRACE commands - ../src/lxc/commands.c:lxc_cmd_timeout:525 - Connection refused - Command "get_state" failed to connect command socket
lxc-copy test 20260208143108.498 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing uid mapping for "4367" in new user namespace: nsuid 0 - hostid 100000 - range 65536
lxc-copy test 20260208143108.498 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing gid mapping for "4367" in new user namespace: nsuid 0 - hostid 100000 - range 65536
lxc-copy test 20260208143108.498 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing uid mapping for "4367" in new user namespace: nsuid 65536 - hostid 1000 - range 1
lxc-copy test 20260208143108.498 TRACE conf - ../src/lxc/conf.c:userns_exec_full:4811 - establishing gid mapping for "4367" in new user namespace: nsuid 65536 - hostid 1000 - range 1
lxc-copy test 20260208143108.498 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newuidmap" does have the setuid bit set
lxc-copy test 20260208143108.498 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:idmaptool_on_path_and_privileged:93 - The binary "/usr/bin/newgidmap" does have the setuid bit set
lxc-copy test 20260208143108.498 DEBUG idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:178 - Functional newuidmap and newgidmap binary found
lxc-copy test 20260208143108.502 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newuidmap wrote mapping "newuidmap 4367 0 100000 65536 65536 1000 1"
lxc-copy test 20260208143108.505 TRACE idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:246 - newgidmap wrote mapping "newgidmap 4367 0 100000 65536 65536 1000 1"
lxc-copy test 20260208143108.505 TRACE conf - ../src/lxc/conf.c:run_userns_fn:4420 - Calling function "lxc_rmdir_onedev_wrapper"
lxc-copy test 20260208143108.505 INFO lxccontainer - ../src/lxc/lxccontainer.c:container_destroy:3042 - Destroyed directory "/home/mgrantprg/.local/share/lxc/test1" for "test1"
lxc-copy test 20260208143108.505 ERROR lxc_copy - ../src/lxc/tools/lxc_copy.c:do_clone:394 - Failed to clone
Background Information
The output of lxc-checkconfig
mgrantprg@leonidas:~$ lxc-checkconfig
LXC version 6.0.4
Kernel configuration not found at /proc/config.gz; searching...
Kernel configuration found at /boot/config-6.12.63+deb13-amd64
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Namespace limits:
cgroup: 35520
ipc: 35520
mnt: 35520
net: 35520
pid: 35520
time: 35520
user: 35520
uts: 35520
--- Control groups ---
Cgroups: enabled
Cgroup namespace: enabled
Cgroup v1 mount points:
Cgroup v2 mount points:
- /sys/fs/cgroup
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: enabled, loaded
Macvlan: enabled, not loaded
Vlan: enabled, not loaded
Bridges: enabled, loaded
Advanced netfilter: enabled, loaded
CONFIG_IP_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled, not loaded
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, not loaded
FUSE (for use with lxcfs): enabled, not loaded
--- Checkpoint/Restore ---
checkpoint restore: enabled
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: enabled
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: enabled
CONFIG_NETLINK_DIAG: enabled
File capabilities: enabled
Note: Before booting a new kernel, you can check its configuration with:
CONFIG=/path/to/config /usr/bin/lxc-checkconfig
The contents of the config file for newly created test container
mgrantprg@leonidas:~$ cat ~/.local/share/lxc/test/config
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)
# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)
# Distribution configuration
lxc.include = /usr/share/lxc/config/common.conf
lxc.include = /usr/share/lxc/config/userns.conf
lxc.arch = linux64
# Container specific configuration
lxc.apparmor.profile = unconfined
lxc.apparmor.allow_nesting = 1
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536
lxc.rootfs.path = dir:/home/mgrantprg/.local/share/lxc/test/rootfs
lxc.uts.name = test
# Network configuration
to which I normally add
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
Permissions for the container
mgrantprg@leonidas:~$ ls -l ~/.local/share/lxc/test
total 8
-rw-r----- 1 mgrantprg mgrantprg 829 Feb 8 14:06 config
drwxr-xr-x 17 100000 100000 4096 Feb 5 05:27 rootfs
mgrantprg@leonidas:~$ ls -l ~/.local/share/lxc/test/rootfs
total 60
lrwxrwxrwx 1 100000 100000 7 Jan 2 12:35 bin -> usr/bin
drwxr-xr-x 2 100000 100000 4096 Jan 2 12:35 boot
drwxr-xr-x 3 100000 100000 4096 Feb 8 10:54 dev
drwxr-xr-x 47 100000 100000 4096 Feb 8 10:54 etc
drwxr-xr-x 2 100000 100000 4096 Jan 2 12:35 home
lrwxrwxrwx 1 100000 100000 7 Jan 2 12:35 lib -> usr/lib
lrwxrwxrwx 1 100000 100000 9 Jan 2 12:35 lib64 -> usr/lib64
drwxr-xr-x 2 100000 100000 4096 Feb 5 05:24 media
drwxr-xr-x 2 100000 100000 4096 Feb 5 05:24 mnt
drwxr-xr-x 2 100000 100000 4096 Feb 5 05:24 opt
drwxr-xr-x 2 100000 100000 4096 Jan 2 12:35 proc
drwx------ 3 100000 100000 4096 Feb 5 05:25 root
drwxr-xr-x 2 100000 100000 4096 Feb 5 05:25 run
lrwxrwxrwx 1 100000 100000 8 Jan 2 12:35 sbin -> usr/sbin
drwxr-xr-x 2 100000 100000 4096 Feb 5 05:24 srv
drwxr-xr-x 2 100000 100000 4096 Jan 2 12:35 sys
drwxrwxrwt 2 100000 100000 4096 Feb 5 05:25 tmp
drwxr-xr-x 12 100000 100000 4096 Feb 5 05:24 usr
drwxr-xr-x 11 100000 100000 4096 Feb 5 05:24 var