Getting started with LXC containers

  Рет қаралды 78,468

Just me and Opensource

5 жыл бұрын

In this video I will give you an introduction to lxc containers and how you can use lxd to work with machine containers.
lxd is a light weight alternative to hypervisors. You can spin up a virtual machine very quickly. It is very light on resources.
I will be using Ubuntu 18.04 virtual machine in this demo and show you how to install and launch machine containers. I will also show you how to use some commonly used commands.
Linux Containers Playlist:
kzbin.info/aero/PL34sAs7_26wPfLNZ5NKoH0RKbTAWMlh2I
For any issues/feedback, please leave me a comment and I will get back to you as quickly as I can. If you liked this video please share it with your friends and don't forget to subscribe to my channel.
Thanks for your time watching this video. Hope it was helpful.
If you wish to support me:
www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F8FN37PAD629Y&source=url
#lxc #lxd #containers #kubernetes #justmelxd #justmelxc

Пікірлер: 278
@gilulig
@gilulig 3 жыл бұрын
After the first 5-6 minutes regarding this video, I was completely amazed at how clear, concise is, and by the just-right deepness of revealed knowledge. I would love all videos were as good. Thank you.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Raoul, many thanks for watching. Cheers.
@1017BuurPRODUCTIONS
@1017BuurPRODUCTIONS 4 жыл бұрын
Hey Venkat. Amazing tutorial video. I work with k8s deployment for customers and wasn't aware of lxc containers. This is a game changer!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. Yes, ever since I discovered LXC, I started using it for everything and almost stopped using Virtual Machines. And my Kubernetes nodes are all LXC containers. Cheers.
@ManpreetSingh-og4fy
@ManpreetSingh-og4fy 2 жыл бұрын
This is called great content. Says a lot about the knowledge and understanding of the presenter. Complicated topic explained in the easiest possible manner. Excellent Stuff !!
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi Manpreet, thanks for watching.
@aghahasaan
@aghahasaan 3 жыл бұрын
You have made a very complicated topic look like child's play. Hats off bro and thank you.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, Thanks for watching.
@manishfoodtechs
@manishfoodtechs 5 жыл бұрын
I will rate you as best teacher . This is the simplest but robust explanation
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Manish, thanks for watching this video and taking time to comment/appreciate.
@enriquezurita4784
@enriquezurita4784 4 жыл бұрын
Quick, Agile and very well explained. Thank You!!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Enrique, thanks for watching.
@davidmburunjoroge1329
@davidmburunjoroge1329 Жыл бұрын
Concise, very clear and vey easy to understand! Amazing tutorial.... 👏👏👏👏
@justmeandopensource
@justmeandopensource Жыл бұрын
Hi David, thanks for watching.
@ishehad8091
@ishehad8091 2 жыл бұрын
Awesome overview - concise, to the point, easy to follow. Good job, bud!
@justmeandopensource
@justmeandopensource 2 жыл бұрын
HI Ish, many thanks for watching. Cheers.
@prashantsingh1096
@prashantsingh1096 4 жыл бұрын
The best way to learn about containers , because lxc has simple commands . Thanks , The kubernetes and docker are hard to understand comparative to this .
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Prashant, thanks for watching.
@subhankarpadhy5146
@subhankarpadhy5146 2 жыл бұрын
I've been following your series and I've found them very informative for newbie like me. Thanks a lot sir.
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi, Thanks for watching.
@TheAirak
@TheAirak 4 жыл бұрын
My time well spent! Thank you very much!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Thanks for watching.
@GauravSharma-ui4yd
@GauravSharma-ui4yd 4 жыл бұрын
Finally i did this. What a hands-on video this is. Great walk-through venkat. Can you make such an hands-on video on chroot jail and resource throttling using cgroups
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Cool. Good job. I will see if I can do those videos. There are lots in my list to do already, so I can't guarantee I am afraid. Cheers.
@davidsyengo1893
@davidsyengo1893 3 жыл бұрын
Very comprehensive guide!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi David, thanks for watching.
@ItsMe-nl5or
@ItsMe-nl5or 2 жыл бұрын
A very nice, amazing and clear tutorial. You build and structured it very well. Many thanks for that.
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi, thanks for watching.
@hyqhyp
@hyqhyp 3 жыл бұрын
The 80% that covers 99% of uses. Superb.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Thanks for watching.
@vishnuganesh2496
@vishnuganesh2496 2 жыл бұрын
Fantastic presentation! Best I've seen on this topic. Thank you very much!
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi Vishnu, Thanks Thanks for watching.
@abessesmahi4888
@abessesmahi4888 4 жыл бұрын
You are a great tutor sir. Thank you so much for your efforts.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Abesse, thanks for watching.
@c3rb3ru5d3d53c
@c3rb3ru5d3d53c 2 жыл бұрын
Great introduction to lxc/lxd great!
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi, Thanks for watching.
@otvs5838
@otvs5838 Жыл бұрын
Awesome you are 🎉 Thank you for your time. Really appreciate 🎉
@justmeandopensource
@justmeandopensource Жыл бұрын
Thanks for watching.
@魔君在放克
@魔君在放克 4 жыл бұрын
You are definetely one of the best sharing with us
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Phentony, thanks for watching.
@sujaysaha6323
@sujaysaha6323 4 жыл бұрын
Simple and helpful. Really liked it. Appreciate your work. Keep it up.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching.
@kb8623
@kb8623 4 жыл бұрын
Wow wow wow Perfect perfect perfect Thankssss Very very nice tutorial 👌👍👏❤️😊
@rsrini7
@rsrini7 5 жыл бұрын
Simply Wow!! "Inception" of Containers.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Thanks for watching this video Srini.
@ajit555db
@ajit555db 5 жыл бұрын
This is awesome for Windows VirtualBox users. It would allow me to create a single Linux VirtualBox VM and then create multiple lxc containers utilizing all the full resources of my linux VirtualBox VM, keeping it always a clean image. Super efficient utilization of RAM and storage.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Thanks Ajit for watching this video and sharing your thoughts. Cheers.
@SomeRandomPiggo
@SomeRandomPiggo 2 жыл бұрын
thank you so much for making this video! really appreciate it
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi, thanks for watching. 🙂
@TheGdhungana
@TheGdhungana 5 жыл бұрын
Most awaited video..I hope you would make its series. Thanks for your time and effort
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Thanks Ganesh. I will see if I get enough areas/topics around lxd to make it a series. I am planning to do a video on my other series "Learn Kubernetes" about setting up a cluster using LXD containers. So I made this one as an introduction.
@seggsfault
@seggsfault 2 жыл бұрын
Thnx venkatesh you are awesome....Keep doing these man. love the way you present everything.
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Glad it is useful. Thanks for watching.
@adnenettayeb1153
@adnenettayeb1153 4 жыл бұрын
It's really easy to understand . Thanks for this video .
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Adnen, many thanks for watching this video.
@ronanluciopereira8800
@ronanluciopereira8800 3 жыл бұрын
Very good. Thanks for sharing
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Ronan, thanks for watching.
@windowsrefund
@windowsrefund 3 жыл бұрын
Really glad I circled back to this. Excellent job :)
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching.
5 жыл бұрын
Outstanding video! Crystal clear!
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Herve, Thanks for watching this video.
@pareshpatel493
@pareshpatel493 4 жыл бұрын
Great informative session. So helpful...
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Paresh, thanks for watching.
@mandirdarshanarti
@mandirdarshanarti 5 жыл бұрын
good explanation and quick
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Piyush, thanks for watching this video.
@maslo700
@maslo700 4 жыл бұрын
37:20 You can just type `mkdir $(seq 5)` or simply `mkdir 1 2 3 4 5`. Great video, thanks!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Greg, thanks for watching. Yeah I could have used that. But sometimes muscle memory kicks in.
@andreasschnitzerling9332
@andreasschnitzerling9332 4 жыл бұрын
mkdir {1..5}
@VishalGandhi1
@VishalGandhi1 2 жыл бұрын
Great tutorial Venkat.
@thelinuxbox
@thelinuxbox Жыл бұрын
Amazing tutorial.
@justmeandopensource
@justmeandopensource Жыл бұрын
Hi, Thanks for watching.
@Sarsa78
@Sarsa78 4 жыл бұрын
Master class on LXD thank you man! 39:27 To see the list of snapshot names for a container you can do: lxc info containername and you get the list at the bottom.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Eric, thanks for watching.
@Sarsa78
@Sarsa78 4 жыл бұрын
@@justmeandopensource Thank you for putting up this high quality content helping many people like me. Cheers!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
No worries. My pleasure.
@gustavomariani4225
@gustavomariani4225 2 жыл бұрын
Excelent video bro. Thanks !!
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Thanks for watching.
@seejanraj
@seejanraj 3 жыл бұрын
Thanks. Loved the video.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Seejan, thanks for watching. Cheers.
@makrand1584
@makrand1584 4 жыл бұрын
Nice video Venkat. I wasn't aware about so many things that are possible with LXC. A real good replacement for vagrant & virtual box. and light weight too. BTW, one can always set alais for the image. "lxc image alias create cent7 ". So next time you can launch centos7 container just using "lxc launch cent7 instead of tedious image name.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Makrand, thanks for watching and sharing that wonderful alias tip. Would definitely be helpful. Cheers.
@tonydematteis5029
@tonydematteis5029 3 жыл бұрын
Very well done! Direct, to the point w/ good examples. Love it...
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Tony, many thanks for watching. Cheers.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Tony, many thanks for watching. Cheers.
@tamilselvansellamuthu5950
@tamilselvansellamuthu5950 4 жыл бұрын
Thanks Venkat :) it is very informative.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Tamil, thanks for watching.
@KiranDevraaj
@KiranDevraaj 5 жыл бұрын
tack sharp on the concepts. thanks for making concepts clear. subscribed !
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Kiran, thanks for watching this video.
@prometheus1672
@prometheus1672 2 жыл бұрын
This is a really nice tutorial. I was able to follow along and setup LXC on my Manjaro system. I do have one suggestion, though: don't clear your terminal so quickly for tutorials and teaching videos. I clear my terminal a lot as I'm working, too, but for the purposes of learning I had to rewind and pause the video quite a lot to see what you just typed and what the output was.
@justmeandopensource
@justmeandopensource 2 жыл бұрын
I see your point which is very valid when I think from the viewers point of view. Never thought about it. Thanks for watching. Cheers.
@jdorgeville
@jdorgeville 5 жыл бұрын
Cristal clear! Big thanks!
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Jan, many thanks for watching this video. Cheers.
@soumyanilbiswas_reveng007
@soumyanilbiswas_reveng007 3 жыл бұрын
Really good tutorials, gave me a hell lot of knowledge...
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching. Cheers.
@soumyanilbiswas_reveng007
@soumyanilbiswas_reveng007 3 жыл бұрын
@@justmeandopensource 😁
@forrestkong3455
@forrestkong3455 5 жыл бұрын
Nice Start Video , Great Thanks
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi FanJun, thanks for watching this video.
@lanceeilers5061
@lanceeilers5061 4 жыл бұрын
Cool stuff :-) have a great one and keep smiling :-)
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Thanks for watching.
@solracthegreat1002
@solracthegreat1002 3 жыл бұрын
Many thanks for your excellent work, I was depressed about Kubernetes and Docker till I found your videos. Is there a way to expose a service from a nested container? THANKS!!!!!!
@VJ-po5qh
@VJ-po5qh 4 жыл бұрын
Thanks Venkat, Really super quality stuff, just couple of things which I experienced during testing nested container on CentOS 7 host (VM). 1) while doing lxc init inside the container it didn't want about security.nesting and security.privileged 2) was able to create nested container but it only get ipv6 there was not ipv4 or networking enable on it. (no ipv4/default route/gw)
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi VJ, thanks for watching. I haven't explored or experimented much with nested lxc containers. The reason to enable security.nesting is to be able to run docker containers within the lxc containers.
@alessonnunes3236
@alessonnunes3236 4 жыл бұрын
@@justmeandopensource Why run docker within lxc. One question more lxd is not an alternative to docker?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@alessonnunes3236 Hi, lxd is not an alternative for Docker. Docker is best suited for application containers running single process. Whereas in LXC/LXD, you can run a full virtualized os in its own namespace.
@alessonnunes3236
@alessonnunes3236 4 жыл бұрын
@@justmeandopensource Thanks, well explained, now I'm watching your full playlist. Great videos!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@alessonnunes3236 Thanks for your interest in my videos. Hope you will find it useful.
@Himanshu-Patel-Clarisights
@Himanshu-Patel-Clarisights Жыл бұрын
Thanks a lot Venkat !!
@justmeandopensource
@justmeandopensource Жыл бұрын
Hi Himanshu, thanks for washing.
@rain2besoon
@rain2besoon Жыл бұрын
this is amazing content
@justmeandopensource
@justmeandopensource Жыл бұрын
Thanks for watching.
@surugiualexandru5151
@surugiualexandru5151 4 жыл бұрын
Very good video, Thank you!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Surugiu, thanks for watching. Cheers.
@texaslinux
@texaslinux 4 жыл бұрын
This was really fantastic, thank you so much!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Keith, thanks for watching this video.
@ordidaad
@ordidaad 2 жыл бұрын
Awesome, very clear and eloquent, I have a question, is it practical to use LXC in production env?
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi Kourosh, Thanks for watching.
@ash-lo2dc
@ash-lo2dc 3 жыл бұрын
Very informative thanks
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching. CHeers.
@Pananananananananify
@Pananananananananify 3 жыл бұрын
Great tutorial!!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching.
@amarnathch3114
@amarnathch3114 3 жыл бұрын
Very informative Thanks. I have a question on lxc container. What will happen when call "sys.powerctl" "shutdown" from container? So the shutdown will be applicable to the same contier or whole system?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching. I haven't tried that. Have you? Whatever you do within the container shouldn't affect the host system. I guess it wouldn't have permission to shutdown the host system.
@qwerty180119990
@qwerty180119990 5 жыл бұрын
Loved the tutorial...Thanks a ton!!!
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Ayan, thanks for watching this video. I am planning to do more videos on LXC/LXD. So stay tuned. Cheers.
@arunsarma7997
@arunsarma7997 3 жыл бұрын
Thanks Venkat for your clear explanation and instructions. I have a Question for you. Is it possible to run the Provisioning similar to vagrant. Meaning I want to create the kubernetes cluster during the provisioning. In vagrant, it is possible to create our own image containing all the required softwares from the bare OS, then we can use this image for creating the cluster by running kubeadm during provisioning. It takes very less time to bring the entire cluster using this method.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Arun, thanks for watching. LXC images are just a bunch of files that gets extracted when you launch a container. You can build your own lxc container.
@msahsan1
@msahsan1 4 жыл бұрын
Awesome thanks
@justmeandopensource
@justmeandopensource 4 жыл бұрын
You are welcome.
@balamuruganvms5158
@balamuruganvms5158 3 жыл бұрын
Thank You !! Awesome
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching.
@AfshinKarimi-l1d
@AfshinKarimi-l1d Жыл бұрын
Thank you for sharing your knowledge. i have a question, in "lxc list" output in the type section, i see only "container" and "virtual-machine", your type is persistent. what is the difference? my second question is that my lxc container doesn't get an ipv4 address, what did a do wrong?
@vipinmon
@vipinmon 3 жыл бұрын
Thank you. B/w what is the screen recorder you use?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Vipin, thanks for watching. I use Simplescreenrecorder. Cheers
@kamilwronka1417
@kamilwronka1417 3 жыл бұрын
Hello, I have a question regarding the deployment of charmed kubernetes with LXD. How can I expose the cluster to the internet? I've deployed it on bare-metal server on Hetzner with Traefik as a load balancer and added metallb to assign external ip to it. When I try to connect to that IP nothing happens (usually I had 404 not found from traefik while using other kubernetes solutions).
@RajarshiBandopadhyay
@RajarshiBandopadhyay 5 жыл бұрын
Video starts and I see TMUX. That is my signal to click on the Subscribe button.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Rajarshi, thanks for watching this video and subscribing.
@gopikrishna7779
@gopikrishna7779 3 жыл бұрын
Informative Session.. Thanks for sharing your knowledge with us. I have one quick question.. just like MongoDB series, are you planning the same for Oracle 12c DBA ?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching. Sorry. I am not a DBA and not planning to do Oracle series.
@AhmedMahmoud-tr1yf
@AhmedMahmoud-tr1yf 4 жыл бұрын
Thanks for all of these amazing videos! quite new to linux, may I ask you which widget/tool/software you use to show your system monitoring metrics always on top of everything? I like it so much.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Ahmed, thanks for watching. The system status you are seeing on the right side of my desktop is from conky. I used to use conky and had a custom conkyrc config file. But I don't use it these days and unfortunately I didn't save that config file anywhere. You can install conky and hunt for conkyrc file online and you will find lots of cool configs. Cheers.
@InvisibleManCZ
@InvisibleManCZ 3 жыл бұрын
Do you know what would happen if I shrink the memory for a container bellow the current usage?
@harir4982
@harir4982 4 жыл бұрын
Sir, do you use as your daily driver?, if you are using.. what are all the challanges you face with work environment and Linux users?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Hari, are you asking about the operating system I use on a daily basis? If so, I use Arch Linux with Gnome desktop environment. I used to use I3 tiling window manager but switched to Gnome since its version 3.36. Linux has been my daily driver for more than a decade.
@utvikler-no
@utvikler-no 5 жыл бұрын
Thanks for an awesome introduction ;-)
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Thanks for watching this video Tom and taking time to comment. Cheers
@pradeep19051988
@pradeep19051988 3 жыл бұрын
We are looking for Hypervisor solution, our requirement is to use two displays, two independent users with extensive multimedia use cases, Does LXC container replace the Hypervisor in our use case?
@mchannel1365
@mchannel1365 Жыл бұрын
Thanks a lot Venkat, do you know how to migrate LXC containers in cloud ?
@justmeandopensource
@justmeandopensource Жыл бұрын
Hi, thanks for watching. I haven’t tried this in the cloud though. So sorry no idea. Cheers.
@toshn4151
@toshn4151 4 жыл бұрын
This is great, thank you!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Tosh, thanks for watching.
@manikandans8808
@manikandans8808 5 жыл бұрын
This video makes my system returns from VM to LXD. It saves lots of RAM than the VMs. Thanks for this amazing video. Is there any possible to demonstrate clusters, network and Stroage in future videos? And what's the main difference between LXC and LXD containers?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Mani, LXC is the underlying Linux Container libraries and LXD is an interface (REST API) that talks to LXC libraries liblxc. LXD is considered as an extension to LXC to make things easier.
@robertalvaradolugo3010
@robertalvaradolugo3010 4 жыл бұрын
Great men
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Robert, thanks for watching.
@24041984girish
@24041984girish 5 жыл бұрын
Where will be the Network configuration details for these container? I am trying to create a bridged interface to allow my other network hosts to access these container. I need to update following parameters: lxc.network.link, lxc.network.ipv4/6, lxc.network.ipv4/6, lxc.network.veth.pair etc. Could you help?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Girish, Thanks for watching this video. By default lxc containers can talk to internet and other hosts in your host network range by lxcbr0 bridge interface using NAT. But other hosts in the network won't be able to talk to your containers. You have to configure macvlan for this. There is a good article/blog post written by someone which might help you in the right direction. Please check the below link. www.thegeekdiary.com/how-to-set-external-network-for-containers-in-linux-containers-lxc/ Thanks.
@24041984girish
@24041984girish 5 жыл бұрын
@@justmeandopensource Thanks for the video and your reply. actually, I am facing 2 problems right now. the link you gave also creating a new bridged interface and modifying in container config file. First, after creating new bridged interface in /etc/network/interfaces my host lost the internet connection. Second, not able to find network configuration details for these containers. though, i find \etc\lxc\default.conf
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@24041984girish I will have to try that in my machine. I will let you know if I get anywhere with it. Thanks.
@maherkhalil007
@maherkhalil007 3 жыл бұрын
hello friend, it that container technology suitable for creating vps instead of vm?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching. LXC containers are essentially system containers that mimic an entire operating system as opposed to Docker containers which are application containers. VPS is virtual private server which is basically a virtual machine. So you could use lxc containers for that as you would for a vm. Cheers.
@maherkhalil007
@maherkhalil007 3 жыл бұрын
@@justmeandopensource hello friend, can we meet in zoom or team for further discussion? if you have time you can support me in work
@justmeandopensource
@justmeandopensource 3 жыл бұрын
@@maherkhalil007 Thanks for your interest. But I am afraid I can't do 1 to 1 training support as I have a primary 9-5 job. I post videos whenever I get some time and answer questions in the comments section whenever I can. Sorry. Cheers.
@maherkhalil007
@maherkhalil007 3 жыл бұрын
@@justmeandopensource hello my fiend, I also have good experience but I will need some help to my questions then I can do my work. we can meet 1 or 2 times only per week then you can guide me
@HelgaSmurman
@HelgaSmurman 3 ай бұрын
how did you make the terminal windows connected to each other like that
@vshnukantr9152
@vshnukantr9152 4 жыл бұрын
Hello Venkat, Thanks for the video. I have a question. I am running a hyper v session on windows 10 with ubuntu image. Inside the VM, I started playing around by installing lxc containers for centos and also for ubuntu18.04 for trying out the mongodb replicaset. However, a lot of my disk space on PC was consumed. I started with having 50 GB and ended up with 20 GB free space and a lot of warnings. You mention that the image size is very light around 180 MB lets say... Trying to understand what takes up a lot of memory and how to I clean up the memory ? I have cleaned the lxc containers and stopped the lxd service. (new to the VM world)
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. Its your Ubuntu virtual machine that has taken those space. All the LXC containers are just light weight and small sized that are only living inside your Ubuntu virtual machine.
@vshnukantr9152
@vshnukantr9152 4 жыл бұрын
@@justmeandopensource Hello Venkat. Indeed you are right. The VM took the space. Actually I clicked on checkpoint option and it consumed 5GB data. Later I deleted and disabled the checkpoint. Also, I had to allocate extra space for VM because we had to install docker on the lxc container instances. Good learning curve. Thanks for the response.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@vshnukantr9152 No worries.
@harir4982
@harir4982 4 жыл бұрын
Sir, how secure is lxd , if we are running kali linux and there is a chance of tracing us
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Hari, thanks for watching. Containers are secure by themselves in that it runs in an isolated namespace. It won't be able to access any filesystems on the host. Anyways you will have to secure your host. Anyone having access to your host will be able to access the container.
@rukey3001
@rukey3001 4 жыл бұрын
Thank u very much for the tutorial . When I run "$ lxc image list" command, ,mine shows "container" instead of “persistent “. What am I doing wrong??
@nestorreveron
@nestorreveron 3 жыл бұрын
The best!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Nestor, thanks for watching.
@anusham3964
@anusham3964 5 жыл бұрын
Can I convert a lxc container to docker container or how to run and start a lxc container inside docker
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Anusha, thanks for watching this video. Both of your questions are not a valid use case. No one would want to do that. LXC is different than docker. LXC is a full blown virtual machine running under the host kernel and isolated file system without the need of hypervisor like VirtualBox. Docker is for application isolation. You package your application along with supporting libraries into a container and you run single process on docker container. There are hacky ways to convert lxc container to docker container by exporting lxc container to a tar ball and using Dockerfile to import that filesystem. But its not a valid scenario. Your other question also doesn't make sense. Hope you understand the difference between LXC and Docker containers. They are built for separate purposes. Hope this makes sense. Thanks.
@rajendragosavi2233
@rajendragosavi2233 3 жыл бұрын
Hi Venkat. Great course again. One question - can i install Lxd on my raspberri pi ?
@amitroy-cx2qb
@amitroy-cx2qb 3 жыл бұрын
Hello I have configured my ubuntu LXD in my VM. Now I want to ping that my lxc contenier from my VM to my local system. but using this command it's not working (lxc config device add mongodb001 eth0 nic nictype=bridged parent=lxdbr0 name=eth0)
@kamilaboud
@kamilaboud 3 жыл бұрын
I have lxd_route_server image stored in my flash drive . I want to copy it to my lxd host . Then import it . It is not working .
@subhankarpadhy5146
@subhankarpadhy5146 2 жыл бұрын
Thanks sir
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi Subhankar, Thanks for watching.
@manikandans8808
@manikandans8808 5 жыл бұрын
When I use macvlan as network interface , it can ping between the containers only but it does not ping the host machine ( mycase Ubuntu 18.04) since it has the same ip range. Would there be a solution for it?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hmmm. I have never used macvlan interface on the virtual machines or containers. May be the below stack overflow link could help. kzbin.info/www/bejne/e6mxdX9rhrGBqLs They were talking about enabling promiscous mode on the interface.
@william8106
@william8106 5 жыл бұрын
You're the best
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi William, many thanks for watching this video.
@saalimmushtaq3472
@saalimmushtaq3472 Жыл бұрын
Incase of bare metal hyperviser you don't have any OS intalled on it,how come you have shown it in your diagram?
@shravansingh8609
@shravansingh8609 5 жыл бұрын
hey mate thanks for video. in this video would u work on 2 terminal simultaneously???
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Shravan, What do you mean? I use tmux and I split panes. If I want to run commands on multiple panes simultaneously, then I can syncrhonise the panes.When I type a command on one pane it gets typed on all the panes. If this is what you mean. Thanks, Venkat
@shravansingh8609
@shravansingh8609 5 жыл бұрын
Thnx venkat i understand the idea
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@shravansingh8609 Cool.
@vijaychebium3216
@vijaychebium3216 5 жыл бұрын
Hey. thanks for the video. This is exactly what I am looking for. A couple of questions. VM's, LXC/ LXD, Application containers are in three separate physical machines? Can i run hypervisor, LXC/ LXD, Application container (Docker engine) on single host OS?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Vijay, thanks for watching this video. Yes you can run all of them in single host. Thanks.
@vijaychebium3216
@vijaychebium3216 5 жыл бұрын
@@justmeandopensource My problem is I can't ping the LXC container from Host OS. however, I am able to ping btw LXC containers and to the internet as well. I have attached OVS to my host OS.
@vijaychebium3216
@vijaychebium3216 5 жыл бұрын
Issue resolved after changing the lxc profile from macvlan to bridge
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@vijaychebium3216 glad that you resolved. When I did lxd init, the default network that was setup automatically was a bridge network. Thanks.
@vijaychebium3216
@vijaychebium3216 5 жыл бұрын
@@justmeandopensource How to change the LXC container storage (Dir) to btrfs?
@imena476
@imena476 5 жыл бұрын
What is the location of the created containers (lxc machine) because I don't find my containers in /var/lib/lxc (default location) ? Thanks in advance
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi, thanks for watching this video. It will be under /var/lib/lxd. If you used snap to install lxd, then it will be under /var/snap/lxd Thanks.
@imena476
@imena476 5 жыл бұрын
@@justmeandopensource thanks a lot for answering me BUT I don't have lxd directory in /var/lib and I'm not using snapshot either. I'm using Ubuntu 19.10 for instance and other lxc commands like : lxc-attach -n, lxc-destroy ...etc don't work either. Please help me! I have a homework to submit. Thanks in advance°° PS I'm the one thanking you for this awesome structured video, thanks°°
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@imena476 So lxc is the underlying library and lxd is the API layer through which we create and manage the containers. Have you installed lxd? $ sudo apt install lxd and did you initialize the lxd environment by running $ lxd init
@imena476
@imena476 5 жыл бұрын
@@justmeandopensource yes sir I did so
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@imena476 Okay. Were you able to launch a container successfully?
@chinmaygokhale1321
@chinmaygokhale1321 5 жыл бұрын
Is it possible to to install and run an arm Linux image using LXC on an x86 machine. If yes then I will you be able to make a tutorial for the same. Thanks in advance!!
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Chinmay, thanks for watching this video. It won't be possible to launch an arm container in a non-arm architecture host. I tested this. $ lxc launch images:centos/7/arm64 test Creating test Error: Failed container creation: Create container: Requested architecture isn't supported by this host Thanks
@jamallmahmoudi9481
@jamallmahmoudi9481 4 жыл бұрын
so usefullllllll.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. Cheers.
@ImbraWolf
@ImbraWolf Жыл бұрын
why is the virtual ethernet interface needed, does it even face out on the internet for people to see
@manikandans8808
@manikandans8808 5 жыл бұрын
while running this command # docker run --name mysql -e MYSQL_ROOT_PASSWORD=Zippyops@123 -d mysql it throws ERROR: mysqld failed while attempting to check config command was: "mysqld --verbose --help" mysqld: Can't read dir of '/etc/mysql/conf.d/' (OS errno 13 - Permission denied) mysqld: [ERROR] Fatal error in defaults handling. Program aborted! i used the lxd profile file that used for k8s. But when i run the same command in my bare it works fine. Can you pls figure out the problem
@justmeandopensource
@justmeandopensource 5 жыл бұрын
I just tried and it worked perfectly fine. I tried the mysql latest tag and it started fine. No errors like you mentioned. But I wasn't able to access mysql from command line due to some library missing for password authentication on the lxc container. But I could use mysql:5.7 version which worked perfectly fine. I could connect to it. Check my output in the below link. pastebin.com/SuVK0TCv Thanks
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Mani, did you get it working?
@amrhegazy7221
@amrhegazy7221 4 жыл бұрын
what's diff between lxc start command or lxc-start command ?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Amr, thanks for watching. lxc start actually talks to lxd using REST interface whereas lxc-start doesn't use lxd API layer but interacts directly using lxc libraries.
@avimehenwal
@avimehenwal 5 жыл бұрын
Is there any analogous file for LXC like docker has DOCKERFILE?
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Avi, thanks for watching this video. I have seen few github projects for that. But I haven't tried any of them. Thanks.
@avimehenwal
@avimehenwal 5 жыл бұрын
@@justmeandopensource Thanks for your quick reply :) I have been using docker for some time and I more familiar with the tooling that comes along with docker toolchain. Just another curious question if you would like to answer it. Is there any special use-case(s) where LXC containers beats (or stands apart) from other container technology especially docker ? For me, I see provisioning LXC containers (with apps and services) could be a problem
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@avimehenwal Hi, apologies for the late reply as the comment was flagged as spam and I didn't get the notification. Right, LXC and Docker have different usecases. LXC is a light-weight Linux environment that uses the host Operating systems capabilities. You can use it as a complete virtual machine. Whereas Docker is used primarily for application isolation. You package your application into container along with all the dependencies into it, so that it can run on any machine with docker runtime installed. With Docker, you run a single service inside a container. It is for packaging your application. And LXC is a complete virtual machine without hypervisor layer. What problem do you see with apps and services in LXC containers? Thanks
@avimehenwal
@avimehenwal 5 жыл бұрын
@@justmeandopensource Like I still do not know how to package it, I read there is something like snapshot and external tool like ansible could be use to provision LXC with apps and service we want, I am just not sure if there is any LXC-way of saving our images and reusing them in future
@justmeandopensource
@justmeandopensource 5 жыл бұрын
@@avimehenwal Hi, see if this helps. Creating snapshot, exporting it as tarball, then importing the tarball on another server and init'ing the image. discuss.linuxcontainers.org/t/backup-the-container-and-install-it-on-another-server/463/2 Thanks