I have a server running lxc v1
I have a container on that server called “git”
I’ve tarred that up as follows:
cd /var/lib/lxc/ ; tar -czf git.tgz git
So, git.tgz has contents like
# tar -tvzf git.tgz
drwxrwx— root/root 0 2021-08-30 08:58 git/
dr-xr-xr-x root/root 0 2021-08-30 08:58 git/rootfs/
lrwxrwxrwx root/root 0 2019-11-27 11:21 git/rootfs/bin → usr/bin
I then created a metadata.yaml file with contents
and tarred that up with
tar zcf metadata.tar.gz metadata.yaml
I then imported all of that with
lxc image import metadata.tar.gz git.tgz --alias git-test
The output of that was
Image imported with fingerprint: 8e1d85f72b0c788cc50f4f57ea1f573467d6733c524986f12b1353997a2e0784
My understanding is that I next need to launch that image, so I did
lxc launch git-test
which gave me the output
Creating the instance
Instance name is: unified-mackerel
Error: Failed to run: /snap/lxd/current/bin/lxd forkstart unified-mackerel /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/unified-mackerel/lxc.conf:
lxc info --show-log local:unified-mackerel for more info
lxc info --show-log local:unified-mackerel
Created: 2021/09/04 08:16 UTC
Log: lxc unified-mackerel 20210904081625.793 WARN conf - conf.c:lxc_map_ids:3389 - newuidmap binary is missing lxc unified-mackerel 20210904081625.793 WARN conf - conf.c:lxc_map_ids:3395 - newgidmap binary is missing lxc unified-mackerel 20210904081625.795 WARN conf - conf.c:lxc_map_ids:3389 - newuidmap binary is missing lxc unified-mackerel 20210904081625.795 WARN conf - conf.c:lxc_map_ids:3395 - newgidmap binary is missing lxc unified-mackerel 20210904081625.796 WARN cgfsng - cgroups/cgfsng.c:fchowmodat:1296 - No such file or directory - Failed to fchownat(43, memory.oom.group, 1000000000, 0, AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW ) lxc unified-mackerel 20210904081626.559 ERROR start - start.c:start:2142 - No such file or directory - Failed to exec "/sbin/init" lxc unified-mackerel 20210904081626.560 ERROR sync - sync.c:sync_wait:36 - An error occurred in another process (expected sequence number 7) lxc unified-mackerel 20210904081626.690 WARN network - network.c:lxc_delete_network_priv:3624 - Failed to rename interface with index 0 from "eth0" to its initial name "mac76ccdef5" lxc unified-mackerel 20210904081626.692 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:869 - Received container state "ABORTING" instead of "RUNNING" lxc unified-mackerel 20210904081626.692 ERROR start - start.c:__lxc_start:2053 - Failed to spawn container "unified-mackerel" lxc unified-mackerel 20210904081626.693 WARN start - start.c:lxc_abort:1051 - No such process - Failed to send SIGKILL via pidfd 44 for process 2090568 lxc unified-mackerel 20210904081631.309 WARN conf - conf.c:lxc_map_ids:3389 - newuidmap binary is missing lxc unified-mackerel 20210904081631.310 WARN conf - conf.c:lxc_map_ids:3395 - newgidmap binary is missing lxc 20210904081631.362 ERROR af_unix - af_unix.c:lxc_abstract_unix_recv_fds_iov:220 - Connection reset by peer - Failed to receive response lxc 20210904081631.362 ERROR commands - commands.c:lxc_cmd_rsp_recv_fds:129 - Failed to receive file descriptors
Doesn’t seem that I’m the first to get the ‘No such file or directory - Failed to exec “/sbin/init”’ error .
However, looking through how some of those were solved doesn’t seem overly relevant to my circumstances.
Anyone got any idea what I’m doing wrong?
Thanks in advance.