[Libcg-devel] [libvirt]: Not able to login to container when cgroup is enabled

Dhaval Giani dhaval at linux.vnet.ibm.com
Wed Oct 7 15:15:53 UTC 2009


On Wed, Oct 07, 2009 at 08:39:09PM +0530, Rishikesh wrote:
> Dhaval Giani wrote:
>> On Wed, Oct 07, 2009 at 06:57:48AM -0700, Dan Smith wrote:
>>   
>>> R> can you help me here ?
>>>
>>> Probably not, I'm not familiar with cgconfig nor the latest cgroup
>>> support in libvirt.
>>>
>>> R> 14:47:24.556: warning : qemudStartup:565 : Unable to create cgroup
>>> R> for driver: No such device or address
>>>
>>> My guess is that this means you don't have the cgroup filesystem
>>> mounted, or it's mounted in a way that prevents libvirt from doing its
>>> work.  IIRC, there are things you can do to the system that require a
>>> reboot to undo.  If cgconfig is setting up the cgroups in such a way,
>>> you might need to reboot between stopping cgconfig and trying libvirt
>>> by itself.
>>>
>>>     
>>
>> Or the cgroups are being setup in funny fashion. Rishi, what does your
>> config file look like?
>>   
>
> I am attaching the config file.

OK, thanks rishi!

So cpu and cpuacct subsystems are getting mounted at /cgroup and there
are two groups created at /cgroup/default and /cgroup/test/.

The perm section defines the user/group who own all the files apart from
tasks and the task section defines the owner for the task file.

Are there more subsystems that should be mounted? And is there a
specific mount point that should be used?

Thanks,

[leaving the conf file in for folks to see]

> group default {
> 	perm {
> 		admin {
> 			uid = root;
> 			git = root;
> 		}
> 		task {
> 			uid = root;
> 			gid = root;
> 		}
> 	}
> 	cpu {
> 		cpu.shares = 1024;
>                 cpu.rt_runtime_us = 920000;
> 	}
> }
> 
> group test {
> 	perm {
> 		admin {
> 			uid = test;
> 			gid = test;
> 		}
> 		task {
> 			uid = test;
> 			gid = test;
> 		}
> 	}
> 	cpu {
> 		cpu.shares = 4096;
>                 cpu.rt_runtime_us = 30000;
> 	}
> }
> 
> mount {
> 	cpu = /cgroup;
> 	cpuacct = /cgroup;
> }


-- 
regards,
Dhaval




More information about the libvir-list mailing list