On 09/26/2014 11:05 AM, WANG Cheng D wrote:

Dear all,

I want to run a TCP/IP application automatically after I start the container using "virsh -c lxc:/// start mycontainer". Does anybody know how to configure the NIC automatically with an assigned IP address? I couldn't find useful information from domain XML format spec and it only talks how to set the mac address (http://libvirt.org/formatdomain.html) .

Your response will be highly appreciated.

Cheng


Take a look at: http://sandbox.libvirt.org/networking/

Note: Specifying dhcp does not currently work.  I have created a patch to fix that.  See:
https://bugzilla.redhat.com/show_bug.cgi?id=1133686

Gene