Proxmox LXC - How To Guide - Better Than A VM?

  Рет қаралды 44,009

Jim's Garage

Jim's Garage

Күн бұрын

This video details how to create a LXC as well as some of the pros and cons of doing so. Please refer to the official documentation for more information regarding options.
LXC Documentation:
pve.proxmox.com/wiki/Linux_Co...
Recommended Hardware: github.com/JamesTurland/JimsG...
Discord: / discord
Twitter: / jimsgarage_
Reddit: / jims-garage
GitHub: github.com/JamesTurland/JimsG...
00:00 - Introduction to Proxmox LXC
05:00 - Download LXC Template
07:38 - How To Create a LXC in Proxmox
13:16 - Starting the LXC (Login)
14:22 - Deploying PiHole for Testing
15:50 - PiHole Working
15:59 - Outro

Пікірлер: 92
@todomal-ho5no
@todomal-ho5no 3 ай бұрын
Thank you so much for sharing your knowledge. I have to add that, for a non-English speaker like me, your cadence in speaking and your pronunciation help a lot to understand what you are saying. Good job. 👍
@Jims-Garage
@Jims-Garage 3 ай бұрын
Thanks, I really appreciate the feedback
@golvellius6855
@golvellius6855 2 күн бұрын
The way you explain things is top notch bro thank you
@Jims-Garage
@Jims-Garage 2 күн бұрын
Thank you, appreciate the feedback.
@alphenit
@alphenit 3 ай бұрын
I hear: "Hey everybody...." and I click like! Jim's Garage should have 100k subscribers
@Jims-Garage
@Jims-Garage 3 ай бұрын
Haha, thanks 👍
@elias9725
@elias9725 3 ай бұрын
Was looking forward to this video, your explanations are great!
@Jims-Garage
@Jims-Garage 3 ай бұрын
Thanks, I hope it was helpful
@markandrow4010
@markandrow4010 2 ай бұрын
Thank you James, As always, excellent and with comprehensive explanations.👌 👍
@Jims-Garage
@Jims-Garage 2 ай бұрын
Very welcome
@SchecterWolfe
@SchecterWolfe 2 ай бұрын
The proxmox forums helped me a ton when I was manually setting up a sandbox container from a custom buildroot image
@Kevin-oj2uo
@Kevin-oj2uo 3 ай бұрын
I love this Proxmox videos! Keep up the good work!
@Jims-Garage
@Jims-Garage 3 ай бұрын
Thanks, I have a few more to tick off at least
@romayojr
@romayojr 3 ай бұрын
excellent easy to follow guide as always. i would be interested to see you setup k3s using lxc
@Jims-Garage
@Jims-Garage 3 ай бұрын
Thanks, it's coming
@sagarsriva
@sagarsriva 3 ай бұрын
Thanks. Great video
@Jims-Garage
@Jims-Garage 3 ай бұрын
Glad you liked it!
@user-tu3bi5vs6x
@user-tu3bi5vs6x 3 ай бұрын
Started watching on the OPNsense setup video and it was very helpful, thank you! I've been wanting to setup Jellyfin in an LXC for GPU transcoding, but it seems like a hassle. Would love a video on it like you mentioned!
@Jims-Garage
@Jims-Garage 3 ай бұрын
Thanks, I might do it next. Watch this space.
@wusaby-ush
@wusaby-ush 3 ай бұрын
Thank you for this
@Jims-Garage
@Jims-Garage 3 ай бұрын
You're welcome
@malzbier1339
@malzbier1339 3 ай бұрын
Very good, as usual 👍🏻.
@Jims-Garage
@Jims-Garage 3 ай бұрын
Thanks, I appreciate the feedback
@cabbagehead8815
@cabbagehead8815 2 ай бұрын
Didn't think I'd be learning from a muckle (MCC) rider! Thanks for sharing your knowledge, see you on the road!
@Jims-Garage
@Jims-Garage 2 ай бұрын
Haha, thanks! Keep it shiny side up 🚲
@s0litaire2k
@s0litaire2k 3 ай бұрын
LXC is very useful. I've ran both containers and VMs using LXC (yes including a windows VM) issues is that it's it's great for creating and testing systems locally but it's intentionally a total pain in the posterior to "expose" a container to the network. I did use a rpi3b running alpineOS to run a few basic containers I could access from the internet to test things.
@jerrinho23
@jerrinho23 Ай бұрын
excelent!
@Jims-Garage
@Jims-Garage Ай бұрын
Thanks
@philbos6232
@philbos6232 3 ай бұрын
This is so scary every time I’m working with any product, Jim comes around the corner and makes a video about it. Superb! I would really want a guide to install ansible awx on a single node k3s LXC without much hassle, is this even possible? I tried multiple guides with no luck
@Jims-Garage
@Jims-Garage 3 ай бұрын
K3S is possible on LXC, I'll have a look at it.
@blender_wiki
@blender_wiki 3 ай бұрын
Why do people always think in "better" or "worse" terms? Please do not implement clickbite titles on your channel. Things are just different, something can be more efficient in some kind situations but not in certain use cases. Besides this good educational video, I will share this to my students. 🙏🙏
@Jims-Garage
@Jims-Garage 3 ай бұрын
Appreciate the feedback. The title is reflective of a question that is frequently asked and I do believe there is a better choice in every situation, hopefully I called that out. E.g., internal Vs external, resources, performance.
@InsaiyanTech
@InsaiyanTech 2 ай бұрын
Could I run the a arr stack on a lxc container and docker with trafik and stuff like you did with the VMs in the previous series?
@NFvidoJagg2
@NFvidoJagg2 3 ай бұрын
I've run the turnkey-gitea template and I've found the they tend to leg behind in software updates, by a few versions.
@adolfolopez126
@adolfolopez126 2 ай бұрын
Yes do a video on igpu passthru
@Jims-Garage
@Jims-Garage 2 ай бұрын
It's on the way
@MaxLeeIT
@MaxLeeIT 2 ай бұрын
Thanks for this video and the lovely face
@YokoOHHNoo
@YokoOHHNoo 2 ай бұрын
I recently set up an dedicated game server for the game Enshrouded in Proxmox, alas it's pretty resource hungry. My first try in a VM was very disappointing. I have an Ryzen 4300G running my homelab and i gave the VM 8 vCPUs (so one for each physical thread) and 16 GB RAM. The gaming experience for one connected player was O.K'ish but for three ore more it was unusable. I then switched to a (privileged) LXC also 8 vCPUs but only 8 GB RAM (the game is more CPU than memory hungry). The gaming experience is much(!) better. Now gaming with 3 or 4 players is possible. Nonetheless the Enshrouded dedicated Server is pretty bad performing it consumes almost half of my Homelab which was not the case with other game servers like Valheim e.g.! But yes there are performance gains when using LXC in such "extreme" situations!
@Jims-Garage
@Jims-Garage 2 ай бұрын
That's great feedback, thanks. Definitely something to consider if you're looking for high performance.
@fedefede843
@fedefede843 3 ай бұрын
Nice! My only concern here is how the lifecycle is. When using docker I have watchtower for many of my containers and for the critical ones it is just a manual docker compose pull (or the Portainer GUI). Let's say a move them all to individual LXC containers. Now what? I've seen many of these videos, but no one addresses this important fact. Cheers!
@Jims-Garage
@Jims-Garage 3 ай бұрын
No, install docker on LXC. Use docker as normal
@fedefede843
@fedefede843 3 ай бұрын
@@Jims-Garage that is ok. That could be the best of both worlds. I have read different opinions on installing docker on LXC, but I guess it is a matter of trying it. Do you use it like that or have docker on top of a VM? In my case if I am going to have most of my services in a single environment, it could be just a VM. Since I am not splitting out too much else, why bother. I haven't reached the kubernetes world yet, but I'm looking forward to it. Cheers
@Jims-Garage
@Jims-Garage 3 ай бұрын
@@fedefede843 I predominantly use Kubernetes on VMs and have a solo docker VM. I am likely to shift over to LXC in the near future as I want to share my GPU with all containers. I'll do a video on the journey.
@2bitninja280
@2bitninja280 3 ай бұрын
Reminds me of Solaris Zones
@samsonsamson9820
@samsonsamson9820 2 ай бұрын
Thank you for your video. How to create an LXC container with docker or k3s?
@Jims-Garage
@Jims-Garage 2 ай бұрын
Docker , just install as I did. K3S, coming soon
@denniskluytmans
@denniskluytmans 2 ай бұрын
Docker is easy, docker swarm is the problem with nfs shares
@monish05m
@monish05m 2 ай бұрын
Amazing guide as usual. One question, is it possible to pass through individual disks to an lxc, not just mount point, the entire hard disk?
@Jims-Garage
@Jims-Garage 2 ай бұрын
Yes, albeit I think we need to be careful with wording. My understanding is that you're giving the LXC access to the device, not passing it through like a VM. As such, the host can see it as well as other LXCs if you allow it. This is how I'm able to share a single GPU with 3 LXCs.
@monish05m
@monish05m 2 ай бұрын
@@Jims-Garage i was also able to pass through my nvidia gpu to lxc using cgroups in the .conf file, the thing is the same method would not work for disks for some reason, the disk just wont be listed under /dev/disk/by-id/ , if you had any luck please pass the knowledge.
@dzmelinux7769
@dzmelinux7769 2 ай бұрын
Good video, as much as I know another difference is that VMs restart automatically after migration (cluster) and LXC container have to be started manually, right?
@Jims-Garage
@Jims-Garage 2 ай бұрын
I'll have to check. I know they can auto start on creation.
@meandthemrs896
@meandthemrs896 2 ай бұрын
Would you consider doing a video on utilising LXC container for something like Radarr using the helper templates - I tried this but had lots of issues with access rights writing to shared storage ?
@Jims-Garage
@Jims-Garage 2 ай бұрын
Probably not as KZbin isn't a fan of those topics... I suspect it's a simple case of permissions though.
@meandthemrs896
@meandthemrs896 2 ай бұрын
How about making a shared drive available to a container. My issue is being asked multiple times without a good answer 😊
@Jims-Garage
@Jims-Garage 2 ай бұрын
@@meandthemrs896 check here for a cifs example - forum.proxmox.com/threads/tutorial-unprivileged-lxcs-mount-cifs-shares.101795/page-4
@meandthemrs896
@meandthemrs896 2 ай бұрын
Tried it all commands worked but still read only. I think I have an issue making sure the LXC uses the right user account when running - it does mention username depends on application
@ziozzot
@ziozzot 3 ай бұрын
I woud like to see K3s on LXC
@Jims-Garage
@Jims-Garage 3 ай бұрын
It's in the works!
@74357175
@74357175 3 ай бұрын
Excellent. Question: how much thinner is an LXC vs a VM? That is to say, if a Debian install as a VM is X megabytes, how much smaller is the LXC install?
@Jims-Garage
@Jims-Garage 3 ай бұрын
About 20x smaller
@peteradshead2383
@peteradshead2383 3 ай бұрын
Well I have a SMB server with Webmin on 81k of ram , netboot-xyz on 81k , and jellyfin on 374k , so most programs only need 512k or less , try running a running jellyfin on a 512k VM .
@afnieves
@afnieves 2 ай бұрын
Can you show a video on the iGPU and jellyfin. I have this setup on a NUC got all the configuration working but jellyfin cant transcode.
@Jims-Garage
@Jims-Garage 2 ай бұрын
It should be exactly the same but 128 instead of 129. Have you tried that?
@afnieves
@afnieves 2 ай бұрын
lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.idmap: u 0 100000 65536 lxc.idmap: g 0 100000 44 lxc.idmap: g 44 44 1 lxc.idmap: g 45 100045 61 lxc.idmap: g 106 103 1 lxc.idmap: g 108 100108 65428 @@Jims-Garage
@afnieves
@afnieves 2 ай бұрын
Yes I have@@Jims-Garage
@Felix-ve9hs
@Felix-ve9hs 3 ай бұрын
11:24 AFAIK your LXCs will use the swap space of your Proxmox VE host, if it doesn't have swap set up, the LXC will likely get killed trying to allocate any swap.
@Jims-Garage
@Jims-Garage 3 ай бұрын
Good to know, I'll have to experiment. Thanks for the comments.
@Felix-ve9hs
@Felix-ve9hs 3 ай бұрын
1:09 This is true, however, it is possible to run a Linux userland in a FreeBSD jail :^)
@peteradshead2383
@peteradshead2383 3 ай бұрын
One problem you may hit if you are on AMD and passing hardware acceleration to jellyfin or frigate , to pass your GPU with PCIe passthrough you blacklist nvidia and radeon , amdgpu drivers etc. So stopped the hardware acceleration from the GPU until I removed the radeon & amdgpu from the blacklist.
@pabloszi
@pabloszi 3 ай бұрын
Hmmm... With LXC you don't need to passthru PCI-e devices. You can share it between your desired LXC, Proxmox OS and other LXCs you want.
@peteradshead2383
@peteradshead2383 3 ай бұрын
@@pabloszi you don't , BUT if you do pass a full PCI-e device to a VM don't disable the inbuilt iGPU at the same time. I pass iGPU hardware encoding / decoding to a Frigate & Jellyfin LXCs , but have a VM with my RTX2070 super to use for tdarr.
@pabloszi
@pabloszi 2 ай бұрын
@@peteradshead2383 That's right. It works as you described with VM, but LXC isn't VM. LXC is Linux container, and you can't passthru PCI cards to LXC. Instead of this you can share devices between Proxmox host and LXCs.
@InSaiyan-Shinobi
@InSaiyan-Shinobi 2 ай бұрын
So can I run docker in lxc and do the same setup you do on a vm setup like for jellyfin radar sonar and so on for it? But would you want to do on a lxc this way since I heard it’s not as secured as doing it on a VM
@Jims-Garage
@Jims-Garage 2 ай бұрын
That is what I demonstrated, Jellyfin on Docker with GPU passthrough in a unprivileged LXC.
@InSaiyan-Shinobi
@InSaiyan-Shinobi 2 ай бұрын
@@Jims-Garage oh ok I just wanted to make sure so ima just follow this thanks 😊
@zyghom
@zyghom 3 ай бұрын
I have started with Proxmox with VMs only as it was much easier to work with (for the newbie like me). But now, I move almost everything to LXC. Lighter but most importantly: I feel much better with IP management - rather than assigning MACVLAN in docker (in VM). Sharing the storage sometimes is an issue but once you know how to it is easy. But still there is a place for VMs there.
@Jims-Garage
@Jims-Garage 3 ай бұрын
Absolutely, both have strengths and weaknesses. As always, a blend is usually best.
@hotrodhunk7389
@hotrodhunk7389 3 ай бұрын
I've overtime moved all of my VMs to be LXC. They just do everything so quick. Boot in seconds so small easy to back up and migrate.
@Jims-Garage
@Jims-Garage 3 ай бұрын
Yes, they're extremely performant. It's a great benefit.
@produKtNZ
@produKtNZ 2 ай бұрын
If I wanted to spin up a wordpress website, hosting around 80-400 gb per month, VM or Container ?
@Jims-Garage
@Jims-Garage 2 ай бұрын
VM, better isolation IMO
@Mr_nah
@Mr_nah 2 ай бұрын
Is there a way to upgrade an OS in a container? I don't think do-distr upgrade works
@brunekxxx91
@brunekxxx91 2 ай бұрын
It does
@ierosgr
@ierosgr 2 ай бұрын
At 7:58 you ve mentioned you were going to be using a non root user. At 13:25 you re logging in as root.
@Jims-Garage
@Jims-Garage 2 ай бұрын
I'm root on the LXC, but in a separate namespace on the host. If privileged you're using the host namespace which is bad. You can create another user on the LXC like any regular Linux distro
@ierosgr
@ierosgr 2 ай бұрын
@@Jims-Garage The other way I thought of this was like the root inside the LXC is alias of another user of the host which automatically generates upon LXC creation. It just happens to have the root name.
@loermik
@loermik 2 ай бұрын
lovely face 😄
@---GOD---
@---GOD--- 2 ай бұрын
Jump to 5:00 You're welcome
@Jims-Garage
@Jims-Garage Ай бұрын
Haha, thanks 😂
Split A GPU Between Multiple Computers - Proxmox LXC (Unprivileged)
25:59
Docker on Proxmox LXC 🚀 Zero Bloat and Pure Performance!
20:53
SmartHomeBeginner
Рет қаралды 16 М.
Godzilla Attacks Brawl Stars!!!
00:39
Brawl Stars
Рет қаралды 7 МЛН
когда одна дома // EVA mash
00:51
EVA mash
Рет қаралды 7 МЛН
Do you like a chocolate surprise egg?🥚🍫🥰 #demariki
00:32
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Рет қаралды 5 МЛН
How I've Upgraded my Indie Game  - Dev Diary 2
4:45
The Thaumatic Pig
Рет қаралды 208
Proxmox 10 tweaks you need to know
9:48
VirtualizationHowto
Рет қаралды 27 М.
Automate Homelab Deployment With Terraform & Proxmox
26:22
Jim's Garage
Рет қаралды 53 М.
Is Proxmox Nessassary
19:16
RetiredTechie
Рет қаралды 6 М.
NAS Shares On LXC - Unprivileged - Jellyfin Example
13:35
Jim's Garage
Рет қаралды 20 М.
Meet netboot.xyz - Network Boot Any Operating System
25:00
Techno Tim
Рет қаралды 692 М.
Virtualize vs. Containerize (Which should I choose?)
14:38
Techno Tim
Рет қаралды 180 М.
LXC/LXD vs Docker Which is better?
14:24
Scotti-BYTE Enterprise Consulting Services
Рет қаралды 25 М.
Setting Up NAS Server On Proxmox
16:28
Novaspirit Tech
Рет қаралды 62 М.
Интел подвинься, ARM уже в ПК!
14:06
PRO Hi-Tech
Рет қаралды 159 М.
Секретная функция ютуба 😱🐍 #shorts
0:14
Владислав Шудейко
Рет қаралды 2,1 МЛН
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
How Neuralink Works 🧠
0:28
Zack D. Films
Рет қаралды 20 МЛН
iPhone 15 в реальной жизни
20:03
HUDAKOV
Рет қаралды 689 М.
Компьютер подписчику
0:40
Miracle
Рет қаралды 206 М.