lxd icon indicating copy to clipboard operation
lxd copied to clipboard

lxd on a computer without wired network (eth0)

Open gunterkoenigsmann opened this issue 3 years ago • 5 comments

Required information

  • Distribution: Ubuntu
  • Distribution version: 20.04
  • The output of "lxc info": lxcinfo.txt

Issue description

My computer has no wired ethernet (eth0). Instead it uses a wifi (wlp2s0). If I run lxd init I get:

Error: Failed to update profile "default": Device validation failed for "eth0": Cannot use "nictype" property in conjunction with "network" property

...and my comtainers have no network connection, which is why I cannot build any snaps.

Steps to reproduce

  1. Take a laptop without wired ethernet interface
  2. lxd init

gunterkoenigsmann avatar Jun 21 '22 05:06 gunterkoenigsmann

Wifi or wired really doesn't matter, that eth0 in the default profile is the name of the network interface that goes inside of the containers.

What exactly did you pick during lxd init to get to that result?

stgraber avatar Jun 21 '22 05:06 stgraber

lxd init --auto

gunterkoenigsmann avatar Jun 21 '22 06:06 gunterkoenigsmann

Sounds like the system may already have been initialized prior to the lxd init --auto?

stgraber avatar Jun 21 '22 15:06 stgraber

The error is consistent with a pre-existing entry in lxc profile show default. lxd init --auto went to create the network but when adding it, it conflicted with something in there.

stgraber avatar Jun 21 '22 15:06 stgraber

(Our CI runs lxd init --auto on every pull request and commit on systems that do not have any physical networking, so we're pretty confident it works on a clean system.)

stgraber avatar Jun 21 '22 15:06 stgraber

@gunterkoenigsmann if you're able to reproduce the issue with a fresh install we would be happy to reopen this (or if you have additional info).

tomponline avatar Oct 24 '22 19:10 tomponline