diff --git a/spread/lxd.go b/spread/lxd.go index 2cbf9974..461e0f0d 100644 --- a/spread/lxd.go +++ b/spread/lxd.go @@ -443,9 +443,14 @@ func (p *lxdProvider) address(name string) (string, error) { if err != nil { return "", err } - for _, addr := range sjson.State.Network["eth0"].Addresses { - if addr.Family == "inet" && addr.Address != "" { - return addr.Address, nil + for ifacename, ifaceconf := range sjson.State.Network { + if ifacename == "lo" { + continue + } + for _, addr := range ifaceconf.Addresses { + if addr.Family == "inet" && addr.Address != "" { + return addr.Address, nil + } } } return "", &lxdNoAddrError{name}