diff --git a/04.PVE创建模板虚拟机.md b/04.PVE创建模板虚拟机.md index 9c5404d..10e0c64 100644 --- a/04.PVE创建模板虚拟机.md +++ b/04.PVE创建模板虚拟机.md @@ -56,17 +56,13 @@ CPU `类别` 选择 `host` ,`插槽` 与 `核心` 数根据物理 CPU 核心 ### 1.7.网络 -在 [02.PVE初始化配置](./02.PVE初始化配置.md) 中,曾创建了一个没有桥接任何物理网口的内部网桥。 +通常情况下,模板虚拟机的 `桥接` 参数设为 PVE 管理口所在虚拟网桥即可。 -该内部网桥接口同属于主路由内部网桥成员接口。 - -因此,模板虚拟机的 `桥接` 参数可设置为该纯内部网桥。 +因在 [02.PVE初始化配置](./02.PVE初始化配置.md) 中曾创建未桥接物理网口的内部网桥,故可根据实际需求选择是否使用纯内部网桥作为该参数值。 ![虚拟机网口](img/p04/vm_network_port.jpeg) -由于演示环境中暂未安装主路由系统,因此选择其他网桥接口替代。 - -通常情况下无需使用 PVE 内建防火墙,因此 **取消勾选** 网络设备的 `防火墙` 选项。 +多数情况下,无需使用 PVE 内建防火墙,因此 **取消勾选** 网络设备的 `防火墙` 选项。 推荐在 `Multiqueue` 处根据前面设置的 CPU 核心数进行网卡多队列设置,设置比例为 1:1 。 @@ -104,10 +100,10 @@ $ cd /tmp/Debian ```bash ## 下载云镜像校验文件 -$ wget https://cloud.debian.org/images/cloud/trixie/latest/SHA512SUMS +$ curl -LR -O https://cloud.debian.org/images/cloud/trixie/latest/SHA512SUMS ## 下载云镜像 -$ wget https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2 +$ curl -LR -O https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2 ## 检查文件是否存在 $ ls -lah diff --git a/05.PVE制作虚拟机模板.md b/05.PVE制作虚拟机模板.md index 2714a87..ae5c989 100644 --- a/05.PVE制作虚拟机模板.md +++ b/05.PVE制作虚拟机模板.md @@ -108,7 +108,7 @@ $ sudo apt full-upgrade $ sudo apt install qemu-guest-agent btop curl tmux logrotate cron neovim zsh git ## 安装系统自动更新工具 -$ sudo apt install unattended-upgrades powermgmt-base python3-gi +$ sudo apt install unattended-upgrades powermgmt-base ## 安装网络工具 $ sudo apt install nftables sshguard lsof knot-dnsutils @@ -152,14 +152,15 @@ Debian 系统默认编辑器为 `nano` ,推荐将默认编辑器更换为 `neo $ sudo update-alternatives --config editor #### 系统默认编辑器示例输出 -There are 3 choices for the alternative editor (providing /usr/bin/editor). +There are 4 choices for the alternative editor (providing /usr/bin/editor). - Selection Path Priority Status + Selection Path Priority Status ------------------------------------------------------------ -* 0 /bin/nano 40 auto mode - 1 /bin/nano 40 manual mode - 2 /usr/bin/nvim 30 manual mode - 3 /usr/bin/vim.tiny 15 manual mode +* 0 /bin/nano 40 auto mode + 1 /bin/nano 40 manual mode + 2 /usr/bin/nvim 30 manual mode + 3 /usr/bin/vim.basic 30 manual mode + 4 /usr/bin/vim.tiny 15 manual mode Press to keep the current choice[*], or type selection number: 2 update-alternatives: using /usr/bin/nvim to provide /usr/bin/editor (editor) in manual mode @@ -231,7 +232,7 @@ $ sudo timedatectl set-timezone Asia/Shanghai $ date -R #### 系统时间示例输出 -Mon, 26 Jun 2023 16:16:16 +0800 +Wed, 27 Aug 2025 17:02:17 +0800 ``` Debian 云镜像默认使用 `systemd-timesyncd.service` 同步时间,且需要调整为使用国内 NTP 服务器。 @@ -273,21 +274,21 @@ $ sudo systemctl status systemd-timesyncd.service #### NTP 服务示例输出 ● systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; preset: enabled) - Active: active (running) since Tue 2025-08-12 17:09:38 CST; 8s ago - Invocation: ffb0d20e6a6649efb433fa290dc3286b + Active: active (running) since Wed 2025-08-27 17:03:13 CST; 6s ago + Invocation: 7dcb974725ac43638a4ae3df51644f84 Docs: man:systemd-timesyncd.service(8) - Main PID: 2820 (systemd-timesyn) + Main PID: 4540 (systemd-timesyn) Status: "Contacted time server 203.107.6.88:123 (ntp.aliyun.com)." - Tasks: 2 (limit: 4556) - Memory: 1.6M (peak: 2.6M) - CPU: 47ms + Tasks: 2 (limit: 2317) + Memory: 1.5M (peak: 2.2M) + CPU: 261ms CGroup: /system.slice/systemd-timesyncd.service - └─2820 /usr/lib/systemd/systemd-timesyncd + └─4540 /usr/lib/systemd/systemd-timesyncd -Aug 12 17:09:38 DNST01 systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization... -Aug 12 17:09:38 DNST01 systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization. -Aug 12 17:09:38 DNST01 systemd-timesyncd[2820]: Contacted time server 203.107.6.88:123 (ntp.aliyun.com). -Aug 12 17:09:38 DNST01 systemd-timesyncd[2820]: Initial clock synchronization to Tue 2025-08-12 17:09:38.425596 CST. +Aug 27 17:03:12 DNST01 systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization... +Aug 27 17:03:13 DNST01 systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization. +Aug 27 17:03:13 DNST01 systemd-timesyncd[4540]: Contacted time server 203.107.6.88:123 (ntp.aliyun.com). +Aug 27 17:03:13 DNST01 systemd-timesyncd[4540]: Initial clock synchronization to Wed 2025-08-27 17:03:13.200663 CST. ``` ### 1.8.配置自动更新 diff --git a/06.PVE制作DNS服务器.md b/06.PVE制作DNS服务器.md index 5520919..e058bd4 100644 --- a/06.PVE制作DNS服务器.md +++ b/06.PVE制作DNS服务器.md @@ -78,11 +78,11 @@ $ sudo lsof -n -i :53 #### 端口占用示例输出 -COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME -systemd-r 1797 systemd-resolve 18u IPv4 23024 0t0 UDP 127.0.0.53:domain -systemd-r 1797 systemd-resolve 19u IPv4 23025 0t0 TCP 127.0.0.53:domain (LISTEN) -systemd-r 1797 systemd-resolve 20u IPv4 23026 0t0 UDP 127.0.0.54:domain -systemd-r 1797 systemd-resolve 21u IPv4 23027 0t0 TCP 127.0.0.54:domain (LISTEN) +COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME +systemd-r 357 systemd-resolve 18u IPv4 3293 0t0 UDP 127.0.0.53:domain +systemd-r 357 systemd-resolve 19u IPv4 3294 0t0 TCP 127.0.0.53:domain (LISTEN) +systemd-r 357 systemd-resolve 20u IPv4 3295 0t0 UDP 127.0.0.54:domain +systemd-r 357 systemd-resolve 21u IPv4 3296 0t0 TCP 127.0.0.54:domain (LISTEN) ``` 当前系统 `53` 端口被 `systemd-resolved.service` 占用,会导致设置 DNS 服务时监听端口失败。 diff --git a/07.PVE制作TS服务器.md b/07.PVE制作TS服务器.md index 7ae4a30..fafd367 100644 --- a/07.PVE制作TS服务器.md +++ b/07.PVE制作TS服务器.md @@ -52,12 +52,6 @@ $ sudo systemctl restart ssh.service ### 1.2.配置软件源 -使用终端工具登录 TS 服务器,常用终端工具请参阅 [01.PVE系统安装](./01.PVE系统安装.md) 。 - -首先需要对 Debian 系统软件源进行修改,这里使用 [USTC](https://mirrors.ustc.edu.cn) 镜像站作为演示。 - -当系统版本发生变化时,请参考 USTC 镜像站的官方说明 [USTC Mirror Help - Debian](https://mirrors.ustc.edu.cn/help/debian.html) 。 - 使用如下命令对 `debian.sources` 配置文件进行修改。 ```bash @@ -125,7 +119,7 @@ $ sudo apt full-upgrade $ sudo apt install qemu-guest-agent btop curl tmux logrotate cron neovim zsh git ## 安装系统自动更新工具 -$ sudo apt install unattended-upgrades powermgmt-base python3-gi +$ sudo apt install unattended-upgrades powermgmt-base ## 安装网络工具 $ sudo apt install dnsmasq conntrack nftables sshguard lsof knot-dnsutils @@ -172,14 +166,15 @@ Debian 系统默认编辑器为 `nano` ,推荐将默认编辑器更换为 `neo $ sudo update-alternatives --config editor #### 系统默认编辑器示例输出 -There are 3 choices for the alternative editor (providing /usr/bin/editor). +There are 4 choices for the alternative editor (providing /usr/bin/editor). - Selection Path Priority Status + Selection Path Priority Status ------------------------------------------------------------ -* 0 /bin/nano 40 auto mode - 1 /bin/nano 40 manual mode - 2 /usr/bin/nvim 30 manual mode - 3 /usr/bin/vim.tiny 15 manual mode +* 0 /bin/nano 40 auto mode + 1 /bin/nano 40 manual mode + 2 /usr/bin/nvim 30 manual mode + 3 /usr/bin/vim.basic 30 manual mode + 4 /usr/bin/vim.tiny 15 manual mode Press to keep the current choice[*], or type selection number: 2 update-alternatives: using /usr/bin/nvim to provide /usr/bin/editor (editor) in manual mode diff --git a/08.PVE自动备份虚拟机.md b/08.PVE自动备份虚拟机.md index f469127..1d07b1b 100644 --- a/08.PVE自动备份虚拟机.md +++ b/08.PVE自动备份虚拟机.md @@ -8,7 +8,7 @@ ![添加备份作业](img/p08/vm_new_backup_job.jpeg) -### 1.1.常规选项 +### 1.1.常规 在弹出的 `创建:备份作业` 对话框中,勾选底部 `高级` 选项,`备份作业` 的各项参数如下。 @@ -17,10 +17,7 @@ |节点|`node01`|选择当前 PVE 服务器节点| |存储|`local`|选择存放备份文件的路径| |计划|`*-01,16 03:30`|`备份作业` 执行的时间计划| -|选择模式|`包括选中的VMs`|执行备份的虚拟机对象| -|通知模式|`默认(自动)`|执行备份时的通知模式,保持默认即可| -|发送邮箱至|`your_email@domain.com`|`备份作业` 邮件的收件人邮箱| -|发送邮件|`总是`|发送 `备份作业` 邮件提醒的条件| +|选择模式|`包括选中的虚拟机`|执行备份的虚拟机对象| |压缩|`ZSTD`|选择备份文件的压缩算法| |模式|`停止`|选择备份虚拟机的方式,推荐使用 `停止` | |启用|**勾选**|表示该 `备份作业` 为启用状态| @@ -38,23 +35,31 @@ ![备份作业常规选项](img/p08/vm_job_normal.jpeg) -### 1.2.保留选项 +### 1.2.通知 + +|参数|值|说明| +|--|--|--| +|通知模式|`使用全局通知设置`|执行备份时的通知模式,保持默认即可| + +![备份作业通知选项](img/p08/vm_job_email.jpeg) + +### 1.3.保留 该选项将控制备份文件的保留个数,选择保留最近 `3` 份备份文件。 ![备份作业保留选项](img/p08/vm_job_keep.jpeg) -### 1.3.备注模板 +### 1.4.备注模板 该选项将按照设置的内容,自动重命名备份文件。 -在 `备份日志` 右侧文本框中输入 `{{vmid}}_{{guestname}}_Auto_Backup` 。 +在 `备份日志` 右侧文本框中输入 `{{vmid}}-{{guestname}}-Autobackup` 。 点击 `创建` 按钮,`备份作业` 创建完成。 ![备份作业备注选项](img/p08/vm_job_notes.jpeg) -### 1.4.高级选项 +### 1.5.高级 该选项提供 `备份作业` 进行时的高级可调参数,仅需勾选 `重复错过` 选项即可。 diff --git a/img/p04/vm_cloudinit.jpeg b/img/p04/vm_cloudinit.jpeg index 6bd4db1..120d664 100644 Binary files a/img/p04/vm_cloudinit.jpeg and b/img/p04/vm_cloudinit.jpeg differ diff --git a/img/p04/vm_confirm.jpeg b/img/p04/vm_confirm.jpeg index 9a46238..b14b7c8 100644 Binary files a/img/p04/vm_confirm.jpeg and b/img/p04/vm_confirm.jpeg differ diff --git a/img/p04/vm_cpu.jpeg b/img/p04/vm_cpu.jpeg index 6c8293a..ec657ca 100644 Binary files a/img/p04/vm_cpu.jpeg and b/img/p04/vm_cpu.jpeg differ diff --git a/img/p04/vm_enable_hd.jpeg b/img/p04/vm_enable_hd.jpeg index 49d3655..988d8b1 100644 Binary files a/img/p04/vm_enable_hd.jpeg and b/img/p04/vm_enable_hd.jpeg differ diff --git a/img/p04/vm_hd.jpeg b/img/p04/vm_hd.jpeg index 6e70cd0..b8a03f1 100644 Binary files a/img/p04/vm_hd.jpeg and b/img/p04/vm_hd.jpeg differ diff --git a/img/p04/vm_id.jpeg b/img/p04/vm_id.jpeg index 35329af..2c601cb 100644 Binary files a/img/p04/vm_id.jpeg and b/img/p04/vm_id.jpeg differ diff --git a/img/p04/vm_network_port.jpeg b/img/p04/vm_network_port.jpeg index 20a1fb4..65c9f35 100644 Binary files a/img/p04/vm_network_port.jpeg and b/img/p04/vm_network_port.jpeg differ diff --git a/img/p04/vm_network_queue.jpeg b/img/p04/vm_network_queue.jpeg index f45a6b3..f9ce7d2 100644 Binary files a/img/p04/vm_network_queue.jpeg and b/img/p04/vm_network_queue.jpeg differ diff --git a/img/p04/vm_notes.jpeg b/img/p04/vm_notes.jpeg index 7cf4a15..55710b8 100644 Binary files a/img/p04/vm_notes.jpeg and b/img/p04/vm_notes.jpeg differ diff --git a/img/p04/vm_os.jpeg b/img/p04/vm_os.jpeg index 2f5d3b5..3ae82e0 100644 Binary files a/img/p04/vm_os.jpeg and b/img/p04/vm_os.jpeg differ diff --git a/img/p05/os_login.jpeg b/img/p05/os_login.jpeg index 224d336..9da1702 100644 Binary files a/img/p05/os_login.jpeg and b/img/p05/os_login.jpeg differ diff --git a/img/p05/vm_to_template.jpeg b/img/p05/vm_to_template.jpeg index 9037f11..d34dc31 100644 Binary files a/img/p05/vm_to_template.jpeg and b/img/p05/vm_to_template.jpeg differ diff --git a/img/p08/vm_job_advanced.jpeg b/img/p08/vm_job_advanced.jpeg index 3c32593..41a4a55 100644 Binary files a/img/p08/vm_job_advanced.jpeg and b/img/p08/vm_job_advanced.jpeg differ diff --git a/img/p08/vm_job_email.jpeg b/img/p08/vm_job_email.jpeg new file mode 100644 index 0000000..e3a184c Binary files /dev/null and b/img/p08/vm_job_email.jpeg differ diff --git a/img/p08/vm_job_keep.jpeg b/img/p08/vm_job_keep.jpeg index c749bcf..be464e3 100644 Binary files a/img/p08/vm_job_keep.jpeg and b/img/p08/vm_job_keep.jpeg differ diff --git a/img/p08/vm_job_normal.jpeg b/img/p08/vm_job_normal.jpeg index a8884c9..ea6a43d 100644 Binary files a/img/p08/vm_job_normal.jpeg and b/img/p08/vm_job_normal.jpeg differ diff --git a/img/p08/vm_job_notes.jpeg b/img/p08/vm_job_notes.jpeg index 1027b5e..8b7d059 100644 Binary files a/img/p08/vm_job_notes.jpeg and b/img/p08/vm_job_notes.jpeg differ diff --git a/img/p08/vm_job_time.jpeg b/img/p08/vm_job_time.jpeg index c73a0cd..02b23a7 100644 Binary files a/img/p08/vm_job_time.jpeg and b/img/p08/vm_job_time.jpeg differ diff --git a/img/p08/vm_job_time_test.jpeg b/img/p08/vm_job_time_test.jpeg index aaa2866..1fc9e5e 100644 Binary files a/img/p08/vm_job_time_test.jpeg and b/img/p08/vm_job_time_test.jpeg differ diff --git a/img/p08/vm_new_backup_job.jpeg b/img/p08/vm_new_backup_job.jpeg index b1de248..f156568 100644 Binary files a/img/p08/vm_new_backup_job.jpeg and b/img/p08/vm_new_backup_job.jpeg differ