====== PVE 6 升級到 7 紀錄 ====== **實際採用 PEV 6 與 PVE 7 兩組 Cluster 並存的模式移轉運行, 處理紀錄請參考 [[tech/pve6_and_pve7]]** * 參考 - https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0#Old_Container_and_CGroupv2 * 升級 cgroup-v2 需要讓 CT 內的 OS 升級至版本 Exp. CentOS 7 -> CentOS 8 * 強制設定使用舊版 cgroup 似乎不是那容易搞定 [[https://forum.proxmox.com/threads/unified-cgroup-v2-layout-upgrade-warning-pve-6-4-to-7-0.92459/page-2|參考這討論]][[https://pve.proxmox.com/pve-docs/chapter-pct.html#pct_cgroup_compat|這說明]] * 因環境有大量 CT 使用 CentOS 7, 考慮升級過程還能讓服務持續運作, 決定採用 PEV 6 與 PVE 7 兩組 Cluster 並存的模式移轉運行 依照官方的 wiki 說明升級程序, 似乎不太困難, 因此將實際的升級程序操作紀錄在底下 ===== 升級程序 ===== ==== 預先準備 ==== - 將現在 PVE 6 所有主機都先生級到最新版本 Exp. 6.4-13 (有更新到 linux-kernel 需要重開機) - 有同時安裝 PBS(Proxmox Backup Server)需要先將 PBS 升級到 2.x 參考 [[tech:pbs1to2]] - 確定可以穩定存取每一台的參數檔儲存區 (萬一有異常可以直接進去手動修改) - 確定目前的 Cluster 是健康穩定狀態 - 驗證與測試所有 VM 與 CT 的備份都是正確 (萬一出現災難還有降災還原的機會) - 確定是正確升級存儲庫的配置 - 根目錄至少要有 4GB 的磁碟空間 - [[https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0#Known_upgrade_issues|看一下已知的可能升級議題]] ==== 執行升級 ==== - 所有主機都執行升級檢測工具 pve6to7 --full 如果有使用 CT 裡面是 CentOS7/Ubuntu16 .. 會出現這個警告 WARN: Found at least one CT (103) which does not support running in a unified cgroup v2 layout. Either upgrade the Container distro or set systemd.unified_cgroup_hierarchy=0 in the Proxmox VE hosts' kernel cmdline! Skipping further CT compat checks. - 將所有 VM/CT 移到其他主機 - 避免升級 PVE 7 後會更變 Bridge 的 MAC , 所以可以選擇以下其中一個方式處理: * 安裝 ifupdown2 apt install ifupdown2 -y ifreload -a * 在 /etc/network/interfaces 內針對 vmbr0 ... 進行指定現有的 MAC , Exp. : auto vmbr0 iface vmbr0 inet static address 192.168.X.Y/24 hwaddress aa:bb:cc:12:34 # ... remaining options - 更新 apt repo 設定 apt update apt dist-upgrade sed -i 's/buster\/updates/bullseye-security/g;s/buster/bullseye/g' /etc/apt/sources.list - 進行 Debian Bullseye 與 PVE 7 更新 apt update apt dist-upgrade 出現Fetched 480 MB in 29s (16.7 MB/s) W: (pve-apt-hook) !! ATTENTION !! W: (pve-apt-hook) You are attempting to upgrade from proxmox-ve '6.4-1' to proxmox-ve '7.1-1'. Please make sure to read the Upgrade notes at W: (pve-apt-hook) https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0 W: (pve-apt-hook) before proceeding with this operation. W: (pve-apt-hook) W: (pve-apt-hook) Press enter to continue, or C^c to abort. 需要按下**[Enter]**才會繼續更新, 接著出現apt-listchanges: News --------------------- apt (2.1.16) unstable; urgency=medium : : 要輸入 **q** 才會繼續更新, 出現Configuration file '/etc/issue' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** issue (Y/I/N/O/D/Z) [default=N] ? 可按下**[Enter]**繼續更新, 在來會彈出一個藍色視窗問 Restart services during package upgrades without asking?可選 ****這樣更版過程就不會一直彈出重啟服務要你確認的訊息, 接著可能會出現Configuration file '/etc/sysctl.conf' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** sysctl.conf (Y/I/N/O/D/Z) [default=N] ? Y 可按下**Y + [Enter]**繼續更新, 再來會彈出一個藍色視窗問What do you want to do about modified configuration file sshd_config? 可選**keep the local version currently installed** - 重新開機就會 PVE 7.x ===== 參考網址 ===== * https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0 {{tag>pve upgrade}}