[Lxc-users] Networking between host and container

Stéphane Graber stgraber at ubuntu.com
Fri Dec 28 10:47:23 UTC 2012


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/

-- 
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: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20121228/9b19610d/attachment.pgp>


More information about the lxc-users mailing list