1.
LXC架构 重装系统
进入ssh后,输入下列命令 (如是centos系统,请把apt换成yum,其他系统参照系统命令)
apt -y install wget && wget -qO OsMutation.sh https://raw.githubusercontent.com/LloydAsp/OsMutation/main/OsMutation.sh && chmod u+x OsMutation.sh && ./OsMutation.sh
架构选择 LXC,后自行选择系统重装,提示重启时选择 yes 重启即可
如提示 wget: command not found
请根据系统安装:
Centos系:yum -y install wget
Debian/Ubuntu:apt -y install wget
alpine:add apk wget -y

2.
openVZ / LXC
特点
- 支持OpenVZ和LXC虚拟化技术
- 支持Debian/CentOS/Alpine等多种系统的相互转换(及原地tp
使用
wget -qO OsMutation.sh https://raw.githubusercontent.com/LloydAsp/OsMutation/main/OsMutation.sh && chmod u+x OsMutation.sh && ./OsMutation.sh
或者
curl -so OsMutation.sh https://raw.githubusercontent.com/LloydAsp/OsMutation/main/OsMutation.sh && chmod u+x OsMutation.sh && ./OsMutation.sh
原理
对于容器而言,其内核共享宿主机内核,自身打包了操作系统,应用和函数库等所有依赖。原理上只要替换对应的数据就可以替换系统,只不过要注意操作顺序,避免依赖关系冲突
注意
- 会抹除数据,因此如果有重要数据自行备份
- 支持openvz 7,不支持openvz 6
- 同时支持 OpenVZ 7 和 LXC
- 支持重装到多个操作系统
- openvz和lxc等容器虚拟化技术,不支持kvm等虚拟机技术