[Lxc-users] How to start the network services so as to get the IP address using lxc-execute???
nishant mungse
nishantmungse at gmail.com
Tue Dec 13 09:12:55 UTC 2011
Hi,
*My basic need::*
I am writing a *simple socket programme *and as input to programme I want
to give the* IP address of containers*. Now* I have IP address in
sequential order*, but to make my socket programme running I need the
networking service of the containers to start.
*I am able to do this using lxc-start* as it call lxc-init where upstart
which handles the starting of service during booting, but* I don't want to
use this lxc-start, but want to start only networking service* so that my
socket programme works.
Can I start only networking service using lxc-execute or not????
Is there any other solution to this?????
Regards,
Nishant
On Mon, Dec 12, 2011 at 3:31 PM, Greg Kurz <gkurz at fr.ibm.com> wrote:
> On Mon, 2011-12-12 at 11:54 +0530, nishant mungse wrote:
> > Hi Geordy,
> >
>
> Hi Nishant,
>
> I removed Cc: to containers@ as your troubles are about using the lxc
> userspace tool: lxc-users@ is THE place for seeking help.
>
> > This script gives the IP address of running system, but what I want is
> > to get the IP address of the containers that are not started using
> > lxc-start, lxc-start will call /sbin/init to init all the system, but
> > I want to use lxc-execute that will no init the system.
> >
>
> I still don't understand what you intend to do... All I can say is that
> using lxc-execute to partially start a container (that's what you're
> doing when you want do lxc-execute /etc/init.d/networking) is a total
> nonsense. Sorry.
>
> >
> > Hey Greg you said that, it is possible to get the IP address without
> > starting the containers how can we do this????
> >
>
> Your containers don't get their IP addresses in a vacuum... Either the
> addresses are statically configured is some distro specific file, either
> they are assigned by an external service (DHCP most of the time).
> In the first case, you can probably find the address by parsing the
> appropriate file from your container's filesystem
> (/etc/sysconfig/network-scripts/ifcfg-eth0 for example on redhat). In
> the second case, it depends on the DHCP server setup... please see that
> with your sysadmin.
>
> > And one more question how to start the network services using
> > lxc-execute
> >
>
> As told before, nonsense.
>
> >
> > Please help me ASAP.
> >
> >
>
> That's what several people on the list are trying to do... If you really
> need help, stop asking about how to misuse lxc-execute and give some
> hints about your network setup... Do your containers use static
> addresses ? Do they rely on a DHCP server ? Are you sysadmin for the
> DHCP server ?
>
> Unless you provide more context, I'm afraid nobody will be able to help
> you...
>
> Cheers.
>
> --
> Gregory Kurz gkurz at fr.ibm.com
> Software Engineer @ IBM/Meiosys http://www.ibm.com
> Tel +33 (0)534 638 479 Fax +33 (0)561 400 420
>
> "Anarchy is about taking complete responsibility for yourself."
> Alan Moore.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20111213/0f6ba2b8/attachment.html>
More information about the lxc-users
mailing list