Re: [CentOS-virt] CentOS-6.0 and LXC

2011-07-19 Thread Nenad Opsenica


Always Learning wrote:
 On Tue, 2011-07-19 at 08:22 +1000, Matt Paine wrote:

   
 As far as I am aware, KVM uses the cpu hardware to run completely
 different operating systems independently of the host.


 LXC is similar to Linux-VServer, or virtuozzo, where you are always
 running a base kernel, and can run multiple init's at the same time.

 ...
 

 Thank you for your explanation. It is most helpful. To summarise what I
 think is correct: One can run multiple LXC containers, each containing
 an identical version of the main host operating system but processes are
 separate from the others. KVM creates a type of 'container' allowing
 different host operating systems to run in that container.

 Can one run inside a LXC container a KVM ?

 Can one run inside a KVM some LXC containers ?

 Or is the simultaneous usage on the same machine of LXC and KVM mutually
 exclusive or incompatible ?

 Thank you again.
   
I have no experience with LXC, but I have been running Linux-Vserver 
inside KVM container, without any problem. I suppose that it is the same 
with LXC.

Running KVM inside LXC I haven't tried, but if it is possible I still 
think it is not such a good idea. Any disturbance in some of the LXCs 
will make problem to others (e.g. kernel driver crash will reflect on 
all LXCs and, therefore, all KVMs).

I think that running LXC/Linux-Vserver inside KVM machine is a great 
tool to light virtualize several small servers inside one large KVM.

Regards,

Nenad

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] CentOS-6.0 and LXC

2011-07-19 Thread Matt Paine
Hi Paul. See my un-educated comments inline :)


On 19 July 2011 08:59, Always Learning cen...@u6.u22.net wrote:


 On Tue, 2011-07-19 at 08:22 +1000, Matt Paine wrote:

  As far as I am aware, KVM uses the cpu hardware to run completely
  different operating systems independently of the host.
 
 
  LXC is similar to Linux-VServer, or virtuozzo, where you are always
  running a base kernel, and can run multiple init's at the same time.
 
  ...

 Thank you for your explanation. It is most helpful. To summarise what I
 think is correct: One can run multiple LXC containers, each containing
 an identical version of the main host operating system but processes are
 separate from the others. KVM creates a type of 'container' allowing
 different host operating systems to run in that container.


If can try to clarify my understanding, LXC is process isolation. basically
the kernel is shared between the containers. (not specifically the entire
host operating system, just the kernel).

KVM will need to be explained by someone else, the only understanding I have
with this is it relies on virtualisation in the processor to switch between
os's. With the benifit being you can run M$Windows if you want to.

There is no way to run windows with LXC.


Can one run inside a LXC container a KVM ?


If the guest container have the correct privileges, then I would assume so.
But I would suggest this would be a messy way to do things, and breaks the
whole container concept. The processes in the container are ment to be
'contained' yet to get the correct kernel priveleges to do complete KVM
switching would be to open up the entire container to the rest of the system
(if thats even at all possible, it may not be! The kernel may not provide
the correct privileges to do KVM virtualisation within a LXC guest)


Can one run inside a KVM some LXC containers ?


This one I would say definitely. Since you are running a completely new
kernel, I cant see a reason why you couldn't provide an LXC kernel to run
within a KVM guest. But theres a bit of guessing here as well :)



 Or is the simultaneous usage on the same machine of LXC and KVM mutually
 exclusive or incompatible ?

 Thank you again.



 --
 With best regards,

 Paul.
 England,
 EU.


 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] CentOS-6.0 and LXC

2011-07-19 Thread SZ Quadri
On Tue, Jul 19, 2011 at 4:29 AM, Always Learning cen...@u6.u22.net wrote:


 On Tue, 2011-07-19 at 08:22 +1000, Matt Paine wrote:

  As far as I am aware, KVM uses the cpu hardware to run completely
  different operating systems independently of the host.
 
 
  LXC is similar to Linux-VServer, or virtuozzo, where you are always
  running a base kernel, and can run multiple init's at the same time.
 
  ...

 Thank you for your explanation. It is most helpful. To summarise what I
 think is correct: One can run multiple LXC containers, each containing
 an identical version of the main host operating system but processes are
 separate from the others. KVM creates a type of 'container' allowing
 different host operating systems to run in that container.

 Can one run inside a LXC container a KVM ?

 Can one run inside a KVM some LXC containers ?

 Or is the simultaneous usage on the same machine of LXC and KVM mutually
 exclusive or incompatible ?


It may not be exactly like LXC but you can also have a look a OpenVZ.
I have been using it on many servers for years with no problems. It is quite
lightweight and easy to use.
I think you can run OpenVZ inside KVM as well.

- SZ Quadri
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] CentOS-6.0 and LXC

2011-07-18 Thread Karanbir Singh
On 07/11/2011 12:50 PM, Matt Paine wrote:
 Hope someone can point me in the right direction. I would like to get
 into LXC and evaluate its usefulness compared with Linux-VServer. I
 notice that LXC is in tech preview upstream, however I am at a dead end
 trying to figure out how to get started.

afaik, LXC was on target for 6.2

- KB
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] CentOS-6.0 and LXC

2011-07-18 Thread Always Learning

On Mon, 2011-07-18 at 12:32 +0100, Karanbir Singh wrote:


 afaik, LXC was on target for 6.2

Can someone please summarise the main differences between KVM (Kernel
Virtual Machine) and LXC (Linux Containers) which are similar to BSD
jails ?

Can one put KVMs into any quantity of LXCs ?

Do LXCs run only with the main operating system, whereas KVM can run
with a guest operating system ?

Puuzzled.


-- 
With best regards,

Paul.
England,
EU.


___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] CentOS-6.0 and LXC

2011-07-18 Thread Matt Paine
As far as I am aware, KVM uses the cpu hardware to run completely different
operating systems independently of the host.

LXC is similar to Linux-VServer, or virtuozzo, where you are always running
a base kernel, and can run multiple init's at the same time. Each init (and
any processes spawed from that init) are completely isolated, which gives
the appearance of a different operating system being run. Note that each
container uses the same host kernel, so you cant run software that requires
older or newer kernels, or kernels which require specific modules that are
not in the host kernel. But you get the benefit that you dont need to switch
out entire OS images and/or virtualize hardware, processes are simply
scheduled as they would be normally. The only overhead is the extra
memory/cpu that the extra processes take up.

I like using linux-vserver as I can access my guests filesystem from my host
instance (as its usually just a subdirectory of the main filesystem). I also
like it as I can control the networking interfaces from the host with ease,
and my firewall is controlled from the host, so I know what traffic is going
in/out etc and what ports are open for all ip's on the box, through my
firewall rules in the central location. I'm not sure how LXC works this way,
as I think they virtualize the networking as well, which is why I'm keen to
try it out :)

Take what I say with a grain of salt too :)

Matt.




On 19 July 2011 00:26, Always Learning cen...@u6.u22.net wrote:


 On Mon, 2011-07-18 at 12:32 +0100, Karanbir Singh wrote:


  afaik, LXC was on target for 6.2

 Can someone please summarise the main differences between KVM (Kernel
 Virtual Machine) and LXC (Linux Containers) which are similar to BSD
 jails ?

 Can one put KVMs into any quantity of LXCs ?

 Do LXCs run only with the main operating system, whereas KVM can run
 with a guest operating system ?

 Puuzzled.


 --
 With best regards,

 Paul.
 England,
 EU.


 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] CentOS-6.0 and LXC

2011-07-18 Thread Always Learning

On Tue, 2011-07-19 at 08:22 +1000, Matt Paine wrote:

 As far as I am aware, KVM uses the cpu hardware to run completely
 different operating systems independently of the host.
 
 
 LXC is similar to Linux-VServer, or virtuozzo, where you are always
 running a base kernel, and can run multiple init's at the same time.

 ...

Thank you for your explanation. It is most helpful. To summarise what I
think is correct: One can run multiple LXC containers, each containing
an identical version of the main host operating system but processes are
separate from the others. KVM creates a type of 'container' allowing
different host operating systems to run in that container.

Can one run inside a LXC container a KVM ?

Can one run inside a KVM some LXC containers ?

Or is the simultaneous usage on the same machine of LXC and KVM mutually
exclusive or incompatible ?

Thank you again.



-- 
With best regards,

Paul.
England,
EU.


___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


[CentOS-virt] CentOS-6.0 and LXC

2011-07-11 Thread Matt Paine
Hi Guys.

Hope someone can point me in the right direction. I would like to get into
LXC and evaluate its usefulness compared with Linux-VServer. I notice that
LXC is in tech preview upstream, however I am at a dead end trying to figure
out how to get started.

I cannot find any usertools in the rpm's that ship with CentOS 6. Is this
because  the tech preview requires me to get the tools outside the standard
repo's? Of course I am happy to do that, but at the same time I prefer to
use tools that are within the CentOS eco-system where possible.

Any help pointing me to documentation specifically with CentOS/RHEL/otherEL
(6) will be greatly appreciated. I have not been able to find anything
useful in my efforts so far.

Thank you.
Matt.
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt