Proxmox VE(PVE)6.X 升级到 7.X
在更新之前,先把虚拟机全部关机,并且取消所有的自动启动!在更新之前,先把虚拟机全部关机,并且取消所有的自动启动!在更新之前,先把虚拟机全部关机,并且取消所有的自动启动!
1、在电脑上用Xshell之类的工具登录到PVE的SSH下,输入以下命令(带有#开头内容为注释,不需要输入的,只输入不是#开头的,下同):
#修改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-5.3.13-1-pve,是根据上一条命令显示出来的内核,需要修改成你自己PVE显示不用的,后面显示有purge字样的为系统使用中,不可以卸载的,其他的均可以卸载)
dpkg --purge --force-remove-essential pve-kernel-5.3.13-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.3.13-3-pve
dpkg --purge --force-remove-essential pve-kernel-5.3.18-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.3.18-2-pve
dpkg --purge --force-remove-essential pve-kernel-5.3.18-3-pve
dpkg --purge --force-remove-essential pve-kernel-5.4
dpkg --purge --force-remove-essential pve-kernel-5.4.101-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.103-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.106-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.114-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.119-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.124-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.34-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.41-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.44-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.44-2-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.55-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.60-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.65-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.73-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.78-1-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.78-2-pve
dpkg --purge --force-remove-essential pve-kernel-5.4.98-1-pve
#把不用的内核删除完成后,更新引导菜单
update-grub
#重启PVE
reboot
8、进入PVE以后,系统可能还会自动重启3-4次,属于正常现象,请耐心等候,不要以为机子出了问题。等机器不再重启后,就可以把虚拟机启动起来。
文章目录
关闭
passwords
Always a significant fan of linking to bloggers that I enjoy but dont get a good deal of link enjoy from. Raymond Haner
adult dating
Its great as your other content :D, thanks for putting up. Elijah Lindenpitz
מגוון דירות דיסקרטיות בירושלים
Next time I read a blog, Hopefully it wont fail me as much as this one. After all, Yes, it was my choice to read through, however I truly thought you would probably have something useful to talk about. All I hear is a bunch of complaining about something you can fix if you were not too busy seeking attention.
נערת ליווי אילת
Im pretty pleased to uncover this site. I want to to thank you for your time due to this fantastic read!! I definitely loved every part of it and i also have you book-marked to look at new stuff on your site.