Lxc start CTNAME: Common start logic: Failed to start device 'eth0': Invalid value for device option hwaddr:

lxc start container
Error: Common start logic: Failed to start device ‘eth0’: Invalid value for device option hwaddr: Invalid value, must 6 bytes of lower case hex separated by colons

OS Ubuntu: 18.04 LTS HWE LiveKernel Patching
lxd --version
3.17

It started with: Error: Get http://unix.socket/1.0: EOF but the error suddenly disappeared.

Cluster Status

±------±---------------------------±---------±-------±------------------+
| NAME | URL | DATABASE | STATE | MESSAGE |
±------±---------------------------±---------±-------±------------------+
| lxd-1 | https://192.168.100.1:8443 | YES | ONLINE | fully operational |
±------±---------------------------±---------±-------±------------------+
| lxd-2 | https://192.168.100.2:8443 | YES | ONLINE | fully operational |
±------±---------------------------±---------±-------±------------------+
| lxd-3 | https://192.168.100.3:8443 | YES | ONLINE | fully operational |
±------±---------------------------±---------±-------±------------------+

I will block future snap updates from applying automatically. This is annoying every time on production containers.

Debug Output

DBUG[09-11|07:54:20] Failure for task operation: 49f072c2-8e29-450d-8c20-883d097cdf52: Common start logic: Failed to start device ‘eth0’: Invalid value for device option hwaddr: Invalid value, must 6 bytes of lower case hex separated by colons
DBUG[09-11|07:54:20]
{
“type”: “async”,
“status”: “Operation created”,
“status_code”: 100,
“operation”: “/1.0/operations/49f072c2-8e29-450d-8c20-883d097cdf52”,
“error_code”: 0,
“error”: “”,
“metadata”: {
“id”: “49f072c2-8e29-450d-8c20-883d097cdf52”,
“class”: “task”,
“description”: “Starting container”,
“created_at”: “2019-09-11T07:54:20.826998128+02:00”,
“updated_at”: “2019-09-11T07:54:20.826998128+02:00”,
“status”: “Failure”,
“status_code”: 400,
“resources”: {
“containers”: [
“/1.0/containers/container”
]
},
“metadata”: null,
“may_cancel”: false,
“err”: “Common start logic: Failed to start device ‘eth0’: Invalid value for device option hwaddr: Invalid value, must 6 bytes of lower case hex separated by colons”,
“location”: “lxd-3”
}
}
DBUG[09-11|07:54:20] Handling ip=@ user= method=GET url=/1.0/operations/49f072c2-8e29-450d-8c20-883d097cdf52

Config Container

host:~$ lxc config show --expanded CONTAINER
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 18.04 LTS amd64 (release) (20190627.1)
image.label: release
image.os: ubuntu
image.release: bionic
image.serial: “20190627.1”
image.version: “18.04”
limits.cpu: “3”
limits.memory: 8192MB
security.privileged: “true”
volatile.base_image: 6ae1c6e92017402f1aee655fa8d785ee9d2337a3369d76115cecad5e7a303e07
volatile.eth0.hwaddr: 00:55:56:00:AA:23
volatile.eth0.name: eth0
volatile.idmap.base: “0”
volatile.idmap.current: ‘[]’
volatile.idmap.next: ‘[]’
volatile.last_state.idmap: ‘[]’
volatile.last_state.power: STOPPED
devices:
eth0:
nictype: macvlan
parent: enp0s31f6
type: nic
root:
path: /
pool: local
size: 500GB
type: disk
ephemeral: false
profiles:

  • default
  • macvlan
    stateful: false
    description: “”

I have 1 node without online containers to troubleshoot (reboot etc.). I don’t want to stop the other running containers.

1 Like

LXD 3.17 introduced the requirement for all MAC addresses to be specified lowercase. It looks like your container has an automatically generated (volatile) MAC address in uppercase.

So if you do:

lxc config set CONTAINER volatile.eth0.hwaddr 00:55:56:00:aa:23

Alternatively if you don’t mind about changing MAC address then:

lxc config unset CONTAINER volatile.eth0.hwaddr

Then it will generate a new one on boot.

That should fix it.

Thanks for your quick reply.

Hmm, I’m not very happy with that. I will check all my containers…
And no, it’s not generated. I am using static MAC addresses in uppercase, as it should be.

Just ran into this with a container that was confverted using p2c a while back. This should be fixed.