Install LXC packages
[root@lxcserver ~]# apt-get update
[root@lxcserver ~]# apt-get install lxc lxc-templates
Create LXC container
[root@lxcserver ~]# lxc-create -n www1 -t ubuntu
Start the LXC container
[root@lxcserver ~]# lxc-start -n www1 -d
Reset password LXC container
[root@lxcserver ~]# chroot /var/lib/lxc/www1/rootfs passwd
Enter the console
[root@lxcserver ~]# lxc-console -n www1 -t 0
https://www.alibabacloud.com/blog/how-to-install-and-configure-lxc-container-on-ubuntu-16-04_594090
https://unixmen.com/setup-linux-containers-using-lxc-on-ubuntu-15-04/
[root@lxcserver ~]# apt-get update
[root@lxcserver ~]# apt-get install lxc lxc-templates
Create LXC container
[root@lxcserver ~]# lxc-create -n www1 -t ubuntu
Start the LXC container
[root@lxcserver ~]# lxc-start -n www1 -d
Reset password LXC container
[root@lxcserver ~]# chroot /var/lib/lxc/www1/rootfs passwd
Enter the console
[root@lxcserver ~]# lxc-console -n www1 -t 0
https://www.alibabacloud.com/blog/how-to-install-and-configure-lxc-container-on-ubuntu-16-04_594090
https://unixmen.com/setup-linux-containers-using-lxc-on-ubuntu-15-04/
Comments
Post a Comment