改进虚拟机使用 EFI 模式引导

This commit is contained in:
CallMeR
2025-10-24 16:24:29 +08:00
parent 578d953950
commit 44a1ee787c
14 changed files with 23 additions and 8 deletions
+3 -2
View File
@@ -190,8 +190,9 @@ $ journalctl --update-catalog
|系统|作用|说明|
|--|--|--|
|RouterOS|主路由|PPPoE 拨号上网|
|Debian|Linux 服务器|内网 DNS 服务器|
|OpenWrt|旁路由|内网插件服务|
|Debian|DNS 服务器|内网 DNS 服务器|
|Debian|TS 服务器|内网 TS 组网服务|
|OpenWrt|旁路网关|内网插件服务|
根据 **内部网络地址** 规划,PVE IP 地址规划如下。
+20 -6
View File
@@ -30,13 +30,15 @@
SCSI 控制器保持默认 `VirtIO SCSI single` ,机型可选 `q35` ,并勾选 `Qemu代理` 选项。
固件可选 `OVMF (UEFI)` ,并勾选 `添加 TPM` 选项,存储路径需根据实际情况进行调整,演示为 `local-lvm`
`预注册密钥` 可按需启用,若启用将预装特定于发行版和 Microsoft 标准的安全启动密钥。
![虚拟机系统](img/p04/vm_system.jpeg)
### 1.4.磁盘
一般情况下,如果该虚拟机仅为 Adguard Home 服务器,`20G` 磁盘空间足够使用
由于使用 Debian 云镜像制作虚拟机模板,此处删除所有 `磁盘`
因使用 Debian 云镜像制作虚拟机模板,此处需删除所有 `磁盘`
![虚拟机磁盘](img/p04/vm_hd.jpeg)
@@ -122,7 +124,7 @@ $ sha512sum debian-13-generic-amd64.qcow2
$ qm importdisk 1001 debian-13-generic-amd64.qcow2 local-lvm
#### 镜像导入示例输出
unused0: successfully imported disk 'local-lvm:vm-1001-disk-0'
unused0: successfully imported disk 'local-lvm:vm-1001-disk-2'
```
磁盘导入成功后,虚拟机硬件列表中将显示一块未使用的磁盘设备,可鼠标 **双击** 该设备进行配置调整。
@@ -151,16 +153,28 @@ unused0: successfully imported disk 'local-lvm:vm-1001-disk-0'
### 2.3.添加 CloudInit
了能够正常使用 Cloud-Init 初始化系统,需要给模板虚拟机添加 `CloudInit 设备`
确保 Cloud-Init 能正常初始化系统,需模板虚拟机添加 `CloudInit 设备`
点击顶部 `添加` 菜单,选择 `CloudInit 设备`
![虚拟机添加ci](img/p04/vm_cloudinit.jpeg)
`总线/设备` 选择 `SCSI` ,编号为 `1` `存储` 选择 `local-lvm`
`总线/设备` 选择 `SCSI` ,编号为 `1` 存储路径需根据实际情况进行调整,演示为 `local-lvm`
![虚拟机ci参数](img/p04/vm_ci_details.jpeg)
### 2.4.添加 VirtIO RNG
为确保系统拥有充足的可用熵,需为模板虚拟机添加 `VirtIO RNG` 熵源。
点击顶部 `添加` 菜单,选择 `VirtIO RNG`
![虚拟机添加RNG](img/p04/vm_rng.jpeg)
`熵源` 选择 `/dev/urandom` ,其余参数保持默认即可。
![虚拟机RNG参数](img/p04/vm_rng_details.jpeg)
虚拟机硬件设备修改完成后,如下图所示。
![虚拟机全部硬件](img/p04/vm_hardware_all.jpeg)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 KiB

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 298 KiB