ArchipelProject / Archipel

XMPP Based Orchestrator
http://archipelproject.org
GNU Affero General Public License v3.0
803 stars 127 forks source link

LXC support in archipel (Linux Containers) #592

Open spijker opened 12 years ago

spijker commented 12 years ago

Hello , have some small problems with LXC under archipel. The xml created from the gui is creating <type arch="x86_64 >exe type>, but then i getting XML error: init binary must be specified' , but when i change the xml file into <type>exe</type> the problem is gone, and lxc is working. Same error on Debian and Ubuntu , using archipel from tar.gz, build using -d

FatherJ commented 11 years ago

This has nothing to do with removing / specifying the arch=* type. The real problem is that there's no input option for the LXC init. Since this patch: http://www.redhat.com/archives/libvir-list/2011-May/msg00819.html specifying an init in the lxc definition is mandatory and Archipel should have an input field for if in order to work with LXC.

I don't know of any workaround right now, except for compiling libvirt yourself without the above patch. You better update this bug/request to something like: "please provide input for lxc 'init' option", so the dev's know what's needed.

spijker commented 11 years ago

you're right , found that patch also, but didn't try it yet. Changed the bug/request ;)

primalmotion commented 11 years ago

Can you paste the full Libvirt XML you want to have?

spijker commented 11 years ago

I found a few on different website's But let's take it from the main site itself : http://libvirt.org/drvlxc.htm `

vm1
    <memory>500000</memory>
exe /bin/bash 1 destroy restart destroy /usr/lib/libvirt/libvirt_lxc

`

Thx ;)

CyrilPeponnet commented 11 years ago

So I have done some research. On the first side :

example of file :

<domain type='lxc'>
  <name>vm1</name>
  <memory>32768</memory>
  <os>
    <type>exe</type>
    <init>/init</init>
  </os>
  <vcpu>1</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='/opt/vm-1-root'/>
      <target dir='/'/>
    </filesystem>
    <interface type='network'>
      <source network='default'/>
    </interface>
    <console type='pty' />
  </devices>
</domain>

We have to extend the TNLibvirtDomainOSType.J model to add exe type

We need a field for in the UI (default to /bin/sh) (on the advanced view)

Filesystem, the TN model seems fine we need an adapated interface for source target using the filesystem device type (actually we only deal with disk device in Virtual Media Tab).

By checking the capabilities we can adapt the UI to deal with filesystem or disk (don't know if disks are supported on lxc).

jinnatar commented 10 years ago

Friendly 1 year with no updates bump, any chance this feature request is getting implemented? :-)

ikus060 commented 8 years ago

Bump

This ticket is very old. I'm wondering if Archipel is supporting LXC/LXD ?

bmullan commented 8 years ago

I wish it supported LXD. You'd think it would be greatly simplified now with LXDs REST API, local/remote container management, and with the new LXD 2.3 release. .. an awesome new Container Networking capability that also includes VxLAN support for LXD containers..!

On Oct 8, 2016 8:40 AM, "Patrik Dufresne" notifications@github.com wrote:

Bump

This ticket is very old. I'm wondering if Archipel is supporting LXC/LXD ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ArchipelProject/Archipel/issues/592#issuecomment-252422560, or mute the thread https://github.com/notifications/unsubscribe-auth/ABmtp6L6udfmDcndGlbGR2mHmY5vauFcks5qx482gaJpZM4APR3u .