个人对虚拟化部署 All in BOOM HomeLab Server 有需求,试过 ESXi、unRaid、Proxmox VE 等方案,认为 ESXi、PVE 这两款比较符合我的要求,前者适合专业的服务器使用,个人 PC 还是推荐基于 Debian 的后者。由于本人没有专业服务器,ESXi 比较吃我内存,故转投 PVE

由于 PVE 许多功能无法在 Web UI 中完成设置,需要使用一些命令、修改一些配置文件,本人记性又不太好。俗话说 “好记性不如烂笔头”,故整理出本笔记供后续查看,本博客也重点更新此文章,如有需要请收藏。

一、安装升级

关于系统安装,属于是有手就行的操作,故不在赘述。

(非必须)安装 PVETools

export LC_ALL=en_US.UTF-8
apt update && apt -y install git && git clone https://github.com/ivanhao/pvetools.git
cd pvetools
./pvetools.sh

1、国内源设置

删除企业源:

rm -rf /etc/apt/sources.list.d/pve-enterprise.list
rm -rf /etc/apt/sources.list.d/ceph.list

设置国内源:注意分版本

PVE7 专用命令

仅适用于 PVE7,其它版本请勿乱用!!!

编辑镜像源:

先备份一下再修改

cp /etc/apt/sources.list /etc/apt/sources.list.bak
nano /etc/apt/sources.list

中科大源(移动速度快):

deb http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib 
deb http://mirrors.ustc.edu.cn/proxmox/debian bullseye pve-no-subscription
#deb http://mirrors.ustc.edu.cn/proxmox/debian/ceph-pacific bullseye main

一键操作 —— 中科大源:

cat <<'EOF' > /etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib 
deb http://mirrors.ustc.edu.cn/proxmox/debian bullseye pve-no-subscription
#deb http://mirrors.ustc.edu.cn/proxmox/debian/ceph-pacific bullseye main
EOF

查看 PVE 通用命令

一键操作 —— 中科大源:

# 修改基础系统(Debian)的源文件:
sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list
sed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list

# 修改 Proxmox 的源文件
source /etc/os-release
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list

对于 Proxmox Backup Server 和 Proxmox Mail Gateway,请将以上命令中的 pve 分别替换为 pbs 和 pmg

2、升级系统

更新软件包数据库缓存:

apt update

升级系统软件包:

apt upgrade -y

在网页上,删除 lvm-thin:

8486b76d2fb682dc652827f0d816e1cc

 

7cb6fe56d0b9195c8b1d102d7099ff44进入目录 /var/lib/vz 查看所有内容:

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。