Welcome to the Linux Foundation Forum!

Lab 3.2 Unable to start container.

Lab 3.2. I'm using the LF pre-built Ubuntu 18.04 on VMware Workstation 15 Player.
Everthing seems to work fine until I try to start the container. I'm afraid the error messages don't mean much to me. Any guidance here would be appreciated. Thanks. ldt

  1. student@ubuntu:~$ cat /etc/subuid
  2. student:100000:65536
  3. student@ubuntu:~$ cat /etc/subgid
  4. student:100000:65536
  5. student@ubuntu:~$ cat /etc/lxc/lxc-usernet
  6. # USERNAME TYPE BRIDGE COUNT
  7. student veth lxcbr0 10
  8. student@ubuntu:~$ cat ~/.config/lxc/default.conf
  9. lxc.net.0.type = veth
  10. lxc.net.0.link = lxcbr0
  11. lxc.net.0.flags = up
  12. lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
  13. lxc.idmap = u 0 100000 65536
  14. lxc.idmap = g 0 100000 65536
  15. student@ubuntu:~$

...

  1. Distribution:
  2. ubuntu
  3. Release:
  4. xenial
  5. Architecture:
  6. amd64
  7.  
  8. Downloading the image index
  9. Downloading the rootfs
  10. Downloading the metadata
  11. The image cache is now ready
  12. Unpacking the rootfs
  13.  
  14. ---
  15. You just created an Ubuntu xenial amd64 (20200914_07:42) container.
  16.  
  17. To enable SSH, run: apt install openssh-server
  18. No default root or user password are set by LXC.

  1. student@ubuntu:~$ lxc-start -n unpriv-cont-user -d
  2. lxc-start: unpriv-cont-user: lxccontainer.c: wait_on_daemonized_start: 842 Received container state "ABORTING" instead of "RUNNING"
  3. lxc-start: unpriv-cont-user: tools/lxc_start.c: main: 330 The container failed to start
  4. lxc-start: unpriv-cont-user: tools/lxc_start.c: main: 333 To get more details, run the container in foreground mode
  5. lxc-start: unpriv-cont-user: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options

  1. student@ubuntu:~$ lxc-start -n unpriv-cont-user -F --logfile=/tmp/logfile --logpriority=WARN
  2. lxc-start: unpriv-cont-user: network.c: lxc_create_network_unpriv_exec: 2178 lxc-user-nic failed to configure requested network: cmd/lxc_user_nic.c: 576: create_nic: Error attaching veth0YJFD5 to lxcbr0
  3. lxc-start: unpriv-cont-user: start.c: lxc_spawn: 1765 Failed to create the configured network
  4. lxc-start: unpriv-cont-user: start.c: __lxc_start: 1939 Failed to spawn container "unpriv-cont-user"
  5. lxc-start: unpriv-cont-user: tools/lxc_start.c: main: 330 The container failed to start
  6. lxc-start: unpriv-cont-user: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options
  7. student@ubuntu:~$ cat /tmp/logfile
  8. lxc-start unpriv-cont-user 20200914174644.524 WARN start - start.c:lxc_spawn:1746 - Operation not permitted - Failed to allocate new network namespace id
  9. lxc-start unpriv-cont-user 20200914174644.575 ERROR network - network.c:lxc_create_network_unpriv_exec:2178 - lxc-user-nic failed to configure requested network: cmd/lxc_user_nic.c: 576: create_nic: Error attaching veth0YJFD5 to lxcbr0
  10. lxc-start unpriv-cont-user 20200914174644.575 ERROR start - start.c:lxc_spawn:1765 - Failed to create the configured network
  11. lxc-start unpriv-cont-user 20200914174644.575 ERROR start - start.c:__lxc_start:1939 - Failed to spawn container "unpriv-cont-user"
  12. lxc-start unpriv-cont-user 20200914174645.124 ERROR lxc_start - tools/lxc_start.c:main:330 - The container failed to start
  13. lxc-start unpriv-cont-user 20200914174645.124 ERROR lxc_start - tools/lxc_start.c:main:336 - Additional information can be obtained by setting the --logfile and --logpriority options
  14. student@ubuntu:~$

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Hi @ldt,

    It is common to see different results when using different Linux distributions or even different images of the same distribution. The LF pre-built and maintained images are aimed mostly at development courses, and have not been tested against the content of this course.

    What I notice to be slightly off are the UID and GID mappings from /etc/subuid and /etc/subgidwhich show for the student user values typically associated with root.

    Can you display the content of both /etc/subuid and /etc/subgid files?

    Regards,
    -Chris

  • Posts: 8

    Hi @chrispokorni
    Yes, those are shown in the top lines 1-4. But I have just verified them again. I did notice that the result is considerably different from what is shown in the lab. I'm missing the lxd:, root: and ubuntu: entries. I tried proceeding with the privileged container but got the same result. Lab 3.3 however, worked fine.

  • I believe a different Ubuntu distribution/release will show different outputs, and this has already been reported earlier in the forum.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training