找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2106|回复: 9

[虚拟机相关] PVE不能更新

[复制链接]
发表于 2022-6-10 09:40 | 显示全部楼层 |阅读模式
之前7.1-4用阿里云正常升级到7.1-12。最近看到有7.2了,因为挂的有盒子所以晚上就没动,想着早上顺手弄下,结果不管是用阿里云、中科大、清华还是华为都提示已是最新,因为还要上班就先撤了。有没有知道怎么回事的?
我的恩山、我的无线 The best wifi forum is right here.
发表于 2022-6-10 09:49 | 显示全部楼层
没来得及分发到各个镜像吧。。

点评

已经有人用阿里云升级了  详情 回复 发表于 2022-6-10 09:59
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-6-10 09:59 | 显示全部楼层
dust2k 发表于 2022-6-10 09:49
没来得及分发到各个镜像吧。。

已经有人用阿里云升级了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-10 10:10 | 显示全部楼层
早就升级7.2了
1、在pve的shell下,输入以下命令(带有#开头内容为注释,不需要输入的,只输入不是#开头的,下同):

#修改PVE源
sed -i 's/buster\/updates/bullseye-security/g;s/buster/bullseye/g' /etc/apt/sources.list
#删除PVE企业源
rm -rf /etc/apt/sources.list.d/pve-install-repo.list
2、输入vi /etc/apt/sources.list ,按 i 进入编辑状态,把原来的内容全部删除,复制以下内容进去粘贴,保存退出;

# debian aliyun source
#deb https://mirrors.tuna.tsinghua.edu.cn/debian bullseye main contrib non-free
#deb https://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates main contrib non-free
#deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
#deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
deb http://ftp.debian.org/debian bullseye main contrib
deb http://ftp.debian.org/debian bullseye-updates main contrib
# security updates
deb http://security.debian.org bullseye-security main contrib
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
3、输入以下命令更新系统(由于PVE的源在国外服务器,建议全局开飞机,否则更新非常的慢),期间有可能弹出类似下图的提示需要选择安装开发版本的界面,直接的按回车默认就行:

apt update && apt dist-upgrade -y
4、更新完成,输入 reboot 重启PVE;

5、启动好了以后,继续输入以下命令:

apt autoremove -y
6、敲命令先查看当前系统内核,然后卸载无用的内核,保持系统干净:

#查看当前用的内核
uname -a
#查看系统有多少个内核
dpkg --get-selections |grep kernel

#卸载无用内核,命令后面的pve-kernel-***-pve,是根据上一条命令显示出来的内核,需要修改成你自己PVE显示的,后面显示有purge字样的为系统使用中,不可以卸载的,其他的均可以卸载)

dpkg --purge --force-remove-essential pve-kernel-***-pve
dpkg --purge --force-remove-essential pve-kernel-***-pve

#把不用的内核删除完成后,更新引导菜单
update-grub
#重启PVE
reboot
7、删除完成后再次查看内核,只有在使用的,没有多余的了;
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-6-10 10:47 | 显示全部楼层
await 发表于 2022-6-10 10:10
早就升级7.2了
1、在pve的shell下,输入以下命令(带有#开头内容为注释,不需要输入的,只输入不是#开头的 ...

可不就是这个嘛。https://wp.gxnas.com/10738.html

试过的没用,几个源都用过了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-6-10 10:50 | 显示全部楼层
随便吧,不能升级就这样吧
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-10 11:16 | 显示全部楼层
阿里云/清华/华为云/中科大四选一,如果想换源,执行 cat /dev/null > /etc/apt/sources.list 后再自行加源
#后面的为每步注释,表示这步是做了什么,不需要复制进命令行。

清华云:
cat > /etc/apt/sources.list <<EOF
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
EOF



阿里云:
cat > /etc/apt/sources.list <<EOF
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main non-free contrib
deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main non-free contrib
EOF


华为云:
cat > /etc/apt/sources.list <<EOF
deb https://mirrors.huaweicloud.com/debian/ buster main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free
deb https://mirrors.huaweicloud.com/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free
EOF

中科大云:
cat > /etc/apt/sources.list <<EOF
deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
EOF


——————————————————————————————————————————————————————————————
#获取pve源密钥并写入/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg

wget http://mirrors.ustc.edu.cn/proxm ... elease-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg

——————————————————————————————————————————————————————————————
#更改PVE源并写入/etc/apt/sources.list.d/pve-install-repo.list

echo "deb http://mirrors.ustc.edu.cn/proxmox/debian/pve bullseye pve-no-subscription" >/etc/apt/sources.list.d/pve-install-repo.list

——————————————————————————————————————————————————————————————
#更改环境变量

export LC_ALL=en_US.UTF-8

——————————————————————————————————————————————————————————————
#删除企业源

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

——————————————————————————————————————————————————————————————
下面是可选选项,需要直通网卡/显卡与显示CPU温度的请选择下面的步骤。

#下载PVETOOLS并执行更新

apt update&& apt -y install git && git clone https://github.com/ivanhao/pvetools.git

——————————————————————————————————————————————————————————————
#进入PVETOOLS文件夹

cd pvetools

——————————————————————————————————————————————————————————————
#运行PVETOOLS

========================================
PVE
#查看当前用的内核
uname -a
#查看系统有多少个内核
dpkg --get-selections |grep kernel
#卸载无用内核,命令后面的pve-kernel-5.3.13-1-pve,是根据上一条命令显示出来的内核,需要修改成你自己PVE显示不用的,后面显示有purge字样的为系统使用中,不可以卸载的,其他的均可以卸载)([ ]←括号内是无用内核,名字根据显示的进行填写和更换)
dpkg --purge --force-remove-essential [pve-kernel-5.3.13-1-pve]
#把不用的内核删除完成后,更新引导菜单
update-grub
#重启PVE
reboot

按照这个走一遍,我就是这样就可以更新了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-10 12:47 | 显示全部楼层
看看pve有没有设置dns
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-10 12:52 | 显示全部楼层
跨版本升级的命令不一样。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-10 13:54 | 显示全部楼层
感觉好难,,,国外网站太慢。。

反正我用国内源
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-24 08:46

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表