[Lxc-users] Container name as DNS name
Ben Butler-Cole
ben at bridesmere.com
Fri Jul 6 16:35:11 UTC 2012
I've been looking into this further and I think I've misunderstood how this
should work.
For some reason I thought that with the default lxcbr0 config the
containers name would resolve for it as a DNS name. That doesn't seem to be
the case.
I've tried the ubuntu template and also sshd (on Ubuntu 12.04). Following
https://help.ubuntu.com/12.04/serverguide/lxc.html, I did the following:
sudo lxc-create -t sshd -n ssh1
ssh-keygen -f id
sudo mkdir /var/lib/lxc/ssh1/rootfs/root/.ssh
sudo cp id.pub /var/lib/lxc/ssh1/rootfs/root/.ssh/authorized_keys
sudo lxc-start -n ssh1 -d
ssh -i id root at ssh1.
This doesn't work. "ssh1." doesn't resolve to the container's address.
Any clues what I might be doing wrong?
I could actually live perfectly happily with the IP address. But I can't
see any way to recover the IP address for a container that you've just
created other than greping syslog for dnsmasq logs (or accessing it via the
console, but I'm using LXC programatically).
Thanks
-Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120706/18507269/attachment.html>
More information about the lxc-users
mailing list