在PVE上安装Centos9,抢先体验

2021.10.21更新

已发布视频教程

[bvideo bv="BV16L411G7rs"][/bvideo]

教程内容

本文不适合新手。

因为没有ISO,需要利用cloud images安装,下载地址如下:

CentOS Cloud images

找到CentOS-Stream-GenericCloud-9-xxxxx.x86_64.qcow2这个就ok。中间xxxx是日期。如下图红圈处是正确的镜像。

 

使用教程:

下载镜像

cd /opt
wget https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20211006.2.x86_64.qcow2

 创建虚拟机

按照下面配置创建虚拟机。

注意!请删除默认创建的硬盘,再添加cloud-init设备和串口设备!

导入镜像

使用qm importdisk 命令导入qcow2

cd /opt
oot@pve:/opt# qm importdisk 988 CentOS-Stream-GenericCloud-9-20211006.2.x86_64.qcow2 ssd --format=qcow2
importing disk 'CentOS-Stream-GenericCloud-9-20211006.2.x86_64.qcow2' to VM 988 ...
Formatting '/mnt/pve/ssd/images/988/vm-988-disk-0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=10737418240 lazy_refcounts=off refcount_bits=16
transferred 0.0 B of 10.0 GiB (0.00%)
transferred 10.0 GiB of 10.0 GiB (100.00%)
transferred 10.0 GiB of 10.0 GiB (100.00%)
Successfully imported disk as 'unused0:ssd:988/vm-988-disk-0.qcow2'

导入之后,在面板上双击磁盘,并添加。

修改引导

在选项里,选择刚才硬盘的引导,同时启用QEMU Guest Agent

添加cloud-init配置参数

开机测试

使用串口打开控制台

观察

空间占用,大概占用1g

[root@centos9 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        856M     0  856M   0% /dev
tmpfs           888M     0  888M   0% /dev/shm
tmpfs           355M  5.2M  350M   2% /run
/dev/sda1        10G 1021M  9.0G  10% /
tmpfs           888M     0  888M   0% /tmp
tmpfs           178M     0  178M   0% /run/user/0

内存占用

[root@centos9 ~]# free -m
               total        used        free      shared  buff/cache   available
Mem:            1774         137        1350           5         286        1486
Swap:              0           0           0

内核升级到了5.14.0-5.el9.x86_64

 

 

 

https://foxi.buduanwang.vip/virtualization/pve/1462.html/
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇