[Lxc-users] How to start the network services so as to get the IP address using lxc-execute???
Greg Kurz
gkurz at fr.ibm.com
Mon Dec 12 10:01:29 UTC 2011
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.
More information about the lxc-users
mailing list