LXD Container Launch Errors on Vagrant Provisioned Bionic VM

hey folks, I’m trying to launch an lxc container (ubuntu bionic) and I’m seeing a strange issue, the lxd is running on a virtualbox vm provisioned by vagrant. I guess the issue is Vagrant-related as I’ve not experienced this before.

errors:

ubuntu@ubuntu-bionic:~$ lxc launch ubuntu:bionic test
Creating test
Starting test
Error: Failed to run: /snap/lxd/current/bin/lxd forkstart test /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/test/lxc.conf:
Try `lxc info --show-log local:test` for more info
ubuntu@ubuntu-bionic:~$ lxc info --show-log local:test
Name: test
Location: none
Remote: unix://
Architecture: x86_64
Created: 2019/04/25 07:45 UTC
Status: Stopped
Type: persistent
Profiles: default

Log:

lxc test 20190425074521.897 ERROR    network - network.c:lxc_ovs_attach_bridge:1887 - Failed to attach "enp0s8" to openvswitch bridge "vethVI2UKS": ovs-vsctl:
lxc test 20190425074521.897 ERROR    network - network.c:instantiate_veth:172 - Operation not permitted - Failed to attach "vethVI2UKS" to bridge "enp0s8"
lxc test 20190425074521.909 ERROR    network - network.c:lxc_create_network_priv:2457 - Failed to create network device
lxc test 20190425074521.909 ERROR    start - start.c:lxc_spawn:1649 - Failed to create the network
lxc test 20190425074521.910 WARN     network - network.c:lxc_delete_network_priv:2610 - Failed to remove interface "vethVI2UKS" from "enp0s8"
lxc test 20190425074521.910 ERROR    start - start.c:__lxc_start:1975 - Failed to spawn container "test"
lxc test 20190425074521.911 WARN     conf - conf.c:lxc_map_ids:2970 - newuidmap binary is missing
lxc test 20190425074521.911 WARN     conf - conf.c:lxc_map_ids:2976 - newgidmap binary is missing
lxc test 20190425074521.912 ERROR    lxccontainer - lxccontainer.c:wait_on_daemonized_start:864 - Received container state "ABORTING" instead of "RUNNING"
lxc 20190425074521.912 WARN     commands - commands.c:lxc_cmd_rsp_recv:132 - Connection reset by peer - Failed to receive response for command "get_state"

ubuntu@ubuntu-bionic:~$

Looks like your default profile has something like:

eth0:
  type: nic
  nictype: bridged
  parent: enp0s8
  name: eth0

Which isn’t valid as enp0s8 isn’t a bridge. parent for bridged type nic must point to a Linux or OVS bridge. If you want to directly point at a physical nic, you may want to try nictype=macvlan instead.

1 Like

Ah nuts! Thanks. Sometimes it’s the simple things, like me :slight_smile: