[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 13:47:25 UTC 2012


\On Sun, Oct 28, 2012 at 04:50:07PM +0700, Fajar A. Nugraha wrote:

> Did your search brought you to
> http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6 ? :D

Did not, and that's a very nice recipe. 

My current question is if there's an available bridging scheme that will
work in my context. The host is an ESXi VMware VM (currently CentOS 6, but
could be Ubuntu 12.04 if helpful). The CentOS 6 guest on that host needs to
end up with a unique IP on the VMware LAN. VMware does not work unless it
can assign the host's IP by dhcp, and at least so far in my experiments will
not do that if I set the host to use bro0 rather than eth0.

Once the host is up, I can add additional LAN IPs to eth0 without problem.
What's not clear is which, if any, of the bridging schemes for the LXC guest
on the host can enable that guest to take its own IP on the LAN.

Why am I trying such a silly trick? Because I have some perfectly good KVM
VMs, but no tool that can convert them to VDOs to put on VMware - the
existing tools satisfy the common demand, which sanely is to get VMs off of
VMware and onto KVM, not the other way around. But my client is committed to
a cloud provider with an ancient, creaky VMware beneath a crippled user
interface.

So _if_ I can take the LXC guest creation recipe above - which is even
easier to follow that it looks at first glance - and then manage the right
bridging trick with it, this will be far more efficient than configuring
VMware VMs from scratch to duplicate the existing, highly-configured KVM
VMs. It could even enable combining some of the less stressed KVM VMs onto
single LXC hosts on VMware, to cut back a bit on the cloud fees.

But ... can it be done? Looking at this page,
http://wiki.1tux.org/wiki/Ubuntu/Bridge, it's not clear if it can be. In
KVM, I always just set up a real bridge on the host - the thing it seems I
can't do in this VMware setting. In all cases, the LXC guests need to end up
with a LAN IP on which they can be addressed from other systems, but not
necessarily the LXC host.

Thanks,
Whit





More information about the lxc-users mailing list