Quoting Ben Butler-Cole (b...@bridesmere.com):
> 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@ssh1.
> 
> This doesn't work. "ssh1." doesn't resolve to the container's address.
> 
> Any clues what I might be doing wrong?

Do you have 10.0.3.1 (or whatever ip address you have assigned to lxcbr0)
added as a nameserver, i.e. in /etc/resolv.conf?

> 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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to