Replace Virtual Machines with LXC/LXD Containers

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

Комментарии • 43

  • @nicoladellino8124
    @nicoladellino8124 Год назад +1

    Very nice and useful video, THX.

    • @scottibyte
      @scottibyte  Год назад

      Thanks so much. Hope you will join the chat and subscribe.

  • @kuhtisch
    @kuhtisch 3 года назад +1

    Thanks for your video Scotti. :-)
    This video helped me a lot! I didn't get my container running on my local network before i watched your video. With your help, I got it working finally. Cheers from Germany. :-)

    • @scottibyte
      @scottibyte  3 года назад +1

      Aww so glad to hear. Germany, how nice. My wife grew up there and graduated from High School in Stuttgart, LXC containers are awesome and save so many resources.

  • @julian.morgan
    @julian.morgan 3 года назад +2

    Slowly working my way through your back catalogue of videos. Thank you for making them available. I'm just someone who likes to learn about stuff and having run an unraid server for a few years I'm probably fairly representative of the kind of person your channel's aimed at - as such I'd recommend simply ignoring or deleting comments that are obviously intended to be rude and provocative or just flexing the commenter's "Linux guru" muscle to no constructive purpose, least of all your intended audience. Like wasps at a picnic they contribute nothing and can quickly make things uncomfortable for those of us keen to learn. Just my two cents as I'd like to see this channel grow and develop a newbie-friendly community around it.

  • @bosse1478
    @bosse1478 Год назад

    Just that good

  • @brandonphilander661
    @brandonphilander661 3 года назад +2

    Thank you, this is a great video.

    • @scottibyte
      @scottibyte  3 года назад +2

      Thank you Brandon. I am trying to focus on network and infrastructure techniques. So many don't realize the efficiency and ease of use for LXC/LXD. Watch my presentation on LXD Web management also.

    • @brandonphilander661
      @brandonphilander661 3 года назад

      @@scottibyte I mostly use virtual machines, just for gaming though.

    • @scottibyte
      @scottibyte  3 года назад +2

      @@brandonphilander661 In one of my videos, I show how to add an Ubuntu Desktop GUI to a LXD container. I am surprised you use virtual machines for gaming because of the decrease in performance as compared with bare metal.

    • @brandonphilander661
      @brandonphilander661 3 года назад +1

      @@scottibyte KVM / Qemu gives near native performance. 10 to 15 fps difference max.

    • @julian.morgan
      @julian.morgan 3 года назад

      @@scottibyte I'll dig that out - sounds interesting.

  • @mariofranco5580
    @mariofranco5580 3 года назад

    Great video Scotti

    • @scottibyte
      @scottibyte  3 года назад

      Thanks Mario. I have several videos showing features of LXD containers. Subscribe and requests are accepted.

  • @tomasibu3536
    @tomasibu3536 8 месяцев назад

    Hi, have you any luck setting up namespace inside a lxc/lxd or incus container? Attempted but this was not possible for me. The idea is, create a container and bridge different namespaces out to host then out to LAN.

  • @TradersTradingEdge
    @TradersTradingEdge 2 года назад

    Hey Scotti. I tried to create a FreeBSD VM, but no success. This could be another video idea for you ;-) Keep up your great work & tnx 4 all you do.

    • @scottibyte
      @scottibyte  2 года назад

      Did you try to do a LXD VM as presented in my most recent videos or were you trying to do a standard LXD container for your FreeBSD?

    • @TradersTradingEdge
      @TradersTradingEdge 2 года назад

      @@scottibyte have to admit that I tried two ways from other websites. So I will give it a try with your way of installing a VM. ..heck, it's too hot in Switzerland for my brain to come up with this obvious idea LOL. Happy weekend Scotti and tnx.

    • @TradersTradingEdge
      @TradersTradingEdge 2 года назад

      @@scottibyte , ah, bummer, no luck. The Distrobuilder seems not to support a repack-freebsd, like it does with windows. And I couldn't find an image for freebsd for lxc. Maybe I have to dig deeper into the distrobuilder? ...and so the journey begins §8-)

    • @scottibyte
      @scottibyte  2 года назад

      @@TradersTradingEdge That is probably because FreeBSD is a Unix whereas other distros are Linux. If you like FreeBSD, wouldn't Fedora be a good substitute? By the way, Canonical presently has a variety of images for 24 different distros in the LXD repository.

    • @scottibyte
      @scottibyte  2 года назад

      @@TradersTradingEdge By the way, come chat on chat.scottibyte.com/

  • @flyddw
    @flyddw 3 года назад +2

    You probably know you can add -y to your install command for auto yes and put multiple packages.

  • @unbekannter_Nutzer
    @unbekannter_Nutzer 2 года назад

    Thanks for the lecture!
    A minor whish for future videos: If you could set up the x-terminal with a bigger font, it would be more easy to read. Since your Terminal didn't use the full width of the window, there is some room for even longer command lines.
    Also I was wondering, why you so often paste the code from the context menu. Since you had two breaks in the video for typoos, I might guess the answer, but auto-completition sanitezes you from typos often - is there a reason I don't know to avoid auto-completition? And pasting can be done on most Linuxes with the middle mouse button.

    • @scottibyte
      @scottibyte  2 года назад +1

      Thanks for the comment Stefan. This was one of my earlier videos and I have made 40+ videos since then where I have improved font sizes and scaling for ssh sessions, RDP sessions and web interfaces. My goal is to improve infrastructure knowledge in the areas of networks, VLANs, and containerization. The mechanics of using the right click context menu, shift-control-v, or middle mouse button are usage details that I am not trying to instruct folks on. I am assuming that basic use of the user interface is a prerequisite. In my case, I use a track ball that does not have a readily easy to use middle button because of its configuration. I use a mixture of the right mouse context menu and shift-CTRL-V for pasting based on whatever I do unconsciously. Sorry my pasting was distracting to you. I was hoping to content would be of more interest though.

    • @unbekannter_Nutzer
      @unbekannter_Nutzer 2 года назад

      @@scottibyte
      Thanks, I was just curious about the pasting, and nice to hear, that you idependently went already to larger fonts.

  • @MrJwan
    @MrJwan 2 года назад +1

    👍👍👍

  • @rashie
    @rashie 2 года назад

    👍👍

  • @BryanChance
    @BryanChance Год назад

    What is LXD? the management part of LXC? Why it's named like this is ___+

    • @scottibyte
      @scottibyte  Год назад

      I have over 50 tutorials related to LXD. LXD are Linux Containers (LXC) with both an API and a "lxc" CLI added to them. LXD containers were invented by Canonical in 2014. LXD containers are a virtual hypervisor for a variety of Linux OS instances. The main feature is that they are highly efficient due to a shared kernel. The management interface to LXD is the "lxc" cli. I also feature LXDware LXD Dashboard as a superior wed based app for LXD Container management. Be sure to watch my tutorial entitled LXD Containers 101.

  • @TheGrantourismo
    @TheGrantourismo 3 года назад +1

    Containers are more portable? Try running Linux container in FreeBSD or different Linux version (esp. kernel or considering systemd). VMs are more portable, since they can be 100% emulated. Also, VMs CAN share RAM and disks, oversubscription is possible. Also VMs provide more security isolation, which is crucial sometimes. Your analysis is too simplistic and wrong.

    • @scottibyte
      @scottibyte  3 года назад +7

      So, I realize all these things having managed architectures containing tens of thousands of servers distributed in worldwide data centers. For the Home Lab SOHO environment which I am addressing here, containers are considered to be more portable and are designed to be appliances. At the start of container architectures in 2005, software vendors praised containers because they could package a container and sell it as a pre-configured instance of their product offering which would otherwise be a complex and costly installation. I realize that VM's can oversubscribe, but realize that is not true of all hypervisors, yet it is true of LXC/LXD and Docker containers. In terms of overall resource consumption and startup resources, containers will out-perform VMs every time. I challenge you to prove that anything I have said is wrong.
      It's possible that your personal use cases cause you to favor VMs and that's fine. I focus on LXD containers and their use cases because most novices are unaware of their great flexibility and capability. VMs have been around longer I know but there is no way that virtualizing only an OS uses the same or less resources as virtualizing the hardware and the OS which is what VMs do by design. Yes, I know that containers all share the same underlying kernel and that's the reason for efficiency. Five years ago I had a quad-core celeron running 18 LXC containers and they were actually performing, and in 8 GB of memory no less! Try running 18 VMs on that. So, that's my point. My goal is to introduce options to folks for things they haven't considered. Everyone at this point understands and uses VMs. Containers, not as much. It's all about learning.

  • @RayHorn5128088056
    @RayHorn5128088056 3 года назад

    You have clearly not spent enough time working with VMs however you do seem to be an LXC fan boy. VMs can share resources just like Containers.

    • @scottibyte
      @scottibyte  3 года назад +5

      I have been working with VMs since 2006 and LXC containers since 2015. I have a background in V-Sphere managing a few thousand servers. The target for this channel are Home Lab SOHO users wanting to self host. Virtual Machines carve out dedicated resources like memory and storage from the host, whereas containers dynamically adjust their resources inside of a cap. For example, on a physical host with 16GB of memory, I cannot have 10 VMs with 4GB of memory each. However on the same physical host I can have 10 LXD containers with 4GB of memory without an issue. The VM absolutely allocates its memory away from its host, whereas the LXD or Docker container dynamically uses what it needs inside of a cap for the duration of demand on the container. What makes me a "fan boy" is the fact that containers do not require an OS to be built and are "instant on", yet they provide most of the advantages of a bare metal host or a VM. I have used VMs a couple times on the channel where required. The use case for a VM is when you need direct, privileged access to the kernel which is not possible with a container. Also, if the host kernel lacks a feature that a container requires, you would want to use a VM or bare metal host.

    • @RayHorn5128088056
      @RayHorn5128088056 3 года назад +1

      @@scottibyte I am confused as to why you said VMs need dedicated resources when this is clearly not always the case. I have many VMs that share resources like RAM, for instance. And "yes" I have watched one of my Hypervisors allow RAM to be overcommitted without crashing. RAM is one resource that does not necessarily need to be dedicated. Some pieces of hardware "may" need to be dedicated depending on the Architecture one wished to use but even a GPU could be shared among any number of VMs or Containers with the appropriate software architecture. I was under the impression you were just an LXC Fanboi since that was the tenor of your message. IMHO.

    • @scottibyte
      @scottibyte  3 года назад +1

      @@RayHorn5128088056 Actually, I tend to prefer LXD when possible and it's just because they don't pull nearly as many resources simply because they do not need to virtualize the hardware. With the advent of LXD profiles, managing resources like connection to VLANs just seems simpler. Currently, my two main hosts are QNAP NAS's. Both have Ryzen 7, 1700 Pro and one has 32GB of memory and the other has 64GB. My 64GB NAS is running 35 containers. 24 of them are LXD and 11 are Docker. I also have two VM's running at all times. My memory utilization is 32-34%. My container memory caps are 2GB - 6GB each. My point in the video is that you would not see those numbers with all VMs. I tend to use a VM most often when I need to mount a "loop" device or if my kernel host version lacks something. One example is I have two Wireguard VM servers because the host kernel did not have Wireguard kernel support. When I use VM's I try to make them either Ubuntu server or Fedora. Without a GUI, the servers are a little leaner, but not as lean as LXD. As for Hypervisor over-committing, it is not a feature in all Hypervisors. On this channel, I know that many people use VirtualBox and to the best of my knowledge, it does not over-commit. So, when making content, I'm torn in how to present some topics.

    • @RayHorn5128088056
      @RayHorn5128088056 3 года назад +1

      @@scottibyte Ok. So you are just a Fanboi. Got it.

    • @TheGrantourismo
      @TheGrantourismo 3 года назад

      @@RayHorn5128088056 He definitely has too little real-world experience with VMs and containers. Not to say both VMs and containers are both excellent technlogies (except Docker, of course) where used properly.