2023-02-24 14:33:37 +08:00
|
|
|
|
|
2023-04-09 23:26:32 +08:00
|
|
|
|
### 存档的脚本 - 勿要使用 - 全是BUG
|
2023-04-03 21:51:13 +08:00
|
|
|
|
|
|
|
|
|
#### pve6.4升级为最新的pve7.x
|
|
|
|
|
|
|
|
|
|
自测中,勿要使用,未完成
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/pve6_to_pve7.sh -o pve6_to_pve7.sh && chmod +x pve6_to_pve7.sh && bash pve6_to_pve7.sh
|
|
|
|
|
```
|
2023-04-09 01:21:07 +08:00
|
|
|
|
|
2023-04-10 22:38:36 +08:00
|
|
|
|
### 加载系统模板
|
|
|
|
|
|
|
|
|
|
- 加载KVM或LXC模板到PVE的ISO/CT列表中(debian11,ubuntu20)
|
|
|
|
|
- 加载完成后请web端查看 pve > local(pve) > ISO Images/CT Templates 刷新一下记录,直接去创建虚拟机是可能看不到已加载的
|
2023-04-09 01:21:07 +08:00
|
|
|
|
|
|
|
|
|
```
|
2023-04-10 22:38:36 +08:00
|
|
|
|
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/install_iso.sh -o install_iso.sh && chmod +x install_iso.sh && bash install_iso.sh
|
2023-04-09 01:21:07 +08:00
|
|
|
|
```
|
2023-04-09 23:26:32 +08:00
|
|
|
|
|
2023-04-10 22:38:36 +08:00
|
|
|
|
### 替换qcow2
|
2023-04-09 23:26:32 +08:00
|
|
|
|
|
|
|
|
|
```
|
2023-04-10 22:38:36 +08:00
|
|
|
|
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/back/rebuild.sh -o rebuild.sh && chmod +x rebuild.sh && bash rebuild.sh
|
|
|
|
|
```
|
2023-04-17 20:25:54 +08:00
|
|
|
|
|
2023-05-05 11:24:46 +08:00
|
|
|
|
```
|
|
|
|
|
guestfish -a xxx -i -c "cat /etc/ssh/sshd_config"
|
|
|
|
|
```
|
|
|
|
|
|
2023-05-07 11:08:50 +08:00
|
|
|
|
```
|
|
|
|
|
qm exec 虚拟机ID /bin/bash
|
|
|
|
|
```
|
|
|
|
|
|
2023-05-11 12:12:30 +08:00
|
|
|
|
### 卸载所有虚拟机
|
2023-04-17 20:25:54 +08:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
|
|
|
|
|
iptables -t nat -F
|
|
|
|
|
iptables -t filter -F
|
|
|
|
|
service networking restart
|
|
|
|
|
systemctl restart networking.service
|
|
|
|
|
rm -rf vm*
|
|
|
|
|
```
|
2023-04-22 20:27:56 +08:00
|
|
|
|
|
2023-05-11 12:12:30 +08:00
|
|
|
|
### 卸载PVE整体环境
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/back/uninstallpve.sh -o uninstallpve.sh && chmod +x uninstallpve.sh && bash uninstallpve.sh
|
|
|
|
|
```
|
|
|
|
|
|