Florian Klink
2013-Dec-11 18:56 UTC
[libvirt-users] internal error: unexcepted domain type lxc, excepted one of these: qemu, kqemu, kvm, xen
Hi, I'm not able to create lxc domains anymore with libvirt 1.2.0-1. The current arch linux package is affected by this bug: https://bugs.archlinux.org/task/38007). vm.xml: <domain type="lxc"> <name>test</name> <memory unit="GiB">2</memory> <os> <type>exe</type> <init>/sbin/init</init> </os> <devices> <filesystem type="mount"> <source dir="/var/lib/libvirt/filesysystems/test"/> <target dir="/"/> </filesystem> <interface type="network"> <source network="default"/> </interface> <console type="pty"/> </devices> </domain> # virsh create vm.xml error: Failed to create domain from vm.xml error: internal error: unexcepted domain type lxc, excepted one of these: qemu, kqemu, kvm, xen However, ./configure reports that LXC support is compiled in: configure: Drivers configure: configure: Xen: no configure: QEMU: yes configure: UML: yes configure: OpenVZ: yes configure: VMware: yes configure: VBox: yes configure: XenAPI: no configure: xenlight: no configure: LXC: yes configure: PHYP: yes configure: ESX: yes configure: Hyper-V: no configure: Parallels: no configure: Test: yes configure: Remote: yes configure: Network: yes configure: Libvirtd: yes configure: Interface: yes configure: macvtap: yes configure: virtport: yes configure: configure: Storage Drivers configure: configure: Dir: yes configure: FS: yes configure: NetFS: yes configure: LVM: yes configure: iSCSI: no configure: SCSI: yes configure: mpath: yes configure: Disk: yes configure: RBD: no configure: Sheepdog: no configure: Gluster: no Do you have any idea why it does not work anymore? I don't see any new changes in src/conf/domain_conf.c where the error is thrown (line 10960) on current git HEAD... Florian
Eric Blake
2013-Dec-11 19:56 UTC
Re: [libvirt-users] internal error: unexcepted domain type lxc, excepted one of these: qemu, kqemu, kvm, xen
On 12/11/2013 11:56 AM, Florian Klink wrote:> Hi, > > I'm not able to create lxc domains anymore with libvirt 1.2.0-1. >> > > # virsh create vm.xmlWhat does 'virsh uri' output? My guess is that your older version of libvirt was built with JUST lxc support, and that your new version has BOTH lxc and qemu support. By not specifying an explicit connection, you are probably defaulting to qemu, which explains the failure. If I'm right, then # virsh -c lxc:/// create vm.xml will resolve your situation (you can also set environment variables so that you don't have to always remember the -c option).> > However, ./configure reports that LXC support is compiled in: > > configure: Drivers > configure: > configure: Xen: no > configure: QEMU: yesYes, but it also reports that qemu is compiled in, and we don't have any hard-and-fast rules about which URI is tried first if you don't specify an explicit URI with the -c option. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Florian Klink
2013-Dec-12 02:20 UTC
Re: [libvirt-users] internal error: unexcepted domain type lxc, excepted one of these: qemu, kqemu, kvm, xen
Am 11.12.2013 20:56, schrieb Eric Blake:> On 12/11/2013 11:56 AM, Florian Klink wrote: >> Hi, >> >> I'm not able to create lxc domains anymore with libvirt 1.2.0-1. >> > >> >> >> # virsh create vm.xml > > What does 'virsh uri' output? My guess is that your older version of > libvirt was built with JUST lxc support, and that your new version has > BOTH lxc and qemu support. By not specifying an explicit connection, > you are probably defaulting to qemu, which explains the failure. If I'm > right, then > > # virsh -c lxc:/// create vm.xml > > will resolve your situation (you can also set environment variables so > that you don't have to always remember the -c option).You were right. Setting the connection to lxc:/// fixed the problem. Thanks :-) Florian