3 ms·
I've never heard of LXC before. What does this technology let me do that I can't do with stuff like virtualbox? Is it the same, but lighter weight?
by Splines 14y ago
I've never heard of LXC before. What does this technology let me do that I can't do with stuff like virtualbox? Is it the same, but lighter weight?
- inportb 14y agoLXC is OS-level virtualization (similar to openvz and plain old chroot), which has a much lower overhead compared to full virtualization (i.e. virtualbox, kvm, xen hvm) but requires that the guest share the host's kernel. You get easier setup (untar the filesystem and tweak a few config settings) with stuff like LXC, but you obviously cannot run Windows/*BSD/whatever. > What does this technology let me do that I can't do with stuff like virtualbox? Fit more containers on your host :) Share (disk and memory) resources among your containers Make the same partition/directory/files available to a few containers at the same time without using ssh/nfs/smb/etc ... and so on.
- easp 14y agoDoes LXC have a way to control allocations of the RAM based block cache on a container by container basis, or can an very active container end up monopolizing it?
- wmf 14y agoVMs each have their own kernel, but containers share the host kernel. This tends to be more efficient and doesn't require you to statically allocate vCPUs and vRAM upfront when you create a container. LXC also has an under-appreciated mode where you can run some processes (but not a full OS) in a container.
- dkulchenko 14y agoLXC also has an under-appreciated mode where you can run some processes (but not a full OS) in a container. Please elaborate, I'd like to try this out. I've been playing around with LXC for years, but assumed /sbin/init always had to be the root process.
- wmf 14y agohttp://lxc.sourceforge.net/man/lxc-execute.html http://lxc.sourceforge.net/man/lxc-execute.html
- dylanvee 14y agoUnfortunately I've been running into a bug with lxc-execute (https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/986956 https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/986956) that prevents it from "just working" with interactive programs such as bash or python.
- vidarh 14y ago/sbin/init never needs to be the root process in a Linux system. You will end up in a messy situation if your init replacement allow you to spawn processes without wait()'ing for children now and again (e.g. some daemons will "double fork" and wait for the immediate child to die, and then expect init to take care of the real worker later), but that's pretty much it.
- deleted 14y ago[deleted]