How to import a container to a host with different network interface names

I am trying to recover a container exported from on a different machine. My local configuration is different.

When importing with lxc import radicale.tar.gz -v (radicale being the backed-up container) I’ve got the following error:

Error: Failed importing backup: Failed creating instance record: Failed initialising instance: Invalid devices: Device validation failed for "eth0": Failed loading device "eth0": Failed to load network "lxcbr0" for project "default": Network not found

My local configuration does not include the eth0 network interface. My lxc bridge is called lxdbr0.
Is there anything I can do to import the container nevertheless? I do not care whether the container would have a working network interface or not.

You can open the tarball and manually edit the config inside backup/container/backup.yaml, then import it.

Please could you also log an issue at for adding support for --network and --device override options like we have for lxc launch. Thanks

1 Like