
[please start a new topic with a new thread, instead of using in-reply-to an unrelated thread] On 02/22/2013 07:42 PM, 张章 wrote:
hi,all I want to run LXC and KVM in a single node at the same time. Is it possible?
Yes, you can have both hypervisor drivers running on the same machine; you choose which hypervisor you connect to according to the URI that you pass to 'virsh -c' or virConnectOpen().
If so, can resource isolation work properly? that is, can LXC and KVM get their corresponding shares of resources(vcpu, memeory, etc..)? In that case, how does LXC vcpu map to cgroups cpu.shares?
Yes, both LXC and qemu hypervisors know how to limit guest resources using cgroups under the hood; in particular, see http://libvirt.org/formatdomain.html#elementsCPUTuning for the XML to use. <cputune> has a sub-element <shares> that maps nicely to the cgroups cpu.shares. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org