
On Mon, Sep 24, 2012 at 10:48:44AM +0900, Takayuki Usui wrote:
The patch adds generic ethernet type to LXC, that allows you to make an arbitrary virtual network interface and associate it to an LXC domain. That does not, however, provide a means to execute a script, that is still available only for QEMU.
1. Create a virtual ethernet device pair
# ip link add type veth (e.g. veth0 and veth1 by default)
2. Define a LXC domain and associate it to one end of the pair
[...] <interface type='ethernet'> <target dev='veth1'/> </interface>
3. Do whatever you like, for example, add another end of the pair to a bridge (e.g. br0)
# brctr addif br0 veth0 # ip link set dev veth0 up
4. Start a LXC domain. The interface shows up as eth0 in the domain.
Obviously the example you show here can already be accomplished using type=bridge. So I'm curious what usage scenario you need this addition for ? What type of config are you doing that is not possible using one of the non-ethernet device types ? Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|