]> xenbits.xensource.com Git - libvirt.git/commit
lxc: do not require 'ifconfig' or 'ipconfig' in container
authorScott Moser <smoser@ubuntu.com>
Tue, 23 Aug 2011 20:36:00 +0000 (16:36 -0400)
committerEric Blake <eblake@redhat.com>
Fri, 2 Sep 2011 02:11:50 +0000 (20:11 -0600)
commitf0fe28cb8ddeb3336b4d5f043f6beb3785e27284
tree520f0563761ce438b71bc21281169350e76bda87
parentc1665ba872dca310430f218263b1e4675b79838a
lxc: do not require 'ifconfig' or 'ipconfig' in container

Currently, the lxc implementation invokes 'ip' and 'ifconfig' commands
inside a container using 'virRun'.  That has the side effect of requiring
those commands to be present and to function in a manner consistent with
the usage.  Some small roots (such as ttylinux) may not have 'ip' or
'ifconfig'.

This patch replaces the use of these commands with usage of
netdevice.  The result is that lxc containers do not have to implement
those commands, and lxc in libvirt is only dependent on the netdevice
interface.

I've tested this patch locally against the ubuntu libvirt version enough
to verify its generally sane.  I attempted to build upstream today, but
failed with:
  /usr/bin/ld:
    ../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_domain.o):
   undefined reference to symbol 'xmlXPathRegisterNs@@LIBXML2_2.4.30

Thats probably a local issue only, but I wanted to get this patch up and
see what others thought of it.  This is ubuntu bug
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/828211 .
src/lxc/veth.c