更新 Debian 云镜像

This commit is contained in:
CallMeR
2024-03-18 13:50:30 +08:00
parent b597af908d
commit 5ec78ce639
3 changed files with 5 additions and 5 deletions
+5 -5
View File
@@ -4,11 +4,11 @@
该虚拟机模板主要用作内网 DNS 服务器,由 `Adguard Home``SmartDNS` 提供 DNS 解析服务。 该虚拟机模板主要用作内网 DNS 服务器,由 `Adguard Home``SmartDNS` 提供 DNS 解析服务。
本文将使用 Debian 的云镜像 `debian-12-genericcloud-amd64.qcow2` 作为模板虚拟机的镜像。 本文将使用 Debian 的云镜像 `debian-12-generic-amd64.qcow2` 作为模板虚拟机的镜像。
访问 [Debian Official Cloud Images](https://cloud.debian.org/images/cloud/) 官方网站,下载最新版 `Bookworm` 云镜像以及对应的校验文件。 访问 [Debian Official Cloud Images](https://cloud.debian.org/images/cloud/) 官方网站,下载最新版 `Bookworm` 云镜像以及对应的校验文件。
![下载镜像](img/p04/download_genericcloud_image_qcow2.jpeg) ![下载镜像](img/p04/download_generic_image_qcow2.jpeg)
## 1.创建虚拟机 ## 1.创建虚拟机
@@ -107,7 +107,7 @@ $ cd /tmp/Debian
$ wget https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS $ wget https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS
## 下载云镜像 ## 下载云镜像
$ wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2 $ wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
## 检查文件是否存在 ## 检查文件是否存在
$ ls -lah $ ls -lah
@@ -116,14 +116,14 @@ $ ls -lah
$ cat SHA512SUMS $ cat SHA512SUMS
## 计算文件 hash ## 计算文件 hash
$ sha512sum debian-12-genericcloud-amd64.qcow2 $ sha512sum debian-12-generic-amd64.qcow2
``` ```
确认无误后,将镜像文件导入刚才创建的虚拟机,命令中的 `VM ID` 需要根据实际情况替换,演示为 `1001` 确认无误后,将镜像文件导入刚才创建的虚拟机,命令中的 `VM ID` 需要根据实际情况替换,演示为 `1001`
```bash ```bash
## 将 qcow2 镜像导入虚拟机中 ## 将 qcow2 镜像导入虚拟机中
$ qm importdisk 1001 debian-12-genericcloud-amd64.qcow2 local-lvm $ qm importdisk 1001 debian-12-generic-amd64.qcow2 local-lvm
#### 镜像导入示例输出 #### 镜像导入示例输出
Successfully imported disk as 'unused0:local-lvm:vm-1001-disk-0' Successfully imported disk as 'unused0:local-lvm:vm-1001-disk-0'
Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 KiB