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

Rishikesh risrajak at linux.vnet.ibm.com
Wed Oct 14 05:14:49 UTC 2009


Dhaval Giani wrote:
> On Wed, Oct 14, 2009 at 06:07:26AM +0900, Ryota Ozaki wrote:
>   
>> Hi Rishikesh,
>>
>> On Tue, Oct 13, 2009 at 3:09 PM, Rishikesh <risrajak at linux.vnet.ibm.com> wrote:
>>     
>>> Rishikesh wrote:
>>>       
>>> Cgroup config file & controllers mount shows like this :
>>> [root at mhs21a ~]# cat /proc/mounts | grep cgroup
>>> cgroup /cgroups/cpu cgroup rw,relatime,cpu 0 0
>>> cgroup /cgroups/cpuacct cgroup rw,relatime,cpuacct 0 0
>>> cgroup /cgroups/memory cgroup rw,relatime,memory 0 0
>>>       
>> AFAIW, libvirt requires "device" subsystem of cgroups as well.
>> Without it, an assistant subprocess of libvirtd will die soon.
>>
>>     
>
> So rishi, could add a devices line as well to the cgconfig configuratoin
> file, and  test it out?
>
>   

Cool !!! I am able to run container, once mounted "device" susbsystem too.
Thanks Ryota.

[root at mhs21a ~]# cat /proc/mounts | grep cgroup
cgroup /cgroups/cpu cgroup rw,relatime,cpu 0 0
cgroup /cgroups/cpuacct cgroup rw,relatime,cpuacct 0 0
cgroup /cgroups/memory cgroup rw,relatime,memory 0 0
cgroup /cgroups/devices cgroup rw,relatime,devices 0 0
[root at mhs21a ~]# /etc/init.d/cgconfig stop
Stopping cgconfig service:                                 [  OK  ]
[root at mhs21a ~]# /etc/init.d/cgconfig start
Starting cgconfig service:                                 [  OK  ]
[root at mhs21a ~]# virsh -c lxc:///
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # list --all
 Id Name                 State
----------------------------------
  - vm1                  shut off

virsh # start vm1
Domain vm1 started

virsh # list --all
 Id Name                 State
----------------------------------
1525 vm1                  running

virsh # console vm1
Connected to domain vm1
Escape character is ^]
sh-4.0# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 10:27 pts/3    00:00:00 /bin/sh
root         4     1  0 10:27 pts/3    00:00:00 ps -ef
sh-4.0#


So, Are we fixing the flow of libvirt & cgroup start mechanism ? Because 
user need not have to stop "libvirtd" , if he wants to use cgroup ?

Please suggest.

-Rishi




More information about the libvir-list mailing list