
I've been wanting to give a try to libvirt to handle containers from LXC as well, but seems like if I follow the default configuration example, I get this: virsh # create /etc/libvirt/lxc/axant.xml errore: Impossibile creare il dominio da /etc/libvirt/lxc/axant.xml errore: unknown OS type exe [sorry for the Italian message, but it doesn't really matter] The configuration is this: <domain type='lxc'> <name>axant</name> <memory>14680064</memory> <os> <type>exe</type> <init>/init</init> </os> <vcpu>8</vcpu> <clock offset="utc" /> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount'> <source dir='/media/chroots/axant'/> <target dir='/'/> </filesystem> <interface type='bridge'> <mac address="8e:8b:e5:aa:28:b6" /> <source bridge="br0" /> </interface> <console type='pty' /> </devices> </domain> am I doing something wrong or the doc at [1] is outdated somehow? [1] http://libvirt.org/drvlxc.html -- Diego Elio Pettenò — “Flameeyes” http://blog.flameeyes.eu/ If you found a .asc file in this mail and know not what it is, it's a GnuPG digital signature: http://www.gnupg.org/

On 12/23/2009 01:12 PM, Diego Elio “Flameeyes” Pettenò wrote:
I've been wanting to give a try to libvirt to handle containers from LXC as well, but seems like if I follow the default configuration example, I get this:
virsh # create /etc/libvirt/lxc/axant.xml errore: Impossibile creare il dominio da /etc/libvirt/lxc/axant.xml errore: unknown OS type exe
[sorry for the Italian message, but it doesn't really matter]
The configuration is this:
<domain type='lxc'> <name>axant</name> <memory>14680064</memory> <os> <type>exe</type> <init>/init</init> </os> <vcpu>8</vcpu> <clock offset="utc" /> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount'> <source dir='/media/chroots/axant'/> <target dir='/'/> </filesystem>
<interface type='bridge'> <mac address="8e:8b:e5:aa:28:b6" /> <source bridge="br0" /> </interface> <console type='pty' /> </devices> </domain>
am I doing something wrong or the doc at [1] is outdated somehow?
What is the output of 'virsh --connect lxc:/// capabilities'? Mine looks like: <capabilities> <host> <cpu> <arch>x86_64</arch> </cpu> <topology> <cells num='1'> <cell id='0'> <cpus num='2'> <cpu id='0'/> <cpu id='1'/> </cpus> </cell> </cells> </topology> </host> <guest> <os_type>exe</os_type> <arch name='x86_64'> <wordsize>32</wordsize> <emulator>/usr/libexec/libvirt_lxc</emulator> <domain type='lxc'> </domain> </arch> </guest> </capabilities> And I can define your posted config without error. If you don't have a guest block, defining any guest will fail, so the lxc capability detection probably needs to be taught how to work with your system. You can checkout out src/lxc/lxc_conf.c:lxcCapsInit - Cole

Il giorno mer, 23/12/2009 alle 14.28 -0500, Cole Robinson ha scritto:
What is the output of 'virsh --connect lxc:/// capabilities'? Mine looks like:
flame@yamato ~ % virsh --connect lxc:/// capabilities <capabilities> <host> <cpu> <arch>x86_64</arch> </cpu> </host> <guest> <os_type>exe</os_type> <arch name='x86_64'> <wordsize>32</wordsize> <emulator>/usr/libexec/libvirt_lxc</emulator> <domain type='lxc'> </domain> </arch> </guest> </capabilities> -- Diego Elio Pettenò — “Flameeyes” http://blog.flameeyes.eu/ If you found a .asc file in this mail and know not what it is, it's a GnuPG digital signature: http://www.gnupg.org/

On 12/23/2009 02:34 PM, Diego Elio “Flameeyes” Pettenò wrote:
Il giorno mer, 23/12/2009 alle 14.28 -0500, Cole Robinson ha scritto:
What is the output of 'virsh --connect lxc:/// capabilities'? Mine looks like:
flame@yamato ~ % virsh --connect lxc:/// capabilities <capabilities>
<host> <cpu> <arch>x86_64</arch> </cpu> </host>
<guest> <os_type>exe</os_type> <arch name='x86_64'> <wordsize>32</wordsize> <emulator>/usr/libexec/libvirt_lxc</emulator> <domain type='lxc'> </domain> </arch> </guest>
</capabilities>
Well, looks similar. Were you definitely passing --connect lxc:/// to virsh when you attempted to define the domain XML? It no URI was specified it may have defaulted to qemu (or something else depending on what is installed on your system). - Cole
participants (2)
-
Cole Robinson
-
Diego Elio “Flameeyes” Pettenò