Re: [libvirt] RFC: configuring host interfaces with libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Lutterkort wrote:
> For certain applications, we want libvirt to be able to configure host
> network interfaces in a variety of ways; currently, we are most
> interested in teaching libvirt how to set up ordinary ethernet
> interfaces, bridges, bonding and vlan's.
>   

I agree that carving up host physical resources, including networking,
is appropriate in libvirt.  Others have such support in their
virutalization APIs an the DMTF is currently working on models in SVPC.

I had requests for this functionality in libvirt several months back but
no cycles to seriously investigate.

[...]

> 3. Implementation
> =================
>
> Configuring network interfaces is highly OS and OS-variant/distro
> dependant. There are at least two different ways how libvirt can go about
> modifying the host to create interfaces:
>
>   1. Modify the system's network setup scripts (ifcfg-XXX on RH)
>
>   2. Directly use the system's network utilities like ifconfig
>
>   3. Rely on NetworkManager (not an option right now, as NM doesn't know
>     about bridges and the like)
>
> Option (1) saves us from replicating every bit of network setup
> functionality that those scripts already have - besides configuring the
> interface, we also might have to setup routes, run dhclient etc.
>   

This needs to be supported to play well with all of the existing
scripts.  I think Daniel P already pointed this out in another response.

> Option (2) would require far fewer backend implementations than (1) - we
> should be able to get away with one implementation for Linux, rather than
> one for Fedora/RHEL, one for Debian, one for SuSe, three for gentoo
> etc.
>   

Xen's network-bridge script uses this approach and it's disastrous IMO. 
Try rcnetwork restart on a network-bridge configured host :-).  In
SLE11, we dropped this script and manage host network resources via
YaST.  But, users want a nice remote interface that will work across
heterogeneous hosts ...

Your Option 3 needs to be supported as well and is one reason I have not
tackled this subject.  I don't know anything about NetworkManager and
have not had time to dig in.  That's about to change with SLE11 reaching
late RC phase :-).

> If we want 'autostart' for an interface to mean 'bring up the interface
> as soon as the system boots', we are pretty much forced to go with
> option (1).
>   

Right.  As in STARTMODE='onboot'

> All in all, option (1) seems more attractive, since it should save us from
> dealing with a lot of low-level details of network setup, and the distro
> scripts should be much better integrated with the rest of the system than
> what we come up with for libvirt.
>   

Although I'm no expert in SuSE sysconfig scripts, I think this approach
works best for SuSE distros.  I'll have to alert a sysconfig maintainer
of this thread.

Thanks for raising this topic :-).
Jim

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]