Re: running LXC hello world example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 22, 2014 at 10:42:15AM -0800, Jacob Everist wrote:
> Some more details on my system.
> 
> I am running CentOS 6.5.   To install libvirt and LXC, I performed the
> following command:
> 
> yum install libvirt libvirt-client python-virtinst
> 
> I have turned selinux to DISABLED.

When you say disabled, do you actually mean you booted with selinux=0
or do you just mean you set it to permissive.

In RHEL-6 there was a bug that could break LXC if you boot with selinux=0.

Running with selinux enabled, but in permissive mode should work just
fine though.


> On Wed, Jan 22, 2014 at 10:34 AM, Jacob Everist <jacob.everist@xxxxxxxxx>wrote:
> 
> > Hello,
> >
> > I am having difficulty getting any sort of LXC container running.  I am
> > trying to use the following tutorial to run the hello world example:
> >
> >
> > https://www.berrange.com/posts/2011/09/27/getting-started-with-lxc-using-libvirt/
> >
> >
> > Here are the results of my running the tutorial:
> >
> > [root@terraria ~]# virsh list
> >  Id    Name                           State
> > ----------------------------------------------------
> >
> > [root@terraria ~]# virsh uri
> > lxc:///
> >
> > [root@terraria ~]# cat helloworld.xml
> > <domain type='lxc'>
> >   <name>helloworld</name>
> >   <memory>102400</memory>
> >   <os>
> >     <type>exe</type>
> >     <init>/bin/sh</init>
> >   </os>
> >   <devices>
> >     <console type='pty'/>
> >   </devices>
> > </domain>
> > [root@terraria ~]# virsh define helloworld.xml
> > Domain helloworld defined from helloworld.xml
> >
> > [root@terraria ~]# virsh start helloworld
> > error: Failed to start domain helloworld
> > error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux
> > container=lxc-libvirt container_uuid=791640de-95a9-082c-7292-c55106bcdca9
> > LIBVIRT_LXC_UUID=791640de-95a9-082c-7292-c55106bcdca9
> > LIBVIRT_LXC_NAME=helloworld /bin/sh
> > error receiving signal from container: Input/output error
> >
> > ---
> >
> > As you can see, I am getting an error.  How do I go about diagnosing this
> > error?  This is a fresh install so the only thing I have been using this
> > machine for is for LXC/libvirt testing.

You can try looking at /var/log/libvirt/lxc/$GUEST.log


if that has insufficient info, then you can do

  service libvirtd stop
  edit /etc/libvirt/lxc.conf and set  log_with_libvirtd=1
  LIBVIRT_LOG_FILTERS=1:lxc LIBVIRT_LOG_OUTPUTS=1:stderr /usr/sbin/libvirt

and then start the guest - the guest log file should then have much more
info in it.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux