Lxd, zfs and OpenNebula

Hello, I have an environment with several servers that are running around 200 LXD containers. LXD storage backend is ZFS (local disks are used on hosts). My question is : Can I incorporate OpenNebula somehow in my existing environment? My main requirement is to continue using ZFS as an LXD storage.

Hi there,

I’m not very aware of how the ZFS driver of LXD works, however, the storage handling in this LXD driver on OpenNebula is a bit hackish, and differs a lot from native LXD. You can read more about it here. Basically LXD is presented with a pre-populated container directory prior to starting it.

However, OpenNebula can manage pre-existing containers as wild VMs

1 Like

Thanks for the replay. I was on half of my way to give away from implementing OpenNebula… When you are saying that storage handling in current LXD driver for OpenNebula is bit hackish… Does this men that OpenNebula devs will improve LXD support in feature versions? At least I’m interested if OpenNebula will going to provide support for configurations that are tagged as recommended by LXD…

Hackish (from the LXD usage perspective) doesn’t mean it’s wrong. It’s the way it is integrated, LXD has an odd way of managing images that isn’t very compatible with the datastore concept of a cloud platform, so, workarounds were made in order to achieve a compatible behavior.

1 Like

Hmmm correct me if I’m wrong but… those “workarounds” are to use files for LXD VM images, right ? Which is not giving optimal performance from LXD perspective…

Yes, simply put, LXD comes with its own datastore system, and OpenNebula already provides that. With LXC you are able to tell the hypervisor which file (block device) contains the root filesystem, LXD doesn’t provide that option, you can point extra devices via the UNIX block disk option but for the rootfs, the options are limited.

Which is not giving optimal performance from LXD perspective…

not really, the optimizations LXD does are related to cloning, image transfer, container creation, etc. That part of LXD is not necessary for OpenNebula, it is rather troublesome. However, if you have existing containers in your setup you can manage them almost like a native OpenNebula VM/container, you will be only limited to storage related operations since the rootfs isn’t available in any opennebula datastore.

1 Like

Thanks… That answered my question. Even though i can’t agree that rootfs in file gaves same performance… And it is not arguable that it does not gaves same benefits. I will definitely wait for bettrer integration between LXD and OpenNebula before i start using that combination in prod…