[lxc-users] No IP given after migrating LXC container to LXD
Stéphane Graber
stgraber at ubuntu.com
Thu Feb 4 13:11:05 UTC 2016
On Thu, Feb 04, 2016 at 07:59:54AM -0500, Luis Michael Ibarra wrote:
> Hi all,
>
> Sorry, sent it again, didn't know what happened with the formatting.
>
>
> Distro: Ubuntu 14.04.3
> Kernel: 3.19.0-49-generic
> LXD: 2.0.0.beta1
> LXC: 2.0.0.beta1
>
> I migrated an lxc privileged container to LXD. So I did the following:
>
> 1. Created a container: *lxc init [local_image] test*
> 2. Deleted rootfs: *rm -rf /var/lib/lxd/containers/test/rootfs*
> 3. Copied privileged rootfs: *tar --numeric-owner lxc-rootfs.tgz -C
> /var/lib/lxd/containers/test/*
> 4. Then I set up: *lxc config set test security.privileged true*
>
> When I started the container I got not networking. Other containers which
> were created normally using lxc launch or lxc init without moving/removing
> their rootfs have no problems getting networking configuration.
Might be worth checking that the owners of
/var/lib/lxd/containers/test/rootfs are correct. LXD does th remapping
on startup, so with the commands you did above, it'll attempt to remap
everything on first startup which may have messed with the uid/gid of
all your files.
Instead, you should do "lxc init [local image] test* -c security.privileged=true"
so setting the privileged flag on creation so that LXD doesn't attempt
the shift on first startup.
>
> Log information after *lxc start test* : http://paste.ubuntu.com/14877042/
> test container configuration file lxc.conf:
> http://paste.ubuntu.com/14877066/
>
>
> PS: Why are you using unix time in logs? It's kind of difficult to debug
> containers, or probably I'm using the wrong tools.
Those aren't unix timestamps. Unix timestamps are seconds since
1970-01-01, our timestamps are just a long string of YYYYMMDDhhmmss. Not
saying it couldn't be made more readable though :)
>
> Regards,
>
>
>
>
> 2016-02-04 7:53 GMT-05:00 Luis Michael Ibarra <michael.ibarra at gmail.com>:
>
> > Hi all,
> >
> > Distro: Ubuntu 14.04.3
> > Kernel: 3.19.0-49-generic
> > LXD: 2.0.0.beta1
> > LXC: 2.0.0.beta1
> >
> > I migrated an lxc privileged container to LXD. So I did the following:
> >
> > 1. Created a container: *lxc init [local_image] test*
> > 2. Deleted rootfs: *rm -rf /var/lib/lxd/containers/test/rootfs*
> > 3. Copied privileged rootfs: *tar --numeric-owner lxc-rootfs.tgz -C
> > /var/lib/lxd/containers/test/*
> > 4. Then I set up: *lxc config set test security.privileged true*
> >
> > When I started the container I got not networking. Other containers which
> > were created normally using lxc launch or lxc init without moving/removing
> > their rootfs have no problems getting networking configuration.
> >
> > Log information after *lxc start test* : http://paste.ubuntu.com/14877042/
> > test container configuration file lxc.conf:
> > http://paste.ubuntu.com/14877066/
> >
> >
> > PS: Why are you using unix time in logs? It's kind of difficult to debug
> > containers, or probably I'm using the wrong tools.
> >
> > Regards,
> >
> >
> >
> > --
> > Luis Michael Ibarra
> >
>
>
>
> --
> Luis Michael Ibarra
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160204/8deee164/attachment.sig>
More information about the lxc-users
mailing list