Thanks for the responses. The container IP (CentOS 7) is set via /etc/sysconfig/network-interfaces/ifcfg-eth0. I actually didn't use the copy command, and maybe that is what I should do in this case. We do a snapshot and then build a new container from the snapshot. The only time we do this is when the container is nearly the same as another one. (same processes for a different entity). In most cases, we build a new container from previously set templates. I will try the copy command as you suggest in this case.
Thanks, Steven G. Spencer On Fri, Dec 7, 2018 at 10:31 PM Serge E. Hallyn <se...@hallyn.com> wrote: > On Fri, Dec 07, 2018 at 09:34:14AM -0600, Steven Spencer wrote: > > All, > > > > My Google search turned up empty, so I'm turning to the list to see if > this > > is possible: > > > > * In LXD I make a copy of a container, but want to create a new container > > from it > > * The container has a static assigned IP address, so if I bring up the > new > > How is the static ip address assigned? Using raw.lxc, using dhcp config > on the host, using /etc/network/interfaces or the like in the container's > rootfs? > > How are you currently copying it? Are you using lxc copy --stateless? > Can you just pass '-c <config>' to the lxc copy command to change the > ipv4 configuration? > > > container with the other one running, I'm going to end up with an IP > > conflict > > * What I'd like to be able to do is to change the IP of the snapshot > before > > creating a container out of it. > > > > Is that possible, or am I missing another method. I've already done this > > step before, which works, but isn't the best if you want to keep systems > up. > > > > * Stop the original container > > * create the new container with the snapshot > > * modify the IP of the new container > > * start the original container > > > > If it isn't possible, I'll continue on as I've been doing. > > > > Thanks, > > Steven G. Spencer > > > _______________________________________________ > > lxc-users mailing list > > lxc-users@lists.linuxcontainers.org > > http://lists.linuxcontainers.org/listinfo/lxc-users > > _______________________________________________ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users >
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users