[Lxc-users] start ubuntu in a lxc?

Fajar A. Nugraha list at fajar.net
Tue Mar 6 03:45:08 UTC 2012


2012/3/6 陈竞 <cj.magina at gmail.com>:
> I see that we can start a ubuntu in a lxc. So when ubuntu do block io
> operation, what does it really do, since it does not simulate hardware?

All "OS" running in lxc containers shares the same kernel with the
host. The kernel performs the necessary i/o operation.

>From the host perspective, the io operation is treated just like any
normal io operation from a normal running process.

> And what the real difference between kvm and lxc, since we can start a os in
> lxc?

I like to think of lxc as chroot with steroids. The host shares the
same kernel and part of the filesystem with the guest (or rather, the
host sees all guests' filesystem). It's different from normal chroot
in:
- guests can only see their own processes
- guests has it's own ip address, can be on different logical subnet
from the host
- guests has some additional limits (e.g. memory, cpu share) imposed on them

kvm is a full-blown virtualization setup, where each guest OS can have
its own kernel, or even running non-linux OS (e.g. windows).

-- 
Fajar




More information about the lxc-users mailing list