Virtualization using LXC: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 31: | Line 31: | ||
=Preparing lxc Host= | =Preparing lxc Host= | ||
*ssh from local machine to the lxc host | |||
; <code> ssh kedar@172.16.149.176 </code> | |||
*Ensure infrabase1 (host server) is updated with latest patches and updates | *Ensure infrabase1 (host server) is updated with latest patches and updates | ||
<code> | ;; <code> sudo apt update && sudo apt upgrade -y </code> | ||
*Remove unwanted software | |||
; <code> sudo apt autoremove </code> | |||
* Restart the host server | |||
; <code> sudo init 6 </code> | |||
<youtube width="470" height="240">h2Yt-3GkgkY</youtube> | |||
=Installing lxc= | =Installing lxc= | ||
*Install lxc using the ubuntu repositories | |||
; <code> sudo apt install lxc </code> | |||
<youtube width="470" height="240">rOmLldPI-A0</youtube> | |||
=Creating Containers= | =Creating Containers= | ||
=Useful commands= | =Useful commands= |
Revision as of 08:28, 8 January 2020
LXC Host Details |
hostname: infrabase1 Network: 172.16.149.128/25 IP Address : 172.16.149.176 Subnet Mask: 255.255.255.128 Gateway: 172.16.176.129 DNS: 8.8.8.8 Domain search: networked.net, bamboo.com Operating System: Ubuntu 18.04 server sudo user: kedar FTP Client: Filezilla ssh client: terminal, reminna Text editors: gedit, sublime-text <strongUser PC Details</strong> PC type: Desktop OS: Ubuntu Desktop IP Address: 172.16.162.65 sudo user:kedar |
Introduction
LXC (Linux Containers) is an operating system level virtualization method for running several isolated Linux systems (containers) on a host running a linux operating system. The containers use the kernel of the host operating system and hence lxc does not have to virtualize the entire hardware of the host. Containers are relatively low on resource requirement and a singe host has the ability to run a very dense container environment, running several containers as opposed to a conventional KVM based virtualization. More information is available on here.
Preparing lxc Host
- ssh from local machine to the lxc host
ssh kedar@172.16.149.176
- Ensure infrabase1 (host server) is updated with latest patches and updates
sudo apt update && sudo apt upgrade -y
- Remove unwanted software
sudo apt autoremove
- Restart the host server
sudo init 6
Installing lxc
- Install lxc using the ubuntu repositories
sudo apt install lxc