Proxmox6升级Proxmox7
nano /etc/apt/sources.list # 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 apt update && apt full-upgrade -y
root强制登录:
PasswordAuthentication yes PermitRootLogin yes EOF service ssh restart
这个应该算是Debian的要求,因为我买的独服不允许root登录,我就一块记录了。
apt-get dist-upgrade升级失败
W: (pve-apt-hook) !! WARNING !! W: (pve-apt-hook) You are attempting to remove the meta-package 'proxmox-ve'! W: (pve-apt-hook) W: (pve-apt-hook) If you really want to permanently remove 'proxmox-ve' from your system, run the following command W: (pve-apt-hook) touch '/please-remove-proxmox-ve' W: (pve-apt-hook) run apt purge proxmox-ve to remove the meta-package W: (pve-apt-hook) and repeat your apt invocation. W: (pve-apt-hook) W: (pve-apt-hook) If you are unsure why 'proxmox-ve' would be removed, please verify W: (pve-apt-hook) - your APT repository settings W: (pve-apt-hook) - that you are using 'apt full-upgrade' to upgrade your system E: Sub-process /usr/share/proxmox-ve/pve-apt-hook returned an error code (1) E: Failure running script /usr/share/proxmox-ve/pve-apt-hook
这个报错是因为Proxmox6旧的内核不兼容最新7的内核。需要删除旧的内核再次运行 apt-get dist-upgrade
即可。
apt remove linux-image-amd64
Proxmox库无法授权
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/bullseye/InRelease 401 Unauthorized [IP: 2607:5300:203:7dc2::162 443] E: The repository 'https://enterprise.proxmox.com/debian/pve bullseye InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
这个问题是由于自带的库有收费的版本的deb库,需要屏蔽这些库替换成免费的版本。
nano /etc/apt/sources.list deb http://ftp.debian.org/debian bullseye main contrib deb http://ftp.debian.org/debian bullseye-updates main contrib #PVE pve-no-subscription repository provided by proxmox.com, #NOT recommended for production use deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription #security updates deb http://security.debian.org/debian-security bullseye-security main contrib
同时要将以下两个库屏蔽掉:
nano /etc/apt/sources.list.d/pve-install-repo.list nano /etc/apt/sources.list.d/pve-enterprise.list
然后再次升级即可。