Jump to content

LXD - container tech with more traditional VM like operation


binhex

Recommended Posts

I recently had LXD brought to my attention, ive not played with it yet but it does sound very interesting!, im especially interested in the fact that it does not require any modification of the app to run (unlike docker):-

 

http://www.ubuntu.com/cloud/lxd

 

The speed and density of containers, the familiarity of virtual machines — Canonical’s LXD is the next?generation hypervisor for Linux at scale. LXD is designed to “lift and shift” Linux VMs to containers without modifying the app or operations. Nearly all applications can be installed in LXD containers, gaining performance and density. There is no need to touch the application to make it run in an LXD container because LXD’s machine containers operate just like virtual machines.

 

Link to comment

Yeah, there's a few of these types of containerisation things springing up and I suspect it's the way installs will go.  But you don't have enough free time to be messing around with this!  ;)  ;D

 

;D luckily my job entails looking at new technology, so i can get away with it.

Link to comment

Yeah, there's a few of these types of containerisation things springing up and I suspect it's the way installs will go.  But you don't have enough free time to be messing around with this!  ;)  ;D

 

;D luckily my job entails looking at new technology, so i can get away with it.

 

Pah! Excuses excuses....  ;D

Link to comment

Yeah, there's a few of these types of containerisation things springing up and I suspect it's the way installs will go.  But you don't have enough free time to be messing around with this!  ;)  ;D

 

;D luckily my job entails looking at new technology, so i can get away with it.

 

Pah! Excuses excuses....  ;D

 

:P

Link to comment

I recently had LXD brought to my attention, ive not played with it yet but it does sound very interesting!, im especially interested in the fact that it does not require any modification of the app to run (unlike docker):-

 

No, you don't need to modify the app to get it to run in Docker. you just need to think a little differently. Docker just doesn't provide you with the usual scaffolding (init or [heaven forbid] systemd) but init is replaceable with shell scripts and the ever true and tried while true; do sleep for_a_time; done loops.

 

Last two lines in the app script for my dropbox docker which fully supports auto updating.

su -l ${DROPBOX_USER} -c "/dropbox/.dropbox-dist/dropboxd" &
while true; do sleep 86400; done

Link to comment

As has been pointed out, I dont know where this notion that you have to change the application in order to run in a Docker, but that is outright wrong and pure FUD.

 

quite right, when i said changes to the application i was talking more around how the application is managed inside the container, as you know Docker only runs processes you define, and as such things like init.d/upstart/systemd (although possible with some hackery) are not there, although it is possible to script around this, or use tools like supervisor or runit it does require a bit of thought and design. whilst having such things as systemd inside a container is nice, it might be that the overhead of running such processes is too higher price on resources, i dunno, but its worth investigation to see how well it does run as a "fat container".

 

in short i think what im trying to say really badly is, i love docker because its lightweight, and i love vm's because they work like a normal host without any dicking around with volumes and startup scripts, maybe LXD's blend of both of these technologies is going to win out?.

Link to comment

LXD is a containerized version of LXC containers which have been around for a while. Looks like an interesting development for larger use cases, its a basically a VM based on container principles.

 

To me the primary advantage of Docker is its simplicity and ecosystem. Its a single process model which lets you deploy and scale apps.

 

If you want to run an app, you use Docker. If you want to run a VM, you can now use LXD and it'll be faster than a normal VM.

 

In most cases esp for home users the goal is to run multiple apps for which Docker is perfectly suited IMO.

Link to comment
  • 1 month later...

LXD is a containerized version of LXC containers which have been around for a while. Looks like an interesting development for larger use cases, its a basically a VM based on container principles.

 

LXC was always about containers (if you might recall, Docker sprouted from LXC). 

 

LXD switched to the image concept (vs LXC's tarball approach) and scrapped the various C and shell script user space tools for a REST based client (which confusingly is name lxc)...  There are Public (and private) image servers from which you can share and pull an image (just like Docker).

 

LXC, while they touted the idea of application containers, it was primarily focused on system containers (para-virtualized linux instances).  With LXD, they are 100% focused on system containers and defer application containers to the likes of Docker.  Heck, they tout hosting Docker within an LXD system container.

 

Docker's application container approach is great for single use things like Plex, nzbget, and sickrage, etc...  However it sucks if you need an instance that runs more than a single application such as a LAMP environment, where you don't want to orchestrate a spin up of each individual docker instance for each component.

 

LXD is great if you need a linux instance that you can run your suite of daemons/applications without the overhead of HVM (hardware virtualized) QEMU/KVM.  You can even 'pass-through' devices such as graphics/audio cards for a Desktop instance (although I have no experience with GPU passthrough on LXC/LXD).

 

I would love to see the addition of LXD to Unraid for the linux vm use-case where you don't want the bloat or performance implications of HVM and the purpose of the VM is more sophisticated than a single use Docker instance.

Link to comment
  • 5 years later...
  • 2 years later...
20 minutes ago, ElderOne said:

Any chance there was some progress on this?

There is already the LXC plugin available for Unraid, but keep in mind that I don't include LXD nor Incus because it is based on Python.

 

However you should be able to do all basic thing through the GUI, please see the support thread here:

 

There is also a integration planed for the CA App for prepacked container archives like this one which you could already install manually:

https://github.com/ich777/unraid_lxc_pihole

 

 

This is what it looks like on my machine (of course without the red rectangle that hide my IP addresses :D ) :

grafik.thumb.png.456374738b38cfe95d8a4f913755c661.png

Link to comment
50 minutes ago, ich777 said:

There is already the LXC plugin available for Unraid, but keep in mind that I don't include LXD nor Incus because it is based on Python.

 

However you should be able to do all basic thing through the GUI, please see the support thread here:

 

There is also a integration planed for the CA App for prepacked container archives like this one which you could already install manually:

https://github.com/ich777/unraid_lxc_pihole

 

 

This is what it looks like on my machine (of course without the red rectangle that hide my IP addresses :D ) :

grafik.thumb.png.456374738b38cfe95d8a4f913755c661.png

 

I saw the LXC plugin but it doesn't fit my use case. I need to leverage LXD's clustering capabilities to aggregate the media folders between me and 2 other friends (we all have 1Gbps fiber internet) for setting a single instance of JellyFin that aggregates the distributed media. At least that's the ask and I am now at the research phase to see what technology I can leverage. And it seemed like LXD could do that however I am not fixated on that and I am open to any suggestions.

Link to comment
13 minutes ago, ElderOne said:

And it seemed like LXD could do that

Please note that LXD was ripped out of the hands from the community and the new equivalent is called Incus.

 

13 minutes ago, ElderOne said:

I need to leverage LXD's clustering capabilities to aggregate the media folders

Can you please describe how you would do that with LXD, sorry for not knowing how you would do that but I'm really not that familiar with LXD.

Isn't there any other software out there that could do the same that you could install in a LXC container?

 

Wouldn't it be also more suitable that you mount the two foreign media folders into the LXC container through rclone (you can also mount remote folders without syncing them) or use NFS and route it through Wireguard to have it available locally and then mount your local library and the remote ones since you can mount multiple folders with the same media type in Jellyfin.

Of course these are just a few thoughts on that because there are many ways of doing what you try to accomplish.

 

I think it wouldn't even be necessary to use LXC/LXD/Incus for this use case since a rclone plugin is available in the CA App or if you want to use Wireguard/NFS this is natively integrated in Unraid.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...