[libvirt] [PATCH 05/16] LXC from native: migrate veth network configuration
Cedric Bosdonnat
cbosdonnat at suse.com
Fri Jan 24 14:19:31 UTC 2014
Hi Dan,
On Fri, 2014-01-24 at 13:39 +0000, Daniel P. Berrange wrote:
> On Tue, Jan 14, 2014 at 02:49:54PM +0100, Cédric Bosdonnat wrote:
> > Some of the LXC configuration properties aren't migrated since they
> > would only cause problems in libvirt-lxc:
> > lxc.network.ipv[46]: LXC driver doesn't setup IP address of guests
>
> That doesn't make sense in a machine virt world, but has been
> requested a few times in the context of LXC and before that with
> OpenVZ. I guess we need a bug filed to request that we support
> this. Currently I have to workaround it with libvirt-sandbox's
> LXC support too
>
> > lxc.network.name
>
> What is this config param for ? Is that the name of the guest
> visible NIC ? Currently we hardcode it ethNNN, assigning the
> NNN value incrementally. Guess that'd be another RFE bug.
Then I'll file those bugs.
> > ---
> > src/lxc/lxc_native.c | 98 ++++++++++++++++++++++++++--
> > tests/lxcconf2xmldata/lxcconf2xml-simple.xml | 5 ++
> > 2 files changed, 96 insertions(+), 7 deletions(-)
> >
> > diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
> > index 6b62a5b..a9ef453 100644
> > --- a/src/lxc/lxc_native.c
> > +++ b/src/lxc/lxc_native.c
> > @@ -517,35 +517,119 @@ error:
> > return -1;
> > }
> >
> > +static virDomainNetDefPtr
> > +lxcCreateNetDef(const char *type,
> > + const char *link,
> > + const char *mac,
> > + const char *flag)
> > +{
> > + virDomainNetDefPtr net = NULL;
> > +
> > + if (VIR_ALLOC(net) < 0)
> > + goto error;
> > +
> > + if (flag) {
> > + if (STREQ(flag, "up"))
> > + net->linkstate = VIR_DOMAIN_NET_INTERFACE_LINK_STATE_UP;
> > + else
> > + net->linkstate = VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DOWN;
> > + }
>
> Hmm, the LXC driver doesn't honour the 'linkstate' config
> parameter currently, so we need a bug about that filed,
> or feel free to do a patch for that.
I'ld prefer a patch, but doesn't that make sense at all if LXC driver
doesn't assign IP addresses?
--
Cedric
More information about the libvir-list
mailing list