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

Re: [libvirt] LXC support?

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?
> [1] http://libvirt.org/drvlxc.html

What is the output of 'virsh --connect lxc:/// capabilities'? Mine looks like:


      <cells num='1'>
        <cell id='0'>
          <cpus num='2'>
            <cpu id='0'/>
            <cpu id='1'/>

    <arch name='x86_64'>
      <domain type='lxc'>


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

- Cole

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