PVE
1、安装
1.1 硬件
CPU: Intel EMT64 or AMD64 with Intel VT/AMD-V (pcie直通技术需要cpu支持)
内存: OS和Proxmox VE服务至少需要2GB内存,外加为客户分配的内存。对于Ceph和ZFS,需要额外的内存;每TB使用的存储大约需要1GB内存。
硬盘: SSD
系统存储: 带电池保护的写缓存raid
虚拟机存储:
本地存储,支持带电支持的写缓存硬件raid,ceph等
网络存储:
1.2 性能测试
pveperf
1.3 安装包下载
2、主机管理
2.1 仓库管理
# 1、apt仓库
vim /etc/apt/sources.list
# 默认注释了源码镜像以提高 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://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
# 2、pve仓库
rm -rf /etc/apt/sources.list.d/pve-enterprise.list
wget http://mirrors.ustc.edu.cn/proxmox/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
echo "deb http://mirrors.ustc.edu.cn/proxmox/debian/pve bookworm pve-no-subscription" >/etc/apt/sources.list.d/pve-install-repo.list
apt update -y && apt dist-upgrade -y
echo "deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
# 3、ceph
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription" > /etc/apt/sources.list.d/ceph.list #中科大源
sed -i.bak "s#http://download.proxmox.com/debian#https://mirrors.ustc.edu.cn/proxmox/debian#g" /usr/share/perl5/PVE/CLI/pveceph.pm #中科大源
# --------------------------------------------------------
# 更新索引, 升级安装软件包, 重启系统
# --------------------------------------------------------
# 如果无法拉取https软件源时安装
apt update && apt-get install -y apt-transport-https ca-certificates --fix-missing
apt update && apt dist-upgrade
# 4、LXC容器仓库源(CT)
sed -i.bak "s#http://download.proxmox.com/images#https://mirrors.ustc.edu.cn/proxmox/images#g" /usr/share/perl5/PVE/APLInfo.pm
systemctl restart pvedaemon
# 5、删除订阅弹窗
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service
# 执行完成后,需注销PVE登录后, 重新启动浏览器
2.2 网络设置
# 1、更改
vim /etc/network/interfaces ifreload -a 加载
通过web界面
# 2、命名
网卡
enxx
ethxx
网桥
vmbrxx
bonds
bondx
vlans
vlan号
系统命名规范
o<index>[n<phys_port_name>|d<dev_port>] 板载设备
s<slot>[f<function>][n<phys_port_name>|d<dev_port>] 按热插拔ID的设备
[P<domain>]p<bus>s<slot>[f<function>][n<phys_port_name>|d<dev_port>] 按总线ID分组设备
自定义命名将其与设备进行链接
/etc/systemd/network/<n>-<id>.link
/etc/systemd/network/10-enwan0.link
[Match]
MACAddress=aa:bb:cc:dd:ee:ff 将设备的mac地址进行链接重新命名
[Link]
Name=enwan0
修改/etc etwork/interfaces并重启节点
# 桥接技术
pve主机起了一个网桥,将其和物理网卡进行桥接,后端是vm主机,物理网卡再和网关进行通信
2.3 时间同步服务
vim /etc/chrony/chrony.conf
server ntp1.example.com iburst # 指向时间同步服务器,可以将公网内的指向公有服务器,内网指向它
systemctl restart chronyd
2.4 底层存储磁盘检测
smartctl -a /dev/sdX
smartctl -s on /dev/sdX # 解决SMART support is: Disabled
标签:non,bookworm,apt,pve,free,https,debian
From: https://www.cnblogs.com/guquanheng/p/18110510