Update README.md

This commit is contained in:
spiritLHLS 2023-04-23 08:35:50 +08:00 committed by GitHub
parent 08518921d9
commit cde5432b41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,7 +180,7 @@ cat vm102
#### 删除示例
- 删除端口映射删除测试机器
删除端口映射删除测试的虚拟机和log文件
```
qm stop 102
@ -225,6 +225,8 @@ cat vmlog
#### 删除所有虚拟机
删除所有nat的端口映射并重启网络删除所有虚拟机和log文件
```
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
@ -287,11 +289,15 @@ cat ct102
#### 删除所有CT
以下命令将删除所有CT和所有的log文件
以下命令将删除所有CT和所有的log文件删除所有nat的端口映射并重启网络
```
pct list | awk 'NR>1{print $1}' | xargs -I {} sh -c 'pct stop {}; pct destroy {}'
rm -rf ct*
iptables -t nat -F
iptables -t filter -F
service networking restart
systemctl restart networking.service
```
## 致谢