Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Success with desktop LXD containers! Woot!

  1. #1
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Success with desktop LXD containers! Woot!

    After years of research, almost giving up and, lately, much blood, sweat and tears, I have finally succeeded in getting x11 apps fully working in LXD containers. Note that I'm mainly interested in using it for GUI apps on the desktop. I realize that the server gurus have refined its use for years running massive clusters of cloud containers, but that's not what I was after.

    There's no one resource I can point everyone to. If I can find the energy and reproduce/remember my steps, I will post a tutorial on what I did.

    I have started migrating some of the apps that I used to jail in VMs into LXD containers. At this point, it must still be considered experimental, but early results are promising.

    Disadvantages:
    • Because of the ultimately insecure nature of x11, containerized apps are not as securely jailed as VMs. Wayland should help on the security front but so far I haven't been able to get LXD to play nicely with Wayland (web sources are even harder to come by).
    • The default for LXD is ZFS. This required climbing two steepish learning curves, not just one.
    • Can't run Windows. Restricted to running other Linux distros.
    • For the average Joe like me, documentation is sparse, highly technical and arcane. I actually gave up a couple of years ago and it took the last three months to finally pin it to the ground.

    Advantages:
    • Doesn't eat up HDD space like VMs.
    • Apps run much faster. In fact, they are almost—if not exactly—at native speed.
    • Incredibly efficient with system resources: CPU, RAM, storage, everything.
    • Keeps my base install squeaky clean. I've hived off both WINE and Steam into containers where they can drag in all the 32-bit libraries they want and not pollute my base install.
    • Ditto with PPAs.
    • Once you get over the ZFS learning curve, snapshots and clones are awesome.

    I'd love to hear from anyone else who has this set up and running on their desktop. Especially with respect to tweaks and pitfalls to avoid.

  2. #2
    Join Date
    Sep 2014
    Location
    United States
    Beans
    175
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Success with desktop LXD containers! Woot!

    Congratulations. Could you please go into what your stack looks like? Are you using docker?

  3. #3
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Success with desktop LXD containers! Woot!

    No Docker. LXD straight up (that *GULP* you may have detected coming from me is what it feels like too).

    My main resource was Simos Xenitelles's excellent blog, but with significant, hard won tweaks gathered from at least two dozen other sites.

    I fully intend to post the stack, but kindly ask you to be patient, as I am producing a tutorial as I write. Given the current situation in the world, I have nothing but time on my hands, so I've taken on the task of turning my experiences into a tutorial. It should be up in the tutorial subforum in the next day or two. Until then, please bear with me as I don't want to duplicate efforts.

    I will post back on this thread once the tutorial is up.

  4. #4
    Join Date
    Apr 2014
    Beans
    597

    Re: Success with desktop LXD containers! Woot!

    Looking forward with much anticipation. Ive got my server services all broken into separate lxd containers. Desktop would be amazing to add to that accomplishment.

  5. #5
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Success with desktop LXD containers! Woot!

    Here it is: https://ubuntuforums.org/showthread.php?t=2438709

    I will edit and tweak it until either knowledge or energy runs out. Please feel free to comment either here or on the tutorial itself.

  6. #6
    Join Date
    Sep 2014
    Location
    United States
    Beans
    175
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Success with desktop LXD containers! Woot!

    Fascinating. This would be an excellent thing to add to my tech stack. Thanks for the information!

  7. #7
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Success with desktop LXD containers! Woot!

    Quote Originally Posted by EuclideanCoffee View Post
    Fascinating. This would be an excellent thing to add to my tech stack. Thanks for the information!
    Please feel free to post back your experiences. I'm curious whether my stack works for others.

  8. #8
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Success with desktop LXD containers! Woot!

    I've just added a WINE section to this tutorial. Hope everyone finds it useful.

  9. #9
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Success with desktop LXD containers! Woot!

    …and now a Steam section.

  10. #10
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    19,313
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Success with desktop LXD containers! Woot!

    I have a low-end nVidia GPU. Found that only 18.04 is supported for both the hostOS and the Container OS.
    https://docs.nvidia.com/deeplearning...rix/index.html

    Hopefully, this will save someone else wasting a few hours.

    Got stuck on sudo apt-get install nvidia-container-runtime. All the instructions are for Docker + 18.04. Digging deeper lead to the https://nvidia.github.io/nvidia-cont...e/ubuntu16.04/ repo ... which returns:
    Code:
    # Unsupported distribution! # Check https://nvidia.github.io/nvidia-container-runtime
    Found a few places on nVidia's site that say 16.04 is supported as a hostOS.

    Guess I won't be moving any GUIs into LXD. ;(
    I have to use the proprietary nvidia drivers due to local equipment buggy EDID information which needs to be overridden to get any resolutions above 1080p. Can't understand how people can put up with 1080 when 1200+ higher res monitors have been cheap the last decade.
    Last edited by TheFu; 2 Weeks Ago at 08:40 PM.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •