# Proxmox 6.x 升级到7.0步骤


记录一下Proxmox 6.x 升级到7.0步骤

<!--more-->

### 首先需要升级到6.4的最新版本

#### 删除企业源

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

#### 下载秘钥

```bash
wget http://mirrors.ustc.edu.cn/proxmox/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
```

#### 添加国内源

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

#### 配置国内debian源

```bash
echo deb http://mirrors.ustc.edu.cn/debian buster main contrib > /etc/apt/sources.list
echo deb http://mirrors.ustc.edu.cn/debian buster-updates main contrib > /etc/apt/sources.list
echo deb http://mirrors.ustc.edu.cn/debian-security buster/updates main contrib > /etc/apt/sources.list
```

#### pve_ceph设置国内源

```bash
echo deb http://mirrors.ustc.edu.cn/proxmox/debian/ceph-nautilus buster main > /etc/apt/sources.list.d/ceph.list
```

#### 然后执行：

```bash
apt update && apt dist-upgrade
```

重启后就是6.4的最新版本。

### 升级7.0

在升级到6.4新版后可以通过脚本进行升级检查，因为有些自定义的应用可能升级后无法使用因此需要检查并报告内容，但这个脚本不会修复问题。

#### 运行检查：

```bash
pve6to7 –full
```

我的结果是这样，三个警告不用管直接升级就行了

```bash
= SUMMARY =

TOTAL:    25
PASSED:   20
SKIPPED:  2
WARNINGS: 3
FAILURES: 0
```

检查完后开始改源

#### 将Debian的源升级下

```bash
sed -i 's/buster\/updates/bullseye-security/g;s/buster/bullseye/g' /etc/apt/sources.list
```

#### 软件源修改

```bash
sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-install-repo.list
```

#### 企业源（如果是按照我前面步骤删除过企业源这步可以不做）：

```bash
echo deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise > /etc/apt/sources.list.d/pve-enterprise.list
```

#### ceph源修改

```bash
echo deb http://mirrors.ustc.edu.cn/proxmox/debian/ceph-octopus bullseye main > /etc/apt/sources.list.d/ceph.list
```

#### 然后进行更新

```bash
apt update && apt dist-upgrade
```


