On Dec 28, 2012, at 11:47 , Stéphane Graber <stgra...@ubuntu.com> wrote:
> On 12/28/2012 10:27 AM, Marko Anastasov wrote: >> Hello, >> >> What is the best way to broadcast container's hostname to host? I want to be >> able to ssh from host into the container using its hostname as handle, >> instead of an IP address. >> >> I'm using the default template in Ubuntu 12.04. I have made a container >> template that I want to reuse. My first attempt was to install avahi-daemon >> on host and container, replace hostname in container config, fstab, >> /etc/hosts, /etc/hostname and dhclient.conf with some unique id. This worked >> in VirtualBox, but for some reason not on a real machine. >> >> Thanks, >> Marko > > Not exactly an answer to your question, but should be an answer to your > problem anyway: > http://www.stgraber.org/2012/07/17/easily-ssh-to-your-containers-and-vms-on-ubuntu-12-04-lts/ Hi Stéphane, I should note that I'm working with a server installation of 12.04, and packages dnsmasq and resolvconf are actually not installed by default. I've added them but I'm not sure what's next. So I think I'm missing some configuration that you assume on your blog. Eg output of host $(echo %h | sed "s/\\.lxc//g") 10.0.3.1 is Using domain server: Name: 10.0.3.1 Address: 10.0.3.1#53 Aliases: Host %h not found: 3(NXDOMAIN) Thanks, Marko ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users