mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 05:52:52 +08:00
更新 PVE 创建模板虚拟机
This commit is contained in:
+31
-6
@@ -208,6 +208,8 @@ Successfully imported disk as 'unused0:local-lvm:vm-1000-disk-0'
|
||||
|
||||
进入左侧虚拟机 `Cloud-Init` 菜单,可以看到当前虚拟机的初始化参数。
|
||||
|
||||
### 4.1.自动配置 IPv6
|
||||
|
||||
根据之前的网络规划,内网的 IP 地址段为 `172.16.1.0/24` ,因此模板虚拟机的参数如下。
|
||||
|
||||
|参数|值|说明|
|
||||
@@ -215,9 +217,9 @@ Successfully imported disk as 'unused0:local-lvm:vm-1000-disk-0'
|
||||
|用户|fox|新系统的管理员账户|
|
||||
|密码|********|使用强密码|
|
||||
|DNS域|fox.local|内网域名(可选)|
|
||||
|DNS服务器|`172.16.1.1 fdac::1 127.0.0.1`|本机DNS服务器,用空格隔开|
|
||||
|DNS服务器|`172.16.1.1 127.0.0.1`|本机DNS服务器,用空格隔开|
|
||||
|SSH公钥|无|使用秘钥登录服务器,暂不使用|
|
||||
|IP配置(net0)|`ip=172.16.1.250/24,gw=172.16.1.1,ip6=fdac::fa/64`|模板的 IP 设置|
|
||||
|IP配置(net0)|`ip=172.16.1.250/24,gw=172.16.1.1,ip6=auto`|模板的 IP 设置|
|
||||
|
||||
**额外说明:**
|
||||
|
||||
@@ -225,11 +227,34 @@ Successfully imported disk as 'unused0:local-lvm:vm-1000-disk-0'
|
||||
|
||||
2. 在 `DNS服务器` 设置部分,如果先设置了 `127.0.0.1` 作为 DNS 服务器,后续其他 DNS 的 IP 地址将被忽略。
|
||||
|
||||
3. 此时内网没有其他 DNS 服务器,因此将 `DNS服务器` 设置为 `172.16.1.1 fdac::1 127.0.0.1` ,IP 之间用空格隔开。
|
||||
此时内网没有其他 DNS 服务器,因此将 `DNS服务器` 设置为 `172.16.1.1 127.0.0.1` ,IP 之间用空格隔开。
|
||||
|
||||
`Cloud-Init` 的 `IP配置` ,如下图所示。
|
||||

|
||||
|
||||

|
||||
`Cloud-Init` 的 `IP配置` ,IPv4 使用静态地址,IPv6 使用 `SLAAC` 自动配置,如下图所示。
|
||||
|
||||
设置完成后,模板虚拟机创建完成,可以将该虚拟机开机。
|
||||

|
||||
|
||||
### 4.2.手动配置 IPv6
|
||||
|
||||
当主路由配置了 ULA IPv6 网段,且希望指定内网 DNS 服务器的 ULA IPv6 地址时,需要调整 `Cloud-Init` 参数。
|
||||
|
||||
本文 ULA IPv6 演示地址为 `fdac::/64` ,`DNS服务器` 和 `IP配置` 参数调整如下。
|
||||
|
||||
|参数|值|说明|
|
||||
|--|--|--|
|
||||
|DNS服务器|`172.16.1.1 fdac::1 127.0.0.1`|本机DNS服务器,用空格隔开|
|
||||
|IP配置(net0)|`ip=172.16.1.250/24,gw=172.16.1.1,ip6=fdac::fa/64`|模板的 IP 设置|
|
||||
|
||||
`DNS服务器` 参数中需要加入主路由 LAN 口 ULA IPv6 地址。
|
||||
|
||||

|
||||
|
||||
`IP配置` 参数,IPv4 使用静态地址,IPv6 同样使用静态地址,如下图所示。
|
||||
|
||||
IPv6 使用静态地址后,并不影响虚拟机通过主路由获取公网 GUA IPv6 地址。
|
||||
|
||||

|
||||
|
||||
至此,模板虚拟机创建完成,可以将该虚拟机开机。
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Reference in New Issue
Block a user