Archived
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81ad54cbe9 | ||
|
|
33518cec15 |
+4
-4
@@ -150,18 +150,18 @@ PVE 必须选择一个管理网口,默认情况下,PVE 会使用编号较小
|
||||
|
||||

|
||||
|
||||
根据我们之前的规划,对 PVE 的管理 IP(`172.16.1.250`)进行设置。
|
||||
根据我们之前的规划,对 PVE 的管理 IP(`172.16.1.254`)进行设置。
|
||||
|
||||
需要说明的是 `Hostname` ,即 PVE 主机的名称,PVE 将使用输入的 “二级域名” 的名称作为自己的名称。
|
||||
|
||||
演示内容输入的为 `hyper.fox.lab` ,因此 PVE 获取的主机名称为 `hyper` 。
|
||||
演示内容输入的为 `node01.fox.local` ,因此 PVE 获取的主机名称为 `node01` 。
|
||||
|
||||
我们规划未来主路由的IP地址为 `172.16.1.1` ,因此我们网关和 DNS 地址均使用该地址。
|
||||
|
||||
- Hostname (FQDN)
|
||||
- hyper.fox.lab
|
||||
- node01.fox.local
|
||||
- IP Address (CIDR)
|
||||
- 172.16.1.250/24
|
||||
- 172.16.1.254/24
|
||||
- Gateway
|
||||
- 172.16.1.1
|
||||
- DNS Server
|
||||
|
||||
+2
-2
@@ -200,9 +200,9 @@ update-pciids
|
||||
在设置 PVE 的网络之前,需要对网络内部结构做一个规划。
|
||||
|
||||
在前篇的网络地址段规划时,我们有如下规划内容:
|
||||
- PVE IP: `172.16.1.250/24` (IPv6: `fc00::fa/64` )
|
||||
- PVE IP: `172.16.1.254/24` (IPv6: `fdac::fe/64` )
|
||||
- PVE 网关: `172.16.1.1` (IPv6 网关将使用 `Link-Local Address` 自动配置)
|
||||
- PVE DNS: `172.16.1.1` (IPv6 DNS: `fc00::1` )
|
||||
- PVE DNS: `172.16.1.1` (IPv6 DNS: `fdac::1` )
|
||||
|
||||
我们预计在 PVE 内部安装 RouterOS 用于主路由,2 个 Adguard Home 虚拟机用于提供内网的 DNS 服务以及去广告,且 RouterOS 需要能让 PVE 自身访问外网。
|
||||
|
||||
|
||||
+4
-4
@@ -251,7 +251,7 @@ systemctl status apt-daily-upgrade.timer
|
||||
Trigger: Thu 2022-07-17 06:52:50 CST; 13h left
|
||||
Triggers: ● apt-daily-upgrade.service
|
||||
|
||||
Jul 16 12:03:53 hyper systemd[1]: Started Daily apt upgrade and clean activities.
|
||||
Jul 16 12:03:53 node01 systemd[1]: Started Daily apt upgrade and clean activities.
|
||||
```
|
||||
|
||||
我们后续将手动调整该定时器的时间为,每 10 天的凌晨 02:00 进行触发。
|
||||
@@ -360,9 +360,9 @@ systemctl status apt-daily-upgrade.timer
|
||||
Trigger: Thu 2022-07-21 02:00:00 CST; 8h left
|
||||
Triggers: ● apt-daily-upgrade.service
|
||||
|
||||
Jul 20 17:36:40 hyper systemd[1]: Stopped Daily apt upgrade and clean activities.
|
||||
Jul 20 17:36:40 hyper systemd[1]: Stopping Daily apt upgrade and clean activities.
|
||||
Jul 20 17:36:40 hyper systemd[1]: Started Daily apt upgrade and clean activities.
|
||||
Jul 20 17:36:40 node01 systemd[1]: Stopped Daily apt upgrade and clean activities.
|
||||
Jul 20 17:36:40 node01 systemd[1]: Stopping Daily apt upgrade and clean activities.
|
||||
Jul 20 17:36:40 node01 systemd[1]: Started Daily apt upgrade and clean activities.
|
||||
```
|
||||
|
||||
至此 PVE 的系统调整已经完成,重启设备后,可以愉快使用了。
|
||||
|
||||
+4
-4
@@ -208,10 +208,10 @@ Successfully imported disk as 'unused0:local-lvm:vm-1000-disk-1'
|
||||
|--|--|--|
|
||||
|用户|fox|新系统的管理员账户|
|
||||
|密码|********|使用强密码|
|
||||
|DNS域|fox.lab|内网域名(可选)|
|
||||
|DNS服务器|`172.16.1.1 fc00::1`|本机DNS服务器,用空格隔开|
|
||||
|DNS域|fox.local|内网域名(可选)|
|
||||
|DNS服务器|`172.16.1.1 fdac::1 127.0.0.1`|本机DNS服务器,用空格隔开|
|
||||
|SSH公钥|无|使用秘钥登录服务器,暂不使用|
|
||||
|IP配置(net0)|`ip=172.16.1.240/24,gw=172.16.1.1,ip6=fc00::f0/64`|模板的 IP 设置|
|
||||
|IP配置(net0)|`ip=172.16.1.250/24,gw=172.16.1.1,ip6=fdac::fa/64`|模板的 IP 设置|
|
||||
|
||||
**说明:**
|
||||
|
||||
@@ -219,7 +219,7 @@ Successfully imported disk as 'unused0:local-lvm:vm-1000-disk-1'
|
||||
|
||||
在 `DNS服务器` 设置部分,如果先设置了 `127.0.0.1` 作为虚拟机 DNS 服务器,后续其他 DNS 的 IP 地址将被虚拟机忽略。
|
||||
|
||||
此时内网没有其他 DNS 服务器存在,因此 `DNS服务器` 先设置为 `172.16.1.1 fc00::1` ,IP 之间用空格隔开。
|
||||
此时内网没有其他 DNS 服务器存在,因此 `DNS服务器` 先设置为 `172.16.1.1 fdac::1 127.0.0.1` ,IP 之间用空格隔开。
|
||||
|
||||
在使用 Debian 模板克隆出新虚拟机之后,再对新虚拟机调整 IP 设置比较好。
|
||||
|
||||
|
||||
+6
-6
@@ -540,8 +540,8 @@ iface ens18 inet static
|
||||
address 172.16.1.2/24
|
||||
gateway 172.16.1.1
|
||||
# dns-* options are implemented by the resolvconf package, if installed
|
||||
dns-nameservers 172.16.1.3
|
||||
dns-search fox.lab
|
||||
dns-nameservers 172.16.1.2
|
||||
dns-search fox.local
|
||||
```
|
||||
|
||||
检查系统的 `hosts` ,执行以下命令:
|
||||
@@ -553,7 +553,7 @@ cat /etc/hosts
|
||||
## 示例输出
|
||||
|
||||
127.0.0.1 localhost
|
||||
172.16.1.2 dns001.fox.lab dns001
|
||||
172.16.1.2 dns01.fox.local dns01
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 localhost ip6-localhost ip6-loopback
|
||||
@@ -571,9 +571,9 @@ sudo vim /etc/resolv.conf
|
||||
在编辑器对话框中输入以下内容,注意命令中间的空格:
|
||||
|
||||
```bash
|
||||
search fox.lab
|
||||
nameserver 172.16.1.3
|
||||
nameserver fc00::3
|
||||
search fox.local
|
||||
nameserver 172.16.1.2
|
||||
nameserver fdac::2
|
||||
nameserver 127.0.0.1
|
||||
```
|
||||
|
||||
|
||||
+7
-7
@@ -12,9 +12,9 @@
|
||||
|
||||
|参数|值|说明|
|
||||
|--|--|--|
|
||||
|目标节点|hyper|当前 PVE 服务器节点|
|
||||
|目标节点|node01|当前 PVE 服务器节点|
|
||||
|VM ID|501|可自由定义,不能与现存虚拟机 `VM ID` 相同|
|
||||
|名称|DNS001|可自由定义,`Cloud-Init` 将使用该名称作为虚拟机 `hostname` |
|
||||
|名称|DNS01|可自由定义,`Cloud-Init` 将使用该名称作为虚拟机 `hostname` |
|
||||
|模式|完整克隆|选择虚拟机的克隆模式|
|
||||
|目标存储|local-lvm|克隆出的虚拟机文件存储位置|
|
||||
|
||||
@@ -27,20 +27,20 @@
|
||||
克隆出来的虚拟机的 `Cloud-Init` 参数默认与模板完全一致。
|
||||
|
||||
根据之前的网络规划,内网 DNS 服务器 IP 地址分别为:
|
||||
- `172.16.1.2/24 (fc00::2/64)`
|
||||
- `172.16.1.3/24 (fc00::3/64)`
|
||||
- `172.16.1.2/24 (fdac::2/64)`
|
||||
- `172.16.1.3/24 (fdac::3/64)`
|
||||
|
||||
因此需要调整新虚拟机的 `Cloud-Init` 参数:
|
||||
|
||||

|
||||
|
||||
- `DNS服务器` 参数为 `172.16.1.3 fc00::3 127.0.0.1`
|
||||
- `DNS服务器` 参数为 `172.16.1.3 fdac::3 127.0.0.1`
|
||||
- `IP配置` 中的 IPv4 地址参数为 `172.16.1.2/24` ,网关保持 `172.16.1.1` 不变
|
||||
- `IP配置` 中的 IPv6 地址参数为 `fc00::2/64` ,网关保持为空
|
||||
- `IP配置` 中的 IPv6 地址参数为 `fdac::2/64` ,网关保持为空
|
||||
|
||||
这样设置的用意是,让内网两台 DNS 服务器相互提供 DNS 服务。
|
||||
|
||||
但如果内网中仅需一台 DNS 服务器,则 `DNS服务器` 参数可设为本机地址,即 `172.16.1.2 fc00::2 127.0.0.1` 。
|
||||
但如果内网中仅需一台 DNS 服务器,则 `DNS服务器` 参数可设为本机地址,即 `172.16.1.2 fdac::2 127.0.0.1` 。
|
||||
|
||||
此处需要注意的是,如果修改了 `用户` 参数,相当于新建了一个系统管理员,之前设置的 `oh-my-zsh` 需要在新管理员下重新设置。
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
|参数|值|说明|
|
||||
|--|--|--|
|
||||
|节点|hyper|选择当前 PVE 服务器节点|
|
||||
|节点|node01|选择当前 PVE 服务器节点|
|
||||
|存储|local|选择存放备份文件的路径|
|
||||
|计划|`*-01,16 03:30`|备份作业执行的时间计划|
|
||||
|选择模式|包括选中的VMs|执行备份的虚拟机对象|
|
||||
|
||||
Reference in New Issue
Block a user