LXC (Linux Containers) is an OS-level virtualization technology that allows the creation and running of multiple isolated Linux virtual environments (VE) on a single control host. These isolation levels or containers can be used to either sandbox specific applications, or to emulate an entirely new host. LXC uses Linux’s cgroups functionality, which was introduced in version 2.6.24 to allow the host CPU to better partition memory allocation into isolation levels called namespaces.
– Note that a VE is distinct from a virtual machine (VM)
There are two possibilities to start a container:
either on the GUI or on the command line
——#pct start 100
Stopping a container can be done in a similar way as starting a container.
—– #pct stop 100
3)To list container on LXC
——root@pve:/# pct list
4)Add network configuration via the GUI
Add network configuration based on the original settings
LXCs uses virtual network adapter which are bridged to the physical interface of your host. This works very similar to the way veth devices work in OpenVZ.
In Proxmox VE 3.x the configuration of each container using a veth device had to be done inside the container. In Proxmox VE 4.x you can do this directly from the host.
For each container: Select the container by clicking on it
Go to the Network tab
Click Add device
On the veth device panel, add a device with the parameters:
put your IP address and the corresponding netmask in the following format 192.168.5.75/24
Add network configuration via the CLI
pct set 101 -net0 name=eth0,bridge=vmbr0,ip=192.1xx.xx.144/24,gw=192.xxx.15.x
pct set 102 -net0 name=eth0,bridge=vmbr0,ip=192.xxx.xx.145/24,gw=192.xx.15.x
Note: This can also be done traditionally using any of the text editor.
iface eth0 inet static
5)How to enter a container
#pct enter 100
I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.