[Lxc-users] Converting existing CentOS 6.x to container within Ubuntu 12.04 - can that be simple?

Whit Blauvelt whit at transpect.com
Thu Nov 1 22:30:31 UTC 2012


On Fri, Nov 02, 2012 at 04:46:19AM +0700, Fajar A. Nugraha wrote:
> 
> I use this: lxc.tty = 1. which means, only tty1 is active :)
> 
> You could either:
> - delete /dev/tty[2-6], or
> - use lxc.tty = 6. Haven't test this though.
> 
> I prefer the first one. The tty's are used only when use
> "lxc-console", and by default it connects to tty1, so IMHO there's no
> point in having tty >= 2.

Went the route of deleting all of dev, then recreating the specific parts in
the document. At this point it lxc-starts, and due to my having cribbed this
line from a doc elsewhere for the config file 

lxc.network.ipv4 = 10.196.58.117

it comes up with that IP. Still needs work on the routing and netmask but I
can reconfigure that by hand for the moment.

What it does do is connect nicely to the host, on 10.196.58.116, and vice
versa. What it doesn't do, unlike the host, is connect to anywhere else,
despite being set up with identical routes. 

Now, on other VMs here I've tested if VMware will allow multiple IPs per
machine. It does, when they're both just assigned to the base machine, and
so would have the same MAC. On the host ip_forward = 1 so that's not it. I
wonder if the trick would be to have the guest have the _same_ MAC as the
host rather than an arbitrary one? So ...

Ah if I do that, then VMware manages to force both the IP belonging to the
host and the appropriate routing tables onto it. That's funny. But it can't
be recovered from. Changing the IP doesn't result in it being able to
connect even to the host. 

I'm thinking the VMware restriction - apparently that it come from a known
MAC - may be incompatible with using br0. So I guess I have to work out the
DNAT/SNAT formula, and assign the 2nd IP for the guest on the host level and
then forward it through.

I really do appreciate the advice and encouragement, Fajar.

Whit




More information about the lxc-users mailing list