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

Daniel P. Berrange berrange at redhat.com
Wed Oct 7 14:52:49 UTC 2009


On Wed, Oct 07, 2009 at 09:18:18AM +0530, Rishikesh wrote:
> Rishikesh wrote:
> > On F12 i was playing with libvirt support for container.
> > I am seeing two issue over here:
> >    1> Not able to create a container when start cgconfig services.
> >    2> When i stop cgconfig, then able to create a container, but 
> > seeing few error messages to libvirtd daemon.
> >    3> After creation of container through libvirt, i am not able to 
> > touch any file or directory.
> >
> > Attached: vm1.xml , through which i created container. I referred 
> > following link:

> >
> > Detailed Bug Report:
> > When i create a container without starting "cgconfig" service, i am 
> > able to create but getting some error message in libvirtd daemon:
> >
> > [root at mx3950 ~]# libvirtd
> > 14:47:24.556: warning : qemudStartup:565 : Unable to create cgroup for 
> > driver: No such device or address
> > 14:47:24.647: warning : lxcStartup:1462 : Unable to create cgroup for 
> > driver: No such device or address


When libvirtd starts up, it checks /proc/mounts to discover where all
the cgroups controllers are living. It also checks if its own process
was placed inside the root vs a child, etc. 

If it doesn't find any controllers mounted at all, then it'll disable
its cgroup support & log a warning - those are the 2 messages you are
seeing here. This is harmless - it just means some features of libvirt
will be disabled, the rest should still work

> > But when i start cgconfig service, then i am not able to open console 
> > for my container. Below is the detailed steps which i executed.
> >

> > [root at mx3950 ~]# /etc/init.d/cgconfig start
> > Starting cgconfig service:                                 [  OK  ]

I'm assuming that 'cgconfig' mounts or unmounts cgroups controllers. The
libvirt daemon only checks where they are all mounted when it initially
starts up. So it won't be at all happy if you mount/unmount cgroups while
it is running. If you restarts libvirtd after this it would pick up the
changes

> > [root at mx3950 ~]# virsh -c lxc:/// start vm1
> > Domain vm1 started
> >
> > [root at mx3950 ~]# virsh -c lxc:/// console vm1
> > Connected to domain vm1
> > Escape character is ^]
> > 15:24:12.869: error : vshRunConsole:77 : unable to open tty 
> > /dev/pts/3: No such file or directory

I'm rather surprised if this error is relating to the use of 
cgroups - the private devpts instance support is not  anything
todo with cgroups really.

What cgroups controllers do you actually have active & mounted ?

And if you restart libvirtd after stop/start of cgconfig, does it all
work as expected ?

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list