Creating testcontainer
Error: Failed instance creation: Create container: Create LXC container: Interfaces must have a MAC address
Steps to reproduce
setup a maas server
deploy a LTS 18.04
install LXD on the host
run lxd init with cluster settings, MAAS settings using a predefined Bridge (unmanaged) from MAAS and a new local storage pool
lxc launch images:ubuntu/bionic/amd64 c1 will result in the given error
Information to attach
Creating testcontainer
Error: Failed instance creation: Create container: Create LXC container: Interfaces must have a MAC address
If I set manually a Mac address for the default profile:
config: {}
description: Default LXD profile
devices:
eth0:
hwaddr: 00:16:3e:6f:79:4d
maas.subnet.ipv4: MAAS
name: eth0
nictype: bridged
parent: br-eno1
type: nic
root:
path: /
pool: local
type: disk
name: default
used_by: []
the container will be created but as you may already guess ... if I try to create a 2 container because the Mac address is the same ... that is not gonna happen and I will receive:
Creating testcontainer2
Error: Failed instance creation: Create container: Create LXC container: {"mac_addresses": ["MAC address 00:16:3e:6f:79:4d already in use on testcontainer."]}
So I think there is something wrong in the whole process of generating the Mac address for the container if a network is not managed by the lxd network because if I just generate an FAN network it works
Looks like some kind of regression we must have caused when we re-did the device support in LXD, should be reasonably straightforward to track down and fix.
6266 Required information
Issue description
Creating testcontainer Error: Failed instance creation: Create container: Create LXC container: Interfaces must have a MAC address
Steps to reproduce
Information to attach
Creating testcontainer Error: Failed instance creation: Create container: Create LXC container: Interfaces must have a MAC address
If I set manually a Mac address for the default profile: config: {} description: Default LXD profile devices: eth0: hwaddr: 00:16:3e:6f:79:4d maas.subnet.ipv4: MAAS name: eth0 nictype: bridged parent: br-eno1 type: nic root: path: / pool: local type: disk name: default used_by: []
the container will be created but as you may already guess ... if I try to create a 2 container because the Mac address is the same ... that is not gonna happen and I will receive:
Creating testcontainer2 Error: Failed instance creation: Create container: Create LXC container: {"mac_addresses": ["MAC address 00:16:3e:6f:79:4d already in use on testcontainer."]}
So I think there is something wrong in the whole process of generating the Mac address for the container if a network is not managed by the lxd network because if I just generate an FAN network it works