From 3051eb7e2edeaeb885744af6a39845b9198fe77a Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sun, 31 Dec 2023 09:29:18 +0000 Subject: [PATCH] update --- docs/en_US/guide/pve_kvm.md | 25 ++++++++++++++----------- docs/en_US/guide/pve_lxc.md | 25 ++++++++++++++----------- docs/guide/pve_kvm.md | 33 ++++++++++++++++++++++----------- docs/guide/pve_lxc.md | 33 ++++++++++++++++++++++----------- 4 files changed, 72 insertions(+), 44 deletions(-) diff --git a/docs/en_US/guide/pve_kvm.md b/docs/en_US/guide/pve_kvm.md index 8e728a71cf..d9930a5d76 100644 --- a/docs/en_US/guide/pve_kvm.md +++ b/docs/en_US/guide/pve_kvm.md @@ -125,7 +125,7 @@ Below is the information for the example VM that has been set up: | Host Storage Disk | local | | IPV6 address | N | -### Deletion Examples +## Deletion specific VM - Stop VM - Delete VM @@ -133,19 +133,22 @@ Below is the information for the example VM that has been set up: - Restart network - Delete log files +**Download Script** + ```shell -qm stop 102 -qm destroy 102 -iptables -t nat -F -iptables -t filter -F -service networking restart -systemctl restart networking.service -systemctl restart ndpresponder.service -iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore -iptables-save > /etc/iptables/rules.v4 -rm -rf vm102 +curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh ``` +**Meaning of each parameter** + +You can delete the VM with the corresponding VMID, as demonstrated here using the example 102 above + +```shell +./pve_delete.sh 102 +``` + +The actual number of deletions is not fixed, a space separates each VMID, and more than one can be deleted at a time. + ## Batch Creation of Virtual Machines with KVM Virtualization and NAT :::warning diff --git a/docs/en_US/guide/pve_lxc.md b/docs/en_US/guide/pve_lxc.md index 94f17c342e..0fb89e5239 100644 --- a/docs/en_US/guide/pve_lxc.md +++ b/docs/en_US/guide/pve_lxc.md @@ -80,7 +80,7 @@ Please note that "CT" and other technical terms might have specific meanings in | Host Storage Disk | local | | IPV6 address | N | -### Deletion Examples +## Deletion specific CT - Stop CT - Delete CT @@ -88,19 +88,22 @@ Please note that "CT" and other technical terms might have specific meanings in - Restart Network - Delete Log Files +**Download Script** + ```shell -pct stop 102 -pct destroy 102 -rm -rf ct102 -iptables -t nat -F -iptables -t filter -F -service networking restart -systemctl restart networking.service -systemctl restart ndpresponder.service -iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore -iptables-save > /etc/iptables/rules.v4 +curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh ``` +**Meaning of each parameter** + +You can delete the CT with the corresponding CTID, as demonstrated here using the example 102 above + +```shell +./pve_delete.sh 102 +``` + +The actual number of deletions is not fixed, a space separates each CTID, and more than one can be deleted at a time. + ## Batch Creation of LXC Containers with NAT :::warning diff --git a/docs/guide/pve_kvm.md b/docs/guide/pve_kvm.md index 1d056d11b5..129a7d9e09 100644 --- a/docs/guide/pve_kvm.md +++ b/docs/guide/pve_kvm.md @@ -142,7 +142,7 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/p | 宿主机的存储盘 | local | | 绑定独立IPV6(留空默认N) | N | -### 删除示例 +## 删除指定虚拟机 - 停止VM - 删除VM @@ -150,19 +150,30 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/p - 重启网络 - 删除log文件 +**下载脚本** + +国际 + ```shell -qm stop 102 -qm destroy 102 -iptables -t nat -F -iptables -t filter -F -service networking restart -systemctl restart networking.service -systemctl restart ndpresponder.service -iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore -iptables-save > /etc/iptables/rules.v4 -rm -rf vm102 +curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh ``` +国内 + +```shell +curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh +``` + +**使用方法** + +可以删除对应VMID的虚拟机,这里用上文中的示例102做演示 + +```shell +./pve_delete.sh 102 +``` + +实际删除数量不固定,空格分隔每个VMID即可,可一次性删除多个 + ## 批量开设NAT的KVM虚拟化的虚拟机 :::warning diff --git a/docs/guide/pve_lxc.md b/docs/guide/pve_lxc.md index fcfb1c9bb2..0ca75fff30 100644 --- a/docs/guide/pve_lxc.md +++ b/docs/guide/pve_lxc.md @@ -86,7 +86,7 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/p | 宿主机的存储盘 | local | | IPV6 | 无 | -### 删除示例 +## 删除指定容器 - 停止CT - 删除CT @@ -94,19 +94,30 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/p - 重启网络 - 删除log文件 +**下载脚本** + +国际 + ```shell -pct stop 102 -pct destroy 102 -rm -rf ct102 -iptables -t nat -F -iptables -t filter -F -service networking restart -systemctl restart networking.service -systemctl restart ndpresponder.service -iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore -iptables-save > /etc/iptables/rules.v4 +curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh ``` +国内 + +```shell +curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh +``` + +**使用方法** + +可以删除对应CTID的容器,这里用上文中的示例102做演示 + +```shell +./pve_delete.sh 102 +``` + +实际删除数量不固定,空格分隔每个CTID即可,可一次性删除多个 + ## 批量开设NAT的LXC虚拟化的CT :::warning