Linux Container container is a kernel virtualization technology, referred to as LXC, is a lightweight virtualization means, then how to install and deploy LXC? The following small series will introduce you to the installation and deployment method of LXC under Linux.
LXC Linux container tools is the Chinese name, the container can provide lightweight virtualization to isolate processes and resources, the advantages of using LXC is no need to install a lot of software packages, the course also It does not take up too much resources. This article introduces the establishment and management methods of LXC and the setting methods of virtual network interfaces step by step.
LXC relies on the cgroups (Control Groups) system of the Linux kernel for resource management. The cgroups system is a process group-based resource management framework provided by the Linux kernel that limits the resources available for a specific process group. . It was originally proposed by Google engineers and later integrated into the Linux kernel. Cgroups is also a resource management tool used by LXC to implement virtualization. LXC is now in the Linux kernel, which means LXC technology will be the most competitive lightweight virtual container technology available today.
1. Set up the first LXC virtual machine
#yum install lxc*
2. After installing the package, check the kernel support for LXC in the Linux distribution. You can use the following command
#lxc-checkconfig
#lxc-checkconfig After the command is checked, if all items show "ld"; enabled” means you can use LXC directly
3. Create A fedora Server LXC virtual computer system
#lxc-create -t fedora -n testA
#here is a fedora template, template files are saved in /usr/lib/lxc/templates/Directory
After the above command is completed, the virtual machine testA
will be generated in the /var/lib/lxc directory. 4. Check the created virtual machine system
#tree - L 2 /var/lib/lxc/
5, start the LXC virtual machine
# lxc-start -n testA
After confirming the account and password, log in to the virtual machine
>
6. List all containers in the current system
# lxc-ls
7. Use console to board Container
#lxc-console -n testA –t 3
8. Stop running a container
# lxc-stop -n testA
9 Get the state of a container
# lxc-info -n ol6ctr1
10. Destroy a container
# lxc-destroy -n testA1
11. Copy a container
# lxc-clone -o testA -n ol6ctr2
12. Pause or resume a container
# lxc-freeze -n testA
# lxc-unfreeze -n testA
13. Modify the LXC network interface
# vi /etc/default/lxc
# Restart the network after the user changes Service
#service lxc-net restart
The above is the introduction of the LXC installation method in Linux system. LXC has entered the Linux kernel and it is necessary to build LXC for Linux system. If you want to install LXC, let's take a look.
Recently, some users have reported an abnormality after installing Ubuntu in VM Vir
In many Linux commands, the cut command can be used to intercept file information and intercept Linu
In the KDE desktop environment of Ubuntu system, many users will encounter flashbac
After installation of CentOS 6.5, many people can not connect to the wireless network, most of the r
Linux system prompts can not get the lock /var/lib/dpkg/lock how to do?
How to solve the garbled problem after SecureCRT connects to Linux server
How to install OpenOffice on Linux system
How to configure LILO file for Red Flag Linux system
Solution for Docker container and host time out of sync
Summary of the usage of the Linux command less command
Instructions for using the Linux system xlsatom command
How to modify the image name in batches under Linux
What should I do when I prompt Unencrypted connection when Oracle Linux 5 remote telnet?
How Linux uses the shell to view all files in the directory and its subdirectories
How to verify SHA1 and MD5 in Linux system?
Linux system how to switch the foreground process and background process
Win10 IE browser frequently pops up the window warning "IE has stopped working" processing method
Win7 to the hard disk partition c disk too large how to do?
Windows system seven unique operation skills sharing
Win10 preview version 10586 updated what
How to modify my document save location in Windows7
How to set up win7 system prohibits any software installation
How win8 device manager scans hardware changes