[lxc-users] IP address?
Serge E. Hallyn
serge at hallyn.com
Sat Apr 20 19:38:45 UTC 2019
On Fri, Apr 19, 2019 at 08:42:16PM +0000, wisdomlight at protonmail.com wrote:
> # lxc-start -d -n myContainer
>
> and then
>
> # lxc-ls —fancy
>
> returns
>
> NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILIGED
>
> myContainer RUNNING 0 - -
> - false
>
> I was expecting an IP address under the IPV 4 heading.
>
> Why is there no IP address?
That depends on the container configuration (i.e.
/var/lib/lxc/myContainer/config), the host setup, and the actual
container. Something has to setup the ipv4 address. You can specify it
in the container config (see lxc.container.conf.5 manpage); the
container can have it hardcoded to set itself as it boots; or if the
host is running a dhcpserver for the containers, the container can call
dhcp to get it.
More information about the lxc-users
mailing list