mirror of
https://github.com/thelittlerocket/pve.git
synced 2024-11-15 03:24:54 +08:00
Update README.md
This commit is contained in:
parent
1794812090
commit
547f5678b1
1 changed files with 18 additions and 3 deletions
21
README.md
21
README.md
|
@ -40,6 +40,8 @@
|
|||
* [如何使用](#如何使用)
|
||||
* [CT示例](#CT示例)
|
||||
* [删除所有CT](#删除所有CT)
|
||||
* [批量开设NAT的LXC虚拟化的CT](#批量开设NAT的LXC虚拟化的CT)
|
||||
* [一键命令](#一键命令)
|
||||
* [致谢](#致谢)
|
||||
|
||||
### 系统要求与配置
|
||||
|
@ -271,12 +273,12 @@ curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildct.sh
|
|||
|
||||
测试开一个NAT的LXC虚拟化的容器
|
||||
|
||||
以下示例开设CTID为102的容器,用户名是root,密码是1234567,CPU是1核,内存是512MB,硬盘是5G,SSH端口是40001,80端口是40002,443端口是40003
|
||||
以下示例开设CTID为102的容器,用户名是root,密码是1234567,CPU是1核,内存是512MB,硬盘是5G,SSH端口是20001,80端口是20002,443端口是20003
|
||||
|
||||
同时内外网映射端口一致的区间是50000到50025,系统使用的是debian10
|
||||
同时内外网映射端口一致的区间是30000到30025,系统使用的是debian10
|
||||
|
||||
```
|
||||
./buildct.sh 102 1234567 1 512 5 40001 40002 40003 50000 50025 debian10
|
||||
./buildct.sh 102 1234567 1 512 5 20001 20002 20003 30000 30025 debian10
|
||||
```
|
||||
|
||||
开设完毕可执行
|
||||
|
@ -300,6 +302,19 @@ service networking restart
|
|||
systemctl restart networking.service
|
||||
```
|
||||
|
||||
## 批量开设NAT的LXC虚拟化的CT
|
||||
|
||||
#### 一键命令
|
||||
|
||||
- **初次使用前需要保证当前PVE未有任何CT容器未有进行任何端口映射,否则可能出现BUG**
|
||||
- **开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断,推荐使用PVE自带的Shell操作母鸡**
|
||||
- 可多次运行批量生成VM,但需要注意的是母鸡内存记得开点swap免得机器炸了[开SWAP点我跳转](https://github.com/spiritLHLS/addswap)
|
||||
- 可自定义批量开设的核心数,内存大小,硬盘大小,记得自己计算好空闲资源开设
|
||||
|
||||
```
|
||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh
|
||||
```
|
||||
|
||||
## 致谢
|
||||
|
||||
https://blog.ilolicon.com/archives/615
|
||||
|
|
Loading…
Reference in a new issue