> > NB user namespaces are a fairly new piece of functionality that > is still somewhat rough around the edges. You usuaully want to > have the most recent kernel.org stable kernel available when > using this. >Yes, I confirm it is a little bit touchy for me. gabx@hortensia ➤➤ ~ % uname -a Linux hortensia 3.12.9-2-ARCH #1 SMP PREEMPT Fri Jan 31 10:22:54 CET 2014 x86_64 GNU/Linux I do think my kernel is not too old.> > They are broadly speaking functionally equivalent but using libvirt gives > you all the usual benefits libvirt has. Stable API, accessible from > multiple programming languages, stable configuration, integration with > other apps using libvirt. eg you can use virt-top to monitor things > or virt-manager as a GUI frontend, etc, etc >Ok, I understand and it is the reason why I decided to stay away from LXC. So, even if it is less user-friendly, I will keep libvirt, as in the past it gave me full satisfaction, the mailing-list tool included :-)
I am totally lost in this UID/GID mapping. Maybe all this stuff is just beyond my competence. For now, I am writing a basic mydomain.xml file following these 3 wiki: LXC container from libvirt.org[1] Linux containers guide from Rad Hat 7[2] getting start with lxc from P.Berrange [3] This is the basic .xml file: <domain type='lxc'> <name>dahlia</name> <memory>409600</memory> <os> <type arch='x86_64'>exec</type> <init>/bin/init</init> * systemd is default and PID1 is init on my Arch box <vcpu>4</vcpu> </os> <devices> <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> * it is the path on Arch <console type='pty'/> </devices> </domain> Unfortunately : gabx@hortensia ➤➤ /drawer/vm # virsh define dahlia.xml error: Failed to define domain from dahlia.xml error: internal error: unexpected domain type lxc, expecting one of these: qemu, kqemu, kvm, xen What is wrong ? [1]http://libvirt.org/drvlxc.html [2]https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html-single/Linux_Containers_Guide/index.html [3]https://www.berrange.com/posts/2011/09/27/getting-started-with-lxc-using-libvirt/
On Wed, Feb 12, 2014 at 03:21:18PM +0100, arnaud gaboury wrote:> I am totally lost in this UID/GID mapping. Maybe all this stuff is > just beyond my competence. > > For now, I am writing a basic mydomain.xml file following these 3 wiki: > LXC container from libvirt.org[1] > Linux containers guide from Rad Hat 7[2] > getting start with lxc from P.Berrange [3] > > This is the basic .xml file: > > <domain type='lxc'> > <name>dahlia</name> > <memory>409600</memory> > <os> > <type arch='x86_64'>exec</type>NB, you want 'exe' not 'exec'> <init>/bin/init</init> * systemd is > default and PID1 is init on my Arch box > <vcpu>4</vcpu> > </os> > <devices> > <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> * it is the > path on Arch > <console type='pty'/> > </devices> > </domain> > > Unfortunately : > > gabx@hortensia ➤➤ /drawer/vm # virsh define dahlia.xml > error: Failed to define domain from dahlia.xml > error: internal error: unexpected domain type lxc, expecting one of > these: qemu, kqemu, kvm, xen > > What is wrong ?You didn't specify any URI for the hypervisor so libvirt will have guessed on. From the error it sounds like it guessed QEMU instead of LXC. Either use virsh -c lxc:///, or set LIBVIRT_DEFAULT_URI=lxc:/// or edit your libvirt.conf to set a default http://libvirt.org/uri.html#URI_libvirt Regards, 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 :|