I am trying to run an lxc container on Ubuntu 16.10 with the following configurations:

lxc.utsname = cont
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = bridge
lxc.network.ipv4 =

The bridge is already up and running. I create the container using xenial template as following:

lxc-create -f lxc-veth.conf -t download -n cont -- --dist ubuntu --release xenial --arch amd64 --no-validate

Then I start the container:

lxc-start -n cont /bin/bash --logfile log.txt

I get the following errors:

  lxc-start 20161114114122.026 ERROR    lxc_start - start.c:start:1439 - No such file or directory - failed to exec /lib/lxc cont
  lxc-start 20161114124122.026 ERROR    lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 5)
  lxc-start 20161114124122.026 ERROR    lxc_start - start.c:__lxc_start:1354 - failed to spawn 'cont'
  lxc-start 20161114124127.568 ERROR    lxc_start_ui - tools/lxc_start.c:main:344 - The container failed to start.
  lxc-start 20161114124127.568 ERROR    lxc_start_ui - tools/lxc_start.c:main:346 - To get more details, run the container in foreground mode.
  lxc-start 20161114124127.568 ERROR    lxc_start_ui - tools/lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.

I am not able to find out which file is missing. So what is the source of the problem?


The problem exists in the last command lxc-start, the command should be:

lxc-start -n cont --logfile bla.txt -- /bin/bash

Basically there is not need to run /bin/bash since when I attach the container I will have shell access

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.