Not able to make a working container

Hello everyone. I have been struggling to make a working container on my RockPro64 computer. I freshly installed Ubuntu 18.04.4 and LXD. uname -m returns aarch64 and dpkg --print-architecture returns arm64 so I decided to launch a Ubuntu Bionic container with aarch64 architecture using the default profile. When I do this there are no IP addresses listed under lxc list, but I am able to enter the container by executing bash. When I try to ping an address I receive the warning “Operation not permitted”. I am not able to get IP addresses with macvlan either. I’m pretty new to all of this and feel lost. I would appreciate any help. Thank you.

What does lxc console NAME --show-log get you?

Also, can you show uname -a?

rock64@rockpro64:~$ uname -a
Linux rockpro64 4.4.167-1213-rockchip-ayufan-g34ae07687fce #1 SMP Tue Jun 18 20:44:49 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

list of two containers, “test” is default configuration, “test2” is lan configuration using macvlan and eth0 as parent.

rock64@rockpro64:~$ lxc list         
+-------+---------+------+------+------------+-----------+
| NAME  |  STATE  | IPV4 | IPV6 |    TYPE    | SNAPSHOTS |
+-------+---------+------+------+------------+-----------+
| test  | RUNNING |      |      | PERSISTENT | 0         |
+-------+---------+------+------+------------+-----------+
| test2 | RUNNING |      |      | PERSISTENT | 0         |
+-------+---------+------+------+------------+-----------+

infor for test container:

rock64@rockpro64:~$ lxc info test 
Name: test
Remote: unix://
Architecture: aarch64
Created: 2020/03/01 00:29 UTC
Status: Running
Type: persistent
Profiles: default
Pid: 8715
Ips:
  eth0:	inet6	fe80::216:3eff:fe5d:a4a7	vethADVE0B
  lo:	inet	127.0.0.1
  lo:	inet6	::1
Resources:
  Processes: 26
  CPU usage:
    CPU usage (in seconds): 31
  Memory usage:
    Memory (current): 46.58MB
    Memory (peak): 84.24MB
  Network usage:
    eth0:
      Bytes received: 19.50kB
      Bytes sent: 930B
      Packets received: 152
      Packets sent: 11
    lo:
      Bytes received: 4.99kB
      Bytes sent: 4.99kB
      Packets received: 68
      Packets sent: 68

info for test2 container:

rock64@rockpro64:~$ lxc info test2
Name: test2
Remote: unix://
Architecture: aarch64
Created: 2020/03/01 00:32 UTC
Status: Running
Type: persistent
Profiles: lan
Pid: 10116
Ips:
  lo:	inet	127.0.0.1
  lo:	inet6	::1
  eth0:	inet6	fe80::216:3eff:fe7a:5f9b
Resources:
  Processes: 24
  CPU usage:
    CPU usage (in seconds): 36
  Memory usage:
    Memory (current): 46.66MB
    Memory (peak): 85.05MB
  Network usage:
    eth0:
      Bytes received: 7.00MB
      Bytes sent: 758B
      Packets received: 114867
      Packets sent: 9
    lo:
      Bytes received: 7.51kB
      Bytes sent: 7.51kB
      Packets received: 100
      Packets sent: 100

log for test container:


Console log:

log for test2 container:


Console log:

systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
Detected virtualization lxc.
Detected architecture arm64.

Welcome to Ubuntu 18.04.4 LTS!

Set hostname to <test2>.
Initializing machine ID from random generator.
Failed to read AF_UNIX datagram queue length, ignoring: No such file or directory
Failed to install release agent, ignoring: No such file or directory
Couldn't move remaining userspace processes, ignoring: Invalid argument
File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[  OK  ] Reached target Swap.
[  OK  ] Created slice User and Session Slice.
[UNSUPP] Starting of Arbitrary Executable Fi…tem Automount Point not supported.
[  OK  ] Reached target User and Group Name Lookups.
[  OK  ] Created slice System Slice.
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on Device-mapper event daemon FIFOs.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on LVM2 poll daemon socket.
         Starting Load Kernel Modules...
[  OK  ] Listening on LVM2 metadata daemon socket.
[  OK  ] Listening on Network Service Netlink Socket.
         Starting Set the console keyboard layout...
         Starting Initial cloud-init job (pre-networking)...
[  OK  ] Reached target Slices.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on udev Control Socket.
         Starting udev Coldplug all Devices...
[  OK  ] Listening on Syslog Socket.
         Starting Journal Service...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
         Starting Uncomplicated firewall...
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Journal Service.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Uncomplicated firewall.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting ebtables ruleset management...
         Starting Set console font and keymap...
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Apply Kernel Variables...
         Mounting Kernel Configuration File System...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Apply Kernel Variables.
[FAILED] Failed to mount Kernel Configuration File System.
See 'systemctl status sys-kernel-config.mount' for details.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Started ebtables ruleset management.
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[ 3680.642419] cloud-init[283]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'init-local' at Sun, 01 Mar 2020 00:33:00 +0000. Up 4.00 seconds.
[  OK  ] Started Initial cloud-init job (pre-networking).
[  OK  ] Reached target Network (Pre).
         Starting Network Service...
[  OK  ] Started Network Service.
         Starting Wait for Network to be Configured...
         Starting Network Name Resolution...
[  OK  ] Started Wait for Network to be Configured.
         Starting Initial cloud-init job (metadata service crawler)...
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Network.
[  OK  ] Reached target Host and Network Name Lookups.
[ 3683.381166] cloud-init[487]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'init' at Sun, 01 Mar 2020 00:33:04 +0000. Up 7.00 seconds.
[ 3683.381731] cloud-init[487]: ci-info: ++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++
[ 3683.382101] cloud-init[487]: ci-info: +--------+------+-----------------------------+-----------+-------+-------------------+
[ 3683.382413] cloud-init[487]: ci-info: | Device |  Up  |           Address           |    Mask   | Scope |     Hw-Address    |
[ 3683.382713] cloud-init[487]: ci-info: +--------+------+-----------------------------+-----------+-------+-------------------+
[ 3683.383006] cloud-init[487]: ci-info: |  eth0  | True | fe80::216:3eff:fe7a:5f9b/64 |     .     |  link | 00:16:3e:7a:5f:9b |
[ 3683.383270] cloud-init[487]: ci-info: |   lo   | True |          127.0.0.1          | 255.0.0.0 |  host |         .         |
[ 3683.383533] cloud-init[487]: ci-info: |   lo   | True |           ::1/128           |     .     |  host |         .         |
[ 3683.383793] cloud-init[487]: ci-info: +--------+------+-----------------------------+-----------+-------+-------------------+
[ 3683.384174] cloud-init[487]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
[ 3683.384551] cloud-init[487]: ci-info: +-------+-------------+---------+-----------+-------+
[ 3683.384889] cloud-init[487]: ci-info: | Route | Destination | Gateway | Interface | Flags |
[ 3683.385224] cloud-init[487]: ci-info: +-------+-------------+---------+-----------+-------+
[ 3683.385533] cloud-init[487]: ci-info: |   0   |  fe80::/64  |    ::   |    eth0   |   U   |
[ 3683.385832] cloud-init[487]: ci-info: |   4   |   ff00::/8  |    ::   |    eth0   |   U   |
[ 3683.386139] cloud-init[487]: ci-info: +-------+-------------+---------+-----------+-------+
[ 3684.477325] cloud-init[487]: Generating public/private rsa key pair.
[ 3684.477578] cloud-init[487]: Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
[ 3684.477774] cloud-init[487]: Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
[ 3684.477989] cloud-init[487]: The key fingerprint is:
[ 3684.478171] cloud-init[487]: SHA256:23gjxJzzM9GwE9XEZLP6BUkJxlHashO5nQN/D4O9hj0 root@test2
[ 3684.478334] cloud-init[487]: The key's randomart image is:
[ 3684.478507] cloud-init[487]: +---[RSA 2048]----+
[ 3684.478691] cloud-init[487]: |           .=OB. |
[ 3684.478838] cloud-init[487]: |           o.*++ |
[ 3684.479016] cloud-init[487]: |          o * =  |
[ 3684.479195] cloud-init[487]: |       o . = % o |
[ 3684.479334] cloud-init[487]: |        S + B O o|
[ 3684.479495] cloud-init[487]: |       . * o = B.|
[ 3684.479656] cloud-init[487]: |        + B . E .|
[ 3684.479803] cloud-init[487]: |         o + . . |
[ 3684.479985] cloud-init[487]: |                 |
[ 3684.480277] cloud-init[487]: +----[SHA256]-----+
[ 3684.480470] cloud-init[487]: Generating public/private dsa key pair.
[ 3684.480635] cloud-init[487]: Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
[ 3684.480821] cloud-init[487]: Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
[ 3684.480998] cloud-init[487]: The key fingerprint is:
[ 3684.481141] cloud-init[487]: SHA256:ADRqcLdwkMn4ZziGZrlkwHa99vcCHvw2N6GAyXdWC/o root@test2
[ 3684.481298] cloud-init[487]: The key's randomart image is:
[ 3684.481474] cloud-init[487]: +---[DSA 1024]----+
[ 3684.481653] cloud-init[487]: |oo+=B            |
[ 3684.481830] cloud-init[487]: |o=+* =           |
[ 3684.481993] cloud-init[487]: |oo=.. o          |
[ 3684.482154] cloud-init[487]: |.B= oo . . .     |
[ 3684.482335] cloud-init[487]: |=..+o = S o .    |
[ 3684.482494] cloud-init[487]: | .   + O + o     |
[ 3684.482843] cloud-init[487]: |      o X o .    |
[ 3684.483180] cloud-init[487]: |       . E +     |
[ 3684.483519] cloud-init[487]: |        . + .    |
[ 3684.483845] cloud-init[487]: +----[SHA256]-----+
[ 3684.484205] cloud-init[487]: Generating public/private ecdsa key pair.
[ 3684.484548] cloud-init[487]: Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
[ 3684.484917] cloud-init[487]: Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
[ 3684.485274] cloud-init[487]: The key fingerprint is:
[ 3684.485607] cloud-init[487]: SHA256:600ck9IHlXdYJJXmvwgVn8mNcxHMJrpn68kksRZ9HUI root@test2
[ 3684.485930] cloud-init[487]: The key's randomart image is:
[ 3684.486270] cloud-init[487]: +---[ECDSA 256]---+
[ 3684.486601] cloud-init[487]: |            .E+**|
[ 3684.486923] cloud-init[487]: |           .oooO.|
[ 3684.487242] cloud-init[487]: |          . .oO+=|
[ 3684.487572] cloud-init[487]: |         . +..+*=|
[ 3684.487926] cloud-init[487]: |        S =o+. +o|
[ 3684.488339] cloud-init[487]: |         + *+o. .|
[ 3684.488868] cloud-init[487]: |        . o++.o .|
[ 3684.489257] cloud-init[487]: |       . o. +o.. |
[ 3684.489757] cloud-init[487]: |        . . .+   |
[ 3684.490269] cloud-init[487]: +----[SHA256]-----+
[ 3684.490705] cloud-init[487]: Generating public/private ed25519 key pair.
[ 3684.491039] cloud-init[487]: Your identification has been saved in /etc/ssh/ssh_host_ed25519_key.
[ 3684.491529] cloud-init[487]: Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub.
[ 3684.492329] cloud-init[487]: The key fingerprint is:
[ 3684.492919] cloud-init[487]: SHA256:7L83eKZDlp6OwAJY+ckFDtRAujMGugF/drmxC/dyyHI root@test2
[ 3684.493432] cloud-init[487]: The key's randomart image is:
[ 3684.493945] cloud-init[487]: +--[ED25519 256]--+
[ 3684.494497] cloud-init[487]: | o=o.            |
[ 3684.495061] cloud-init[487]: | . +..           |
[ 3684.495612] cloud-init[487]: |+ o . .          |
[ 3684.496320] cloud-init[487]: |+= o o o         |
[ 3684.496900] cloud-init[487]: |B.o * + S  .     |
[ 3684.497457] cloud-init[487]: |.= + o =  +      |
[ 3684.497989] cloud-init[487]: |.   o.*..+ o     |
[ 3684.498512] cloud-init[487]: |    .+E+.o= =    |
[ 3684.499040] cloud-init[487]: |     o.oo.=B .   |
[ 3684.499566] cloud-init[487]: +----[SHA256]-----+
[  OK  ] Started Initial cloud-init job (metadata service crawler).
[  OK  ] Reached target Network is Online.
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
         Starting Availability of block devices...
[  OK  ] Reached target Cloud-config availability.
[  OK  ] Reached target System Initialization.
[  OK  ] Started ACPI Events Check.
[  OK  ] Reached target Paths.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Listening on Unix socket for apport crash forwarding.
[  OK  ] Listening on ACPID Listen Socket.
         Starting Socket activation for snappy daemon.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Started Message of the Day.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
         Starting LXD - unix socket.
[  OK  ] Listening on Open-iSCSI iscsid Socket.
[  OK  ] Started Availability of block devices.
[  OK  ] Listening on Socket activation for snappy daemon.
[  OK  ] Listening on LXD - unix socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Dispatcher daemon for systemd-networkd...
         Starting Login Service...
[  OK  ] Started Deferred execution scheduler.
         Starting Accounts Service...
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Login Service.
         Starting LXD - container startup/shutdown...
         Starting Snappy daemon...
         Starting System Logging Service...
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
[  OK  ] Started Unattended Upgrades Shutdown.
         Starting LSB: automatic crash report generation...
[  OK  ] Started Dispatcher daemon for systemd-networkd.
[  OK  ] Started System Logging Service.
[  OK  ] Started LXD - container startup/shutdown.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started OpenBSD Secure Shell server.
         Starting Authorization Manager...
         Starting Terminate Plymouth Boot Screen...
         Starting Hold until boot process finishes up...
[  OK  ] Started LSB: automatic crash report generation.
[  OK  ] Started Terminate Plymouth Boot Screen.
[  OK  ] Started Hold until boot process finishes up.
[  OK  ] Started Authorization Manager.
[  OK  ] Started Accounts Service.
[  OK  ] Started Console Getty.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Snappy daemon.
         Starting Wait until snapd is fully seeded...

Ubuntu 18.04.4 LTS test2 console

test2 login: [ 3716.425283] cloud-init[794]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'modules:config' at Sun, 01 Mar 2020 00:33:37 +0000. Up 40.00 seconds.
ci-info: no authorized SSH keys fingerprints found for user ubuntu.
<14>Mar  1 00:33:40 ec2: 
<14>Mar  1 00:33:40 ec2: #############################################################
<14>Mar  1 00:33:40 ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Mar  1 00:33:40 ec2: 1024 SHA256:ADRqcLdwkMn4ZziGZrlkwHa99vcCHvw2N6GAyXdWC/o root@test2 (DSA)
<14>Mar  1 00:33:40 ec2: 256 SHA256:600ck9IHlXdYJJXmvwgVn8mNcxHMJrpn68kksRZ9HUI root@test2 (ECDSA)
<14>Mar  1 00:33:40 ec2: 256 SHA256:7L83eKZDlp6OwAJY+ckFDtRAujMGugF/drmxC/dyyHI root@test2 (ED25519)
<14>Mar  1 00:33:40 ec2: 2048 SHA256:23gjxJzzM9GwE9XEZLP6BUkJxlHashO5nQN/D4O9hj0 root@test2 (RSA)
<14>Mar  1 00:33:40 ec2: -----END SSH HOST KEY FINGERPRINTS-----
<14>Mar  1 00:33:40 ec2: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKkj3HHSUb5fddI/K9Nn8Whi09/4L1adyY2ARHpNNJpTvAc6ARzChwgFN2pQtQsP63eVyRFSSSMiRe0I6juOjnQ= root@test2
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF/3rQEfzlHLhP3tfw1Y4Yu5ObB/TRa6JVeu+Mq5KB3K root@test2
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYWrmQCVZ2O89DMCdjKImtVs6xB6Zim/BJ2Dd7MMgyolA7TkGwy6wV6Ndafc/zV46YKwuEs9pL6LfXlOJyBftF/kjFKnLbKxSfLO7ojT75Hm1dBiRH03LKxyPKkmhOFiFu713YsBm/yRVARRV/A6Js023LJ3Jz0Rs0v4ECUwqVJ1X4v+o722sPvMDn4+CBpq9hU0Yp0qnnXluMC4QLRhl9VVwY3e7W3adXbrqgChdqwheWF1B1aY17L6hXil2LxhlmbJk3jWwuDGf7k7Of3SJYZJcwzly4ZdR7p2omMILZ38l7E837zkiuizS7hgMpAmXIF2kJ1UF51J2Bvo+KKR4t root@test2
-----END SSH HOST KEY KEYS-----
[ 3718.717246] cloud-init[825]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'modules:final' at Sun, 01 Mar 2020 00:33:40 +0000. Up 43.00 seconds.
[ 3718.717481] cloud-init[825]: ci-info: no authorized SSH keys fingerprints found for user ubuntu.
[ 3718.717601] cloud-init[825]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 finished at Sun, 01 Mar 2020 00:33:40 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net].  Up 43.00 seconds

18.04 normally ships with a 4.15 kernel.

The custom kernel that comes with that board may be causing some issues here.

As an extra check, you could try running dhclient or another DHCP client directly against eth0 in the container and see if that gets an IP.

root@test2:~# dhclient -v eth0
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:16:3e:7a:5f:9b
Sending on   LPF/eth0/00:16:3e:7a:5f:9b
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21 (xid=0x5c0d8a47)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20 (xid=0x5c0d8a47)

It never gets an IP. I will try another distribution that people have reported success with. I’ll let you know if I run into similar issues or if the situation improves.

I freshly installed the latest Armbian Ubuntu server and made two containers, net1 and net2 using the profiles default and lan respectively.

user@rockpro64:~$ lxc profile list
+---------+---------+
|  NAME   | USED BY |
+---------+---------+
| default | 1       |
+---------+---------+
| lan     | 1       |
+---------+---------+

user@rockpro64:~$ lxc profile show lan
config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    nictype: macvlan
    parent: eth0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: lan
used_by:
- /1.0/containers/net2

user@rockpro64:~$ lxc profile show default
config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: default
used_by:
- /1.0/containers/net1

Both of the containers start up but only the default profile gets an IP. This is at least better than last time where none of them worked!

user@rockpro64:~$ lxc list
+------+---------+-----------------------+----------------------------------------------+------------+-----------+
| NAME |  STATE  |         IPV4          |                     IPV6                     |    TYPE    | SNAPSHOTS |
+------+---------+-----------------------+----------------------------------------------+------------+-----------+
| net1 | RUNNING | 10.220.118.115 (eth0) | fd42:e6e0:1d2:5a5a:216:3eff:fec0:3019 (eth0) | PERSISTENT | 0         |
+------+---------+-----------------------+----------------------------------------------+------------+-----------+
| net2 | RUNNING |                       |                                              | PERSISTENT | 0         |
+------+---------+-----------------------+----------------------------------------------+------------+-----------+

Here are the console logs:

user@rockpro64:~$ lxc console net1 --show-log

Console log:

systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
Detected virtualization lxc.
Detected architecture arm64.

Welcome to Ubuntu 18.04.4 LTS!

Set hostname to <net1>.
Initializing machine ID from random generator.
Failed to read AF_UNIX datagram queue length, ignoring: No such file or directory
File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[UNSUPP] Starting of Arbitrary Executable Fi…tem Automount Point not supported.
system.slice: Failed to reset devices.list: Operation not permitted
[  OK  ] Created slice System Slice.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on LVM2 metadata daemon socket.
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Listening on LVM2 poll daemon socket.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
user.slice: Failed to reset devices.list: Operation not permitted
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
ufw.service: Failed to reset devices.list: Operation not permitted
         Starting Uncomplicated firewall...
keyboard-setup.service: Failed to reset devices.list: Operation not permitted
         Starting Set the console keyboard layout...
systemd-journald.service: Failed to reset devices.list: Operation not permitted
         Starting Journal Service...
[  OK  ] Listening on Device-mapper event daemon FIFOs.
systemd-modules-load.service: Failed to reset devices.list: Operation not permitted
         Starting Load Kernel Modules...
systemd-udev-trigger.service: Failed to reset devices.list: Operation not permitted
         Starting udev Coldplug all Devices...
cloud-init-local.service: Failed to reset devices.list: Operation not permitted
         Starting Initial cloud-init job (pre-networking)...
[  OK  ] Reached target User and Group Name Lookups.
[  OK  ] Reached target Swap.
systemd-tmpfiles-setup-dev.service: Failed to reset devices.list: Operation not permitted
         Starting Create Static Device Nodes in /dev...
sys-fs-fuse-connections.mount: Failed to reset devices.list: Operation not permitted
[  OK  ] Started Uncomplicated firewall.
systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
systemd-modules-load.service: Failed with result 'exit-code'.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
systemd-sysctl.service: Failed to reset devices.list: Operation not permitted
         Starting Apply Kernel Variables...
sys-kernel-config.mount: Failed to reset devices.list: Operation not permitted
         Mounting Kernel Configuration File System...
[  OK  ] Started Create Static Device Nodes in /dev.
systemd-udevd.service: Failed to reset devices.list: Operation not permitted
         Starting udev Kernel Device Manager...
sys-kernel-config.mount: Mount process exited, code=exited status=32
sys-kernel-config.mount: Failed with result 'exit-code'.
[FAILED] Failed to mount Kernel Configuration File System.
See 'systemctl status sys-kernel-config.mount' for details.
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting ebtables ruleset management...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Reached target System Time Synchronized.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started ebtables ruleset management.
[ 1018.605715] cloud-init[68]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'init-local' at Mon, 02 Mar 2020 16:58:54 +0000. Up 2.00 seconds.
[  OK  ] Started Initial cloud-init job (pre-networking).
[  OK  ] Reached target Network (Pre).
         Starting Network Service...
[  OK  ] Started Network Service.
         Starting Network Name Resolution...
         Starting Wait for Network to be Configured...
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Network.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Started Wait for Network to be Configured.
         Starting Initial cloud-init job (metadata service crawler)...
[ 1023.469632] cloud-init[137]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'init' at Mon, 02 Mar 2020 16:59:00 +0000. Up 8.00 seconds.
[ 1023.470505] cloud-init[137]: ci-info: +++++++++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++++++++
[ 1023.470973] cloud-init[137]: ci-info: +--------+------+------------------------------------------+---------------+--------+-------------------+
[ 1023.471355] cloud-init[137]: ci-info: | Device |  Up  |                 Address                  |      Mask     | Scope  |     Hw-Address    |
[ 1023.471727] cloud-init[137]: ci-info: +--------+------+------------------------------------------+---------------+--------+-------------------+
[ 1023.472177] cloud-init[137]: ci-info: |  eth0  | True |              10.220.118.115              | 255.255.255.0 | global | 00:16:3e:c0:30:19 |
[ 1023.472638] cloud-init[137]: ci-info: |  eth0  | True | fd42:e6e0:1d2:5a5a:216:3eff:fec0:3019/64 |       .       | global | 00:16:3e:c0:30:19 |
[ 1023.473071] cloud-init[137]: ci-info: |  eth0  | True |       fe80::216:3eff:fec0:3019/64        |       .       |  link  | 00:16:3e:c0:30:19 |
[ 1023.473502] cloud-init[137]: ci-info: |   lo   | True |                127.0.0.1                 |   255.0.0.0   |  host  |         .         |
[ 1023.473949] cloud-init[137]: ci-info: |   lo   | True |                 ::1/128                  |       .       |  host  |         .         |
[ 1023.474366] cloud-init[137]: ci-info: +--------+------+------------------------------------------+---------------+--------+-------------------+
[ 1023.474752] cloud-init[137]: ci-info: +++++++++++++++++++++++++++++++Route IPv4 info+++++++++++++++++++++++++++++++
[ 1023.475156] cloud-init[137]: ci-info: +-------+--------------+--------------+-----------------+-----------+-------+
[ 1023.475635] cloud-init[137]: ci-info: | Route | Destination  |   Gateway    |     Genmask     | Interface | Flags |
[ 1023.476398] cloud-init[137]: ci-info: +-------+--------------+--------------+-----------------+-----------+-------+
[ 1023.476803] cloud-init[137]: ci-info: |   0   |   0.0.0.0    | 10.220.118.1 |     0.0.0.0     |    eth0   |   UG  |
[ 1023.477309] cloud-init[137]: ci-info: |   1   | 10.220.118.0 |   0.0.0.0    |  255.255.255.0  |    eth0   |   U   |
[ 1023.477885] cloud-init[137]: ci-info: |   2   | 10.220.118.1 |   0.0.0.0    | 255.255.255.255 |    eth0   |   UH  |
[ 1023.478274] cloud-init[137]: ci-info: +-------+--------------+--------------+-----------------+-----------+-------+
[ 1023.478799] cloud-init[137]: ci-info: ++++++++++++++++++++++++++++++++++Route IPv6 info++++++++++++++++++++++++++++++++++
[ 1023.479375] cloud-init[137]: ci-info: +-------+-------------------------+---------------------------+-----------+-------+
[ 1023.479799] cloud-init[137]: ci-info: | Route |       Destination       |          Gateway          | Interface | Flags |
[ 1023.480260] cloud-init[137]: ci-info: +-------+-------------------------+---------------------------+-----------+-------+
[ 1023.480651] cloud-init[137]: ci-info: |   0   | fd42:e6e0:1d2:5a5a::/64 |             ::            |    eth0   |   U   |
[ 1023.481196] cloud-init[137]: ci-info: |   1   | fd42:e6e0:1d2:5a5a::/64 |             ::            |    eth0   |   Ue  |
[ 1023.481646] cloud-init[137]: ci-info: |   2   |        fe80::/64        |             ::            |    eth0   |   U   |
[ 1023.482143] cloud-init[137]: ci-info: |   3   |           ::/0          | fe80::fc0f:4fff:fead:6887 |    eth0   |   UG  |
[ 1023.482615] cloud-init[137]: ci-info: |   5   |          local          |             ::            |    eth0   |   U   |
[ 1023.483030] cloud-init[137]: ci-info: |   6   |          local          |             ::            |    eth0   |   U   |
[ 1023.483475] cloud-init[137]: ci-info: |   7   |         ff00::/8        |             ::            |    eth0   |   U   |
[ 1023.483925] cloud-init[137]: ci-info: +-------+-------------------------+---------------------------+-----------+-------+
[ 1024.433589] cloud-init[137]: Generating public/private rsa key pair.
[ 1024.434071] cloud-init[137]: Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
[ 1024.434442] cloud-init[137]: Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
[ 1024.434724] cloud-init[137]: The key fingerprint is:
[ 1024.435003] cloud-init[137]: SHA256:mK1rM98MSJj8qr/7wCyT3W12c5dthtjwFeO1fU5UfQk root@net1
[ 1024.435276] cloud-init[137]: The key's randomart image is:
[ 1024.435545] cloud-init[137]: +---[RSA 2048]----+
[ 1024.435813] cloud-init[137]: |             E. +|
[ 1024.436211] cloud-init[137]: |               .+|
[ 1024.436546] cloud-init[137]: |               o+|
[ 1024.436802] cloud-init[137]: |   . o +      ..*|
[ 1024.437054] cloud-init[137]: |    + + S   .  o=|
[ 1024.437308] cloud-init[137]: |   = + +     = B.|
[ 1024.437579] cloud-init[137]: |  + = = = o o * =|
[ 1024.437833] cloud-init[137]: |   o o++ = o . o |
[ 1024.438070] cloud-init[137]: |  .o==o+. o      |
[ 1024.438318] cloud-init[137]: +----[SHA256]-----+
[ 1024.438605] cloud-init[137]: Generating public/private dsa key pair.
[ 1024.438872] cloud-init[137]: Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
[ 1024.439122] cloud-init[137]: Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
[ 1024.439377] cloud-init[137]: The key fingerprint is:
[ 1024.439635] cloud-init[137]: SHA256:Gnab/85H9ihb8UxdhG8uY/0J2wVoDw54EHkASShWLA0 root@net1
[ 1024.439888] cloud-init[137]: The key's randomart image is:
[ 1024.440150] cloud-init[137]: +---[DSA 1024]----+
[ 1024.440434] cloud-init[137]: |  E=.oooo+     ..|
[ 1024.440704] cloud-init[137]: |  + + . o .   .. |
[ 1024.440955] cloud-init[137]: | . o     +   . ..|
[ 1024.441242] cloud-init[137]: |        . o + . =|
[ 1024.441584] cloud-init[137]: |      o S. + o.=o|
[ 1024.441903] cloud-init[137]: |     . + o  ..B=+|
[ 1024.442290] cloud-init[137]: |      . o    +==*|
[ 1024.442675] cloud-init[137]: |         . ..oooo|
[ 1024.443057] cloud-init[137]: |          .o=+   |
[ 1024.443417] cloud-init[137]: +----[SHA256]-----+
[ 1024.443814] cloud-init[137]: Generating public/private ecdsa key pair.
[ 1024.444265] cloud-init[137]: Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
[ 1024.444692] cloud-init[137]: Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
[ 1024.445039] cloud-init[137]: The key fingerprint is:
[ 1024.445349] cloud-init[137]: SHA256:Vy8wVyoWXbPh+xNyWwR0GD+vfBx94K6GlEKllMc65cQ root@net1
[ 1024.445725] cloud-init[137]: The key's randomart image is:
[ 1024.446207] cloud-init[137]: +---[ECDSA 256]---+
[ 1024.446611] cloud-init[137]: |         +.. oOo.|
[ 1024.446968] cloud-init[137]: |        o E..+.B |
[ 1024.447338] cloud-init[137]: |       . O= + +.o|
[ 1024.447723] cloud-init[137]: |        =..* o ++|
[ 1024.448171] cloud-init[137]: |       .S.....++=|
[ 1024.448538] cloud-init[137]: |        ..o  +o+*|
[ 1024.448889] cloud-init[137]: |         o .  +o+|
[ 1024.449308] cloud-init[137]: |          . .. ..|
[ 1024.449706] cloud-init[137]: |           ..    |
[ 1024.450112] cloud-init[137]: +----[SHA256]-----+
[ 1024.450482] cloud-init[137]: Generating public/private ed25519 key pair.
[ 1024.450892] cloud-init[137]: Your identification has been saved in /etc/ssh/ssh_host_ed25519_key.
[ 1024.451228] cloud-init[137]: Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub.
[ 1024.451552] cloud-init[137]: The key fingerprint is:
[ 1024.451874] cloud-init[137]: SHA256:paFcwIodK3g7czXFqGKkGirx8Je4SoETxERX86BnilQ root@net1
[ 1024.452243] cloud-init[137]: The key's randomart image is:
[ 1024.452464] cloud-init[137]: +--[ED25519 256]--+
[ 1024.452675] cloud-init[137]: |++ E.=.o         |
[ 1024.452883] cloud-init[137]: |..+ o *.o        |
[ 1024.453152] cloud-init[137]: |.= + B oo .      |
[ 1024.453481] cloud-init[137]: |O.B O.oo +       |
[ 1024.453870] cloud-init[137]: |=@ * oo.S        |
[ 1024.454248] cloud-init[137]: |+.O +            |
[ 1024.454560] cloud-init[137]: |.. *             |
[ 1024.454890] cloud-init[137]: |. .              |
[ 1024.455288] cloud-init[137]: |..               |
[ 1024.455685] cloud-init[137]: +----[SHA256]-----+
[  OK  ] Started Initial cloud-init job (metadata service crawler).
[  OK  ] Reached target Network is Online.
         Starting Availability of block devices...
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Cloud-config availability.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Message of the Day.
[  OK  ] Listening on ACPID Listen Socket.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Started ACPI Events Check.
[  OK  ] Listening on Open-iSCSI iscsid Socket.
         Starting Socket activation for snappy daemon.
[  OK  ] Reached target Paths.
[  OK  ] Started Daily Cleanup of Temporary Directories.
         Starting LXD - unix socket.
[  OK  ] Reached target Timers.
[  OK  ] Listening on Unix socket for apport crash forwarding.
[  OK  ] Started Availability of block devices.
[  OK  ] Listening on Socket activation for snappy daemon.
[  OK  ] Listening on LXD - unix socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Permit User Sessions...
[  OK  ] Started Deferred execution scheduler.
[  OK  ] Started D-Bus System Message Bus.
         Starting System Logging Service...
[  OK  ] Started Regular background program processing daemon.
         Starting OpenBSD Secure Shell server...
         Starting Login Service...
         Starting LXD - container startup/shutdown...
         Starting LSB: automatic crash report generation...
         Starting Dispatcher daemon for systemd-networkd...
         Starting Accounts Service...
         Starting Snappy daemon...
[  OK  ] Started System Logging Service.
[  OK  ] Started Permit User Sessions.
         Starting Hostname Service...
         Starting Terminate Plymouth Boot Screen...
         Starting Hold until boot process finishes up...
[  OK  ] Started Hold until boot process finishes up.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Console Getty.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Terminate Plymouth Boot Screen.
[  OK  ] Started Login Service.
[  OK  ] Started Unattended Upgrades Shutdown.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started LSB: automatic crash report generation.
[  OK  ] Started Hostname Service.
         Starting Authorization Manager...
[  OK  ] Started Authorization Manager.
[  OK  ] Started Accounts Service.
[  OK  ] Started LXD - container startup/shutdown.
[  OK  ] Started Dispatcher daemon for systemd-networkd.

Ubuntu 18.04.4 LTS net1 console

net1 login: [ 1034.061285] cloud-init[261]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'modules:config' at Mon, 02 Mar 2020 16:59:10 +0000. Up 18.00 seconds.
ci-info: no authorized SSH keys fingerprints found for user ubuntu.
<14>Mar  2 16:59:12 ec2: 
<14>Mar  2 16:59:12 ec2: #############################################################
<14>Mar  2 16:59:12 ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Mar  2 16:59:12 ec2: 1024 SHA256:Gnab/85H9ihb8UxdhG8uY/0J2wVoDw54EHkASShWLA0 root@net1 (DSA)
<14>Mar  2 16:59:12 ec2: 256 SHA256:Vy8wVyoWXbPh+xNyWwR0GD+vfBx94K6GlEKllMc65cQ root@net1 (ECDSA)
<14>Mar  2 16:59:12 ec2: 256 SHA256:paFcwIodK3g7czXFqGKkGirx8Je4SoETxERX86BnilQ root@net1 (ED25519)
<14>Mar  2 16:59:12 ec2: 2048 SHA256:mK1rM98MSJj8qr/7wCyT3W12c5dthtjwFeO1fU5UfQk root@net1 (RSA)
<14>Mar  2 16:59:12 ec2: -----END SSH HOST KEY FINGERPRINTS-----
<14>Mar  2 16:59:12 ec2: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOpK0xOXDH6rW96l5mMWkNTSQjbYZnOfmbHTzHnSDCPGMPUf1SI5hHLcY6GGf91gkEuhbFMSAal7wWCWFcfx/WQ= root@net1
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFfOkJPecSrLJa5wH8G5gD6YIufg0IdwuXgyqQ09OzXu root@net1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxbiF6x2zaRtRTXFpxg3edpmA+ZtZea4kBzU3fJyHZs62oDBENaKCze7Kt+AB2N9wlTK6HQxGV9T/vjjd1BinfT/uyANlFjdOXOVDgRj7uQJT/gn5JM5S80UEFZEz1m/5QcMPRuwTS2XBeorF8LXvYwE5eifIJONg8u5KVWbiPA1vZGwmBnI0kG3kn0/NviVOWBz9/9hsgFFMRTkgeIX9OqC5pAQMcORTxLELgbi8UVO2R85Z5jSIuZMGaDZtGzuApC8oJSzJnMPS0yAl9IfiOBquyi/S1/js4On3TsQM6r2vn4YSnhdODSOcvc0xq3IO/u5P5NhYdP1HywdeMqbJt root@net1
-----END SSH HOST KEY KEYS-----
[ 1035.900279] cloud-init[275]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'modules:final' at Mon, 02 Mar 2020 16:59:12 +0000. Up 20.00 seconds.
[ 1035.900764] cloud-init[275]: ci-info: no authorized SSH keys fingerprints found for user ubuntu.
[ 1035.901192] cloud-init[275]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 finished at Mon, 02 Mar 2020 16:59:12 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net].  Up 20.00 seconds
user@rockpro64:~$ lxc console net2 --show-log

Console log:

systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
Detected virtualization lxc.
Detected architecture arm64.

Welcome to Ubuntu 18.04.4 LTS!

Set hostname to <net2>.
Initializing machine ID from random generator.
Failed to read AF_UNIX datagram queue length, ignoring: No such file or directory
File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[  OK  ] Reached target Swap.
system.slice: Failed to reset devices.list: Operation not permitted
[  OK  ] Created slice System Slice.
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on Device-mapper event daemon FIFOs.
systemd-modules-load.service: Failed to reset devices.list: Operation not permitted
         Starting Load Kernel Modules...
[  OK  ] Listening on LVM2 metadata daemon socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
keyboard-setup.service: Failed to reset devices.list: Operation not permitted
         Starting Set the console keyboard layout...
ufw.service: Failed to reset devices.list: Operation not permitted
         Starting Uncomplicated firewall...
[  OK  ] Listening on Journal Socket (/dev/log).
systemd-tmpfiles-setup-dev.service: Failed to reset devices.list: Operation not permitted
         Starting Create Static Device Nodes in /dev...
cloud-init-local.service: Failed to reset devices.list: Operation not permitted
         Starting Initial cloud-init job (pre-networking)...
[  OK  ] Listening on udev Kernel Socket.
[UNSUPP] Starting of Arbitrary Executable Fi…tem Automount Point not supported.
[  OK  ] Listening on LVM2 poll daemon socket.
[  OK  ] Listening on Syslog Socket.
systemd-journald.service: Failed to reset devices.list: Operation not permitted
         Starting Journal Service...
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Listening on udev Control Socket.
systemd-udev-trigger.service: Failed to reset devices.list: Operation not permitted
         Starting udev Coldplug all Devices...
user.slice: Failed to reset devices.list: Operation not permitted
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Reached target User and Group Name Lookups.
sys-fs-fuse-connections.mount: Failed to reset devices.list: Operation not permitted
systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
systemd-modules-load.service: Failed with result 'exit-code'.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[  OK  ] Started Uncomplicated firewall.
sys-kernel-config.mount: Failed to reset devices.list: Operation not permitted
         Mounting Kernel Configuration File System...
systemd-sysctl.service: Failed to reset devices.list: Operation not permitted
         Starting Apply Kernel Variables...
[  OK  ] Started Create Static Device Nodes in /dev.
sys-kernel-config.mount: Mount process exited, code=exited status=32
sys-kernel-config.mount: Failed with result 'exit-code'.
[FAILED] Failed to mount Kernel Configuration File System.
See 'systemctl status sys-kernel-config.mount' for details.
systemd-udevd.service: Failed to reset devices.list: Operation not permitted
         Starting udev Kernel Device Manager...
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
         Starting Set console font and keymap...
         Starting ebtables ruleset management...
         Starting Tell Plymouth To Write Out Runtime Data...
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Reached target System Time Synchronized.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started ebtables ruleset management.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[ 1037.297353] cloud-init[65]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'init-local' at Mon, 02 Mar 2020 16:59:13 +0000. Up 2.00 seconds.
[  OK  ] Started Initial cloud-init job (pre-networking).
[  OK  ] Reached target Network (Pre).
         Starting Network Service...
[  OK  ] Started Network Service.
         Starting Wait for Network to be Configured...
         Starting Network Name Resolution...
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target Network.
[FAILED] Failed to start Wait for Network to be Configured.
See 'systemctl status systemd-networkd-wait-online.service' for details.
         Starting Initial cloud-init job (metadata service crawler)...
[ 1159.091131] cloud-init[136]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'init' at Mon, 02 Mar 2020 17:01:15 +0000. Up 124.00 seconds.
[ 1159.091658] cloud-init[136]: ci-info: ++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++
[ 1159.091947] cloud-init[136]: ci-info: +--------+------+-----------------------------+-----------+-------+-------------------+
[ 1159.092296] cloud-init[136]: ci-info: | Device |  Up  |           Address           |    Mask   | Scope |     Hw-Address    |
[ 1159.092596] cloud-init[136]: ci-info: +--------+------+-----------------------------+-----------+-------+-------------------+
[ 1159.092805] cloud-init[136]: ci-info: |  eth0  | True | fe80::216:3eff:fe2d:b2a4/64 |     .     |  link | 00:16:3e:2d:b2:a4 |
[ 1159.093023] cloud-init[136]: ci-info: |   lo   | True |          127.0.0.1          | 255.0.0.0 |  host |         .         |
[ 1159.093242] cloud-init[136]: ci-info: |   lo   | True |           ::1/128           |     .     |  host |         .         |
[ 1159.093439] cloud-init[136]: ci-info: +--------+------+-----------------------------+-----------+-------+-------------------+
[ 1159.093635] cloud-init[136]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
[ 1159.093892] cloud-init[136]: ci-info: +-------+-------------+---------+-----------+-------+
[ 1159.094174] cloud-init[136]: ci-info: | Route | Destination | Gateway | Interface | Flags |
[ 1159.094479] cloud-init[136]: ci-info: +-------+-------------+---------+-----------+-------+
[ 1159.094751] cloud-init[136]: ci-info: |   0   |  fe80::/64  |    ::   |    eth0   |   U   |
[ 1159.094982] cloud-init[136]: ci-info: |   2   |    local    |    ::   |    eth0   |   U   |
[ 1159.095231] cloud-init[136]: ci-info: |   3   |   ff00::/8  |    ::   |    eth0   |   U   |
[ 1159.095726] cloud-init[136]: ci-info: +-------+-------------+---------+-----------+-------+
[ 1160.646534] cloud-init[136]: Generating public/private rsa key pair.
[ 1160.647030] cloud-init[136]: Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
[ 1160.647393] cloud-init[136]: Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
[ 1160.647654] cloud-init[136]: The key fingerprint is:
[ 1160.647929] cloud-init[136]: SHA256:Xd2jbhtJyvECaHK0GoHQ4Mi26KHWaLdc1bfwHNrJAso root@net2
[ 1160.648268] cloud-init[136]: The key's randomart image is:
[ 1160.648548] cloud-init[136]: +---[RSA 2048]----+
[ 1160.648832] cloud-init[136]: | oo              |
[ 1160.649097] cloud-init[136]: |+ ...        . . |
[ 1160.649356] cloud-init[136]: |.+ . . .    . ...|
[ 1160.649612] cloud-init[136]: |o .   o +. .  . .|
[ 1160.649860] cloud-init[136]: |.o   o BS+.+ o   |
[ 1160.650085] cloud-init[136]: |o + . O . @ X .  |
[ 1160.650331] cloud-init[136]: |.= o E   o @ *   |
[ 1160.650588] cloud-init[136]: |o o o     . o o  |
[ 1160.650867] cloud-init[136]: |   o         .   |
[ 1160.651137] cloud-init[136]: +----[SHA256]-----+
[ 1160.651390] cloud-init[136]: Generating public/private dsa key pair.
[ 1160.651621] cloud-init[136]: Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
[ 1160.651915] cloud-init[136]: Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
[ 1160.652241] cloud-init[136]: The key fingerprint is:
[ 1160.652481] cloud-init[136]: SHA256:3NocZWjiWaew8MgdaWaN9AtnhBozO57nvnWAG+JHvcI root@net2
[ 1160.652842] cloud-init[136]: The key's randomart image is:
[ 1160.653087] cloud-init[136]: +---[DSA 1024]----+
[ 1160.653360] cloud-init[136]: |        ...      |
[ 1160.653660] cloud-init[136]: |      +..* .     |
[ 1160.653980] cloud-init[136]: |      .*@ O +    |
[ 1160.654393] cloud-init[136]: |     .+@ / *     |
[ 1160.654710] cloud-init[136]: |     .+oS B      |
[ 1160.655074] cloud-init[136]: |     .o+.* +     |
[ 1160.655459] cloud-init[136]: |      .oE = .    |
[ 1160.655834] cloud-init[136]: |       ..o .     |
[ 1160.656249] cloud-init[136]: |       .o.       |
[ 1160.656664] cloud-init[136]: +----[SHA256]-----+
[ 1160.657026] cloud-init[136]: Generating public/private ecdsa key pair.
[ 1160.657436] cloud-init[136]: Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
[ 1160.657842] cloud-init[136]: Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
[ 1160.658229] cloud-init[136]: The key fingerprint is:
[ 1160.658588] cloud-init[136]: SHA256:nHwt741VRBNbyU7VWTVpjRzuVdeMTnpk8vDBfojH7PA root@net2
[ 1160.658985] cloud-init[136]: The key's randomart image is:
[ 1160.659354] cloud-init[136]: +---[ECDSA 256]---+
[ 1160.659739] cloud-init[136]: |             ooO^|
[ 1160.660194] cloud-init[136]: |            o.XO%|
[ 1160.660620] cloud-init[136]: |             /=+o|
[ 1160.661038] cloud-init[136]: |       o . .+.@+.|
[ 1160.661449] cloud-init[136]: |        S o .*...|
[ 1160.661854] cloud-init[136]: |         . o  E. |
[ 1160.662249] cloud-init[136]: |            . .  |
[ 1160.662630] cloud-init[136]: |           . +   |
[ 1160.663023] cloud-init[136]: |            o .  |
[ 1160.663424] cloud-init[136]: +----[SHA256]-----+
[ 1160.663817] cloud-init[136]: Generating public/private ed25519 key pair.
[ 1160.664320] cloud-init[136]: Your identification has been saved in /etc/ssh/ssh_host_ed25519_key.
[ 1160.664736] cloud-init[136]: Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub.
[ 1160.665145] cloud-init[136]: The key fingerprint is:
[ 1160.665515] cloud-init[136]: SHA256:RJdmyKJV6W4a9kZEp/4VJf+MmM6eJ1qa5rMcecz+5mI root@net2
[ 1160.665862] cloud-init[136]: The key's randomart image is:
[ 1160.666206] cloud-init[136]: +--[ED25519 256]--+
[ 1160.666550] cloud-init[136]: |       ooo..     |
[ 1160.666936] cloud-init[136]: |      o.=.= . .  |
[ 1160.667249] cloud-init[136]: |     o +.=   +   |
[ 1160.667623] cloud-init[136]: |    .  .+   . .  |
[ 1160.668073] cloud-init[136]: |       +S    + + |
[ 1160.668488] cloud-init[136]: |      o =  ++ . o|
[ 1160.668891] cloud-init[136]: |     . * .o+=    |
[ 1160.669245] cloud-init[136]: |      . o.+BE.o  |
[ 1160.669599] cloud-init[136]: |       . oB*+Bo  |
[ 1160.669987] cloud-init[136]: +----[SHA256]-----+
[  OK  ] Started Initial cloud-init job (metadata service crawler).
[  OK  ] Reached target Cloud-config availability.
[  OK  ] Reached target System Initialization.
         Starting Socket activation for snappy daemon.
[  OK  ] Listening on ACPID Listen Socket.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on Unix socket for apport crash forwarding.
[  OK  ] Started Message of the Day.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Listening on Open-iSCSI iscsid Socket.
[  OK  ] Started ACPI Events Check.
[  OK  ] Reached target Paths.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
         Starting LXD - unix socket.
[  OK  ] Reached target Network is Online.
         Starting Availability of block devices...
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[  OK  ] Listening on Socket activation for snappy daemon.
[  OK  ] Listening on LXD - unix socket.
[  OK  ] Started Availability of block devices.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Accounts Service...
[  OK  ] Started Deferred execution scheduler.
[  OK  ] Started Regular background program processing daemon.
         Starting Dispatcher daemon for systemd-networkd...
         Starting LSB: automatic crash report generation...
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
[  OK  ] Started D-Bus System Message Bus.
         Starting Snappy daemon...
         Starting System Logging Service...
         Starting LXD - container startup/shutdown...
         Starting Login Service...
[  OK  ] Started Permit User Sessions.
         Starting Authorization Manager...
         Starting Terminate Plymouth Boot Screen...
         Starting Hold until boot process finishes up...
[  OK  ] Started System Logging Service.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started LSB: automatic crash report generation.
[  OK  ] Started Hold until boot process finishes up.
[  OK  ] Started Terminate Plymouth Boot Screen.
[  OK  ] Started Login Service.
[  OK  ] Started Unattended Upgrades Shutdown.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Console Getty.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Authorization Manager.
[  OK  ] Started Accounts Service.
[  OK  ] Started LXD - container startup/shutdown.
[  OK  ] Started Dispatcher daemon for systemd-networkd.
[  OK  ] Started Snappy daemon.
         Starting Wait until snapd is fully seeded...

Ubuntu 18.04.4 LTS net2 console

net2 login: [ 1186.791287] cloud-init[272]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'modules:config' at Mon, 02 Mar 2020 17:01:43 +0000. Up 151.00 seconds.
ci-info: no authorized SSH keys fingerprints found for user ubuntu.
<14>Mar  2 17:01:45 ec2: 
<14>Mar  2 17:01:45 ec2: #############################################################
<14>Mar  2 17:01:45 ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Mar  2 17:01:45 ec2: 1024 SHA256:3NocZWjiWaew8MgdaWaN9AtnhBozO57nvnWAG+JHvcI root@net2 (DSA)
<14>Mar  2 17:01:45 ec2: 256 SHA256:nHwt741VRBNbyU7VWTVpjRzuVdeMTnpk8vDBfojH7PA root@net2 (ECDSA)
<14>Mar  2 17:01:45 ec2: 256 SHA256:RJdmyKJV6W4a9kZEp/4VJf+MmM6eJ1qa5rMcecz+5mI root@net2 (ED25519)
<14>Mar  2 17:01:45 ec2: 2048 SHA256:Xd2jbhtJyvECaHK0GoHQ4Mi26KHWaLdc1bfwHNrJAso root@net2 (RSA)
<14>Mar  2 17:01:45 ec2: -----END SSH HOST KEY FINGERPRINTS-----
<14>Mar  2 17:01:45 ec2: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNESM5bks2vG5e0+Loc/a/+1DTVjjFHm9U+Uw7ZsBXBJmAkMeRXmiV8XWsI1/7elJT1T5ZzrRGr8Pm6+jOmirOY= root@net2
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIRrlTkxmtSDMXSf9bwndVJn0GBS2RU5ctVAflIjtmUt root@net2
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCayaa5pttxOq3Gya+qkza8Zj0u2u6MSdTr3iR0ACY84/4YLHJDxNHuj5jYxEb+RqG2q1/Wp+BwP2QhYliaMqIRk4gvTn07jCU8tBKAtFBy8LTxZiYx1Y5PiWVSfBj8XK+wcoT1xuKEKDJ0ngOtS8vwga33kCn+CaajU4/vnH34WyJNuFIeH4+ogQb1KnugcldImLE8k7c03LJQsdAldVDNzwnD0K++UbF2E49+fXgbSJ6KTogYhVEnjuggLQZJDXhoRw+oUoxIIuD+HJyAWiBZ3fRYTovvxUY9TDNB3donukhWpviuIjpgbhMyiUZLM0pSfkMnx79NgyZIgZe/xQn1 root@net2
-----END SSH HOST KEY KEYS-----
[ 1188.311547] cloud-init[287]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'modules:final' at Mon, 02 Mar 2020 17:01:45 +0000. Up 153.00 seconds.
[ 1188.312334] cloud-init[287]: ci-info: no authorized SSH keys fingerprints found for user ubuntu.
[ 1188.312947] cloud-init[287]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 finished at Mon, 02 Mar 2020 17:01:45 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net].  Up 154.00 seconds

I tried running dhclient within net2 which is configured for macvlan, but I still don’t get an address.

If you sudo apt install lxc, you can use the following tool to check how good is your kernel, https://linuxcontainers.org/lxc/manpages/man1/lxc-checkconfig.1.html

Post the result here or in pastebin.

If all else fails, you can always try to debug.
Make it so that in your failing container, systemd-networkd (the systemd replacement for dhclient) does not run automatically, this can involve systemctl disable systemd-networkd and systemctl stop systemd-networkd. Anyway, once it is done try to run something along the lines of:

SYSTEMD_LOG_LEVEL=debug strace /lib/systemd/systemd-networkd &>mytrace.txt

then (after enough waiting, say one minute), grab the mytrace.txt file. If it does not make sense to you, add it to some web page and post a link, maybe someone will read it and find something of value in it.

Edit: if strace is not available you have to install it, if it needs to be said.

Here is the result: https://pastebin.com/ghL1rhjM

Is that how most people use pastebin? I’m surprised I’ve never used it.

The snap has lxd.check-kernel too.

1 Like