1.安装系统
选择zfs(raid0) (不一定跟我选的一样,可以按喜好更改)
有usb网卡的,在第一次开机启动前拔出。
2.第一次启动
修改安装源
- $ nano /etc/apt/sources.list
- #deb http://ftp.debian.org/debian bookworm main contrib
- #deb http://ftp.debian.org/debian bookworm-updates main contrib
- # security updates
- #deb http://security.debian.org bookworm-security main contrib
- # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
- # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
- # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
- # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
- deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
- # # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
- #deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
- # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
复制代码- $ nano /etc/apt/sources.list.d/pve-enterprise.list
- deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bookworm pve-no-subscription
- #deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
复制代码- $ nano /etc/apt/sources.list.d/ceph.list
- #deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise #这里我直接禁用了ceph源
复制代码- $ apt update #(可选)apt upgarde
- $ reboot
复制代码 3.配置网络
此时有usb网卡的同学可以插上了
转到数据中心--服务器--系统--网络--创建--linux bridge
将物理网卡名称填在桥接端口内,创建完后重启
重启后查看/etc/network/interfaces,如果不想固定host的ip可以改成这样
- auto vmbr0
- iface vmbr0 inet <font color="#ff0000">dhcp</font>
- #address #你的静态地址
- #gateway #你的网关
- bridge-ports #你的网卡名
- bridge-stp off
- bridge-fd 0
- auto vmbr1
- iface vmbr1 inet <font color="#ff0000">dhcp</font>
- bridge-ports #你的网卡名
- bridge-stp off
- bridge-fd 0
复制代码 如果要让pve自动获取ipv6地址,在/etc/sysctl.conf中添加以下内容
- net.ipv6.conf.all.accept_ra=2
- net.ipv6.conf.all.autoconf=1
- net.ipv6.conf.default.accept_ra=2
- net.ipv6.conf.default.autoconf=1
- #这里的vmbr0换成你的网桥名,如果有多个则添加多个
- net.ipv6.conf.vmbr0.autoconf=1
- net.ipv6.conf.vmbr0.accept_ra=2
- #如果要求pve使用临时地址
- net.ipv6.conf.all.use_tempaddr=2
- net.ipv6.conf.default.use_tempaddr=2
- #应用设置
- $ sysctl -p
- $ reboot
复制代码 配置防火墙
数据中心--防火墙--是
节点--防火墙--选项--是
4.新建虚拟机
节点--local--ISO镜像--上传
右上角创建虚拟机
资源池可以自己新建用于虚拟机的分类,可以理解为一个虚拟机文件夹。
选择操作系统--使用ISO镜像文件,然后选择刚刚上传的镜像文件。
机型q35比i440fx新。
如果host的硬盘是ssd那么可以选择ssd方阵,丢弃指可以回收磁盘资源。
cpu类别推荐选host。
内存ballooning可以在根据虚拟机的实际需要在[最小内存,内存]之间调整大小,此项功能需要在虚拟机上安装额外软件才能支持。
网络选择一个网桥即可。
5.去除nag,显示温度、省电等
见
https://www.right.com.cn/forum/f ... wthread&tid=6754687
https://www.right.com.cn/forum/f ... wthread&tid=8231970
大功告成!
请不要胡乱输入以及粘贴、复制等方式灌水
请尊重作者、并共同维护网站的正常阅读,否则账户将会被限制发帖、回帖,并且积分可能会被清零,站内短信以及阅读权限等都会受到影响,谢谢。
具体限制方式:https://www.right.com.cn/forum/thread-8307840-1-1.html
|