{"id":4721,"date":"2019-07-17T19:26:02","date_gmt":"2019-07-17T22:26:02","guid":{"rendered":"https:\/\/blog.clusterweb.com.br\/?p=4721"},"modified":"2019-07-17T19:26:02","modified_gmt":"2019-07-17T22:26:02","slug":"upgrade-from-5-x-to-6-0-proxmox","status":"publish","type":"post","link":"https:\/\/blog.clusterweb.com.br\/?p=4721","title":{"rendered":"Upgrade from 5.x to 6.0 Proxmox"},"content":{"rendered":"<h1><span id=\"Introduction\" class=\"mw-headline\">Introduction<\/span><\/h1>\n<p>Proxmox VE 6.x introduces several new major features. Carefully plan the upgrade, make and verify backups before beginning, and test extensively. Depending on the existing configuration, several manual steps\u2014including some downtime\u2014may be required.<\/p>\n<p><b>Note:<\/b>\u00a0A valid and tested backup is\u00a0<i>always<\/i>\u00a0needed before starting the upgrade process. Test the backup beforehand in a test lab setup.<\/p>\n<p>In case the system is customized and\/or uses additional packages (for example GlusterFS) or any other third party repositories\/packages, ensure those packages are also upgraded to and compatible with Debian Buster.<\/p>\n<p>In general, there are two ways to upgrade a Proxmox VE 5.x system to Proxmox VE 6.x:<\/p>\n<ul>\n<li>A new installation on a new hardware (and restoring VMs from the backup)<\/li>\n<li>An in-place upgrade via apt (step-by-step)<\/li>\n<\/ul>\n<p>In both cases emptying the browser cache and reloading the GUI page is required after the upgrade.<\/p>\n<p><!--more--><\/p>\n<h1><span id=\"New_installation\" class=\"mw-headline\">New installation<\/span><\/h1>\n<ul>\n<li>Backup all VMs and containers to external storage (see\u00a0<a title=\"Backup and Restore\" href=\"https:\/\/pve.proxmox.com\/wiki\/Backup_and_Restore\">Backup and Restore<\/a>).<\/li>\n<li>Backup all files in \/etc (<b>required:<\/b>\u00a0files in \/etc\/pve, as well as \/etc\/passwd, \/etc\/network\/interfaces, \/etc\/resolv.conf, as well as anything deviating from a default installation)<\/li>\n<li>Install Proxmox VE from the ISO (this will delete all data on the existing host).<\/li>\n<li>Rebuild your cluster, if applicable.<\/li>\n<li>Restore the file \/etc\/pve\/storage.cfg (this will make the external storage used for backup available).<\/li>\n<li>Restore firewall configs \/etc\/pve\/firewall\/ and \/etc\/pve\/nodes\/&lt;node&gt;\/host.fw (if applicable).<\/li>\n<li>Restore full VMs from backups (see\u00a0<a title=\"Backup and Restore\" href=\"https:\/\/pve.proxmox.com\/wiki\/Backup_and_Restore\">Backup and Restore<\/a>).<\/li>\n<\/ul>\n<p>Administrators comfortable with the command line can follow the procedure\u00a0<a title=\"Bypassing backup and restore when upgrading\" href=\"https:\/\/pve.proxmox.com\/wiki\/Bypassing_backup_and_restore_when_upgrading\">Bypassing backup and restore when upgrading<\/a>\u00a0if all VMs\/CTs are on one shared storage.<\/p>\n<h1><span id=\"In-place_upgrade\" class=\"mw-headline\">In-place upgrade<\/span><\/h1>\n<p>In-place upgrades are done with apt. Familiarity with apt is required to proceed with this upgrade mechanism.<\/p>\n<h2><span id=\"Preconditions\" class=\"mw-headline\">Preconditions<\/span><\/h2>\n<ul>\n<li>Upgrade to the latest version of Proxmox VE 5.4.<\/li>\n<li>Reliable access to all configured storage.<\/li>\n<li>A healthy cluster.<\/li>\n<li>Valid and tested backup of all VMs and CTs (in case something goes wrong).<\/li>\n<li>Correct configuration of the repository.<\/li>\n<li>At least 1GB free disk space at root mount point.<\/li>\n<li>Ceph: upgrade the Ceph cluster to Nautilus\u00a0<b>after<\/b>\u00a0you have upgraded: Follow the guide\u00a0<a title=\"Ceph Luminous to Nautilus\" href=\"https:\/\/pve.proxmox.com\/wiki\/Ceph_Luminous_to_Nautilus\">Ceph Luminous to Nautilus<\/a><\/li>\n<\/ul>\n<h2><span id=\"Testing_the_Upgrade\" class=\"mw-headline\">Testing the Upgrade<\/span><\/h2>\n<p>An upgrade test can easily be performed using a standalone server first. Install the Proxmox VE 5.4 ISO on some test hardware; then upgrade this installation to the latest minor version of Proxmox VE 5.4 (see\u00a0<a class=\"mw-redirect\" title=\"Package repositories\" href=\"https:\/\/pve.proxmox.com\/wiki\/Package_repositories\">Package repositories<\/a>). To replicate the production setup as closely as possible, copy or create all relevant configurations to the test machine. Then start the upgrade. It is also possible to install Proxmox VE 5.4 in a VM and test the upgrade in this environment.<\/p>\n<h2><span id=\"Actions_step-by-step\" class=\"mw-headline\">Actions step-by-step<\/span><\/h2>\n<p>The following actions need to be done on the command line of each Proxmox VE node in your cluster (via console or ssh; preferably via console to avoid interrupted ssh connections). Remember: make sure that a valid backup of all VMs and CTs has been created before proceeding.<\/p>\n<h3><span id=\"Continuously_use_the_pve5to6_checklist_script\" class=\"mw-headline\">Continuously use the\u00a0<b>pve5to6<\/b>\u00a0checklist script<\/span><\/h3>\n<p>A small checklist program named\u00a0<b>pve5to6<\/b>\u00a0is included in the latest Proxmox VE 5.4 packages. The program will provide hints and warnings about potential issues before, during and after the upgrade process. One can call it by executing:<\/p>\n<pre> pve5to6\r\n<\/pre>\n<p>This script only\u00a0<b>checks<\/b>\u00a0and reports things. By default, no changes to the system are made and thus none of the issues will be automatically fixed. One should have in mind that Proxmox VE can be heavily customized, so the script may not recognize all the possible problems of a particular setup!<\/p>\n<p>It is recommended to re-run the script after each attempt to fix an issue. This ensures that the actions taken actually fixed the respective warning.<\/p>\n<h3><span id=\"Cluster:_always_upgrade_to_Corosync_3_first\" class=\"mw-headline\">Cluster: always upgrade to Corosync 3 first<\/span><\/h3>\n<p>With Corosync 3 the on-the-wire format has changed. It is now incompatible with Corosync 2.x because it switched out the underlying multicast UDP stack with kronosnet. Configuration files generated by a Proxmox VE with version 5.2 or newer, are already compatible with the new Corosync 3.x (at least enough to process the upgrade without any issues).<\/p>\n<p><b>Important Note:<\/b>\u00a0before the upgrade, stop all HA management services first\u2014no matter which way you choose for upgrading to Corosync 3. Stopping all HA services ensures that no cluster nodes get fenced during the upgrade. This also means that there will not be any HA functionality available for the short duration of the Corosync upgrade.<\/p>\n<p>First, make sure that all warnings that are reported by the checklist script and not related to Corosync are fixed or determined to be benign\/false negatives. Next, stop the local resource manager &#8220;pve-ha-lrm&#8221; on each node. Only after they have been stopped, also stop the cluster resource manager &#8220;pve-ha-crm&#8221; on each node; use the GUI (Node -&gt; Services) or the CLI by running the following command on each node:<\/p>\n<pre>systemctl stop pve-ha-lrm\r\n<\/pre>\n<p>Only\u00a0<b>after<\/b>\u00a0the above was done for\u00a0<b>all<\/b>\u00a0nodes, run the following on each node:<\/p>\n<pre>systemctl stop pve-ha-crm\r\n<\/pre>\n<p>Then add the Proxmox Corosync 3 Stretch repository:<\/p>\n<pre>echo \"deb <a class=\"external free\" href=\"http:\/\/download.proxmox.com\/debian\/corosync-3\/\" rel=\"nofollow\">http:\/\/download.proxmox.com\/debian\/corosync-3\/<\/a> stretch main\" &gt; \/etc\/apt\/sources.list.d\/corosync3.list\r\n<\/pre>\n<p>and run<\/p>\n<pre>apt update\r\n<\/pre>\n<p>Then make sure again that only corosync, kronosnet and their libraries will be updated or newly installed:<\/p>\n<pre>apt list --upgradeable\r\nListing... Done\r\ncorosync\/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1]\r\nlibcmap4\/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1]\r\nlibcorosync-common4\/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1]\r\nlibcpg4\/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1]\r\nlibqb0\/stable 1.0.5-1~bpo9+2 amd64 [upgradable from: 1.0.3-1~bpo9]\r\nlibquorum5\/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1]\r\nlibvotequorum8\/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1]\r\n<\/pre>\n<p>There are two ways to proceed with the Corosync upgrade:<\/p>\n<ul>\n<li>Upgrade nodes one by one. Initially, the newly upgraded node(s) will not have be quorate on their own. Once at least half of the nodes plus one have been upgraded, the upgraded partition will become quorate and the not-yet-upgraded partition will lose quorum. Once all nodes have been upgraded, they should form a healthy, quorate cluster again.<\/li>\n<li>Upgrade all nodes simultaneously, e.g. using parallel ssh\/screen\/tmux.<\/li>\n<\/ul>\n<p><b>Note:<\/b>\u00a0changes to any VM\/CT or the cluster in general are not allowed for the duration of the upgrade!<\/p>\n<p>Pre-download the upgrade to corosync-3 on all nodes, e.g., with:<\/p>\n<pre> apt dist-upgrade --download-only\r\n<\/pre>\n<p>Then run the actual upgrade on all nodes:<\/p>\n<pre> apt dist-upgrade\r\n<\/pre>\n<p>At any point in this procedure, the local view of the cluster quorum on a node can be verified with:<\/p>\n<pre> pvecm status\r\n<\/pre>\n<p>Once the update to Corosync 3.x is done\u00a0<b>on all nodes<\/b>, restart the local resource manager and cluster resource manager on all nodes:<\/p>\n<pre> systemctl start pve-ha-lrm\r\n systemctl start pve-ha-crm\r\n<\/pre>\n<h3><span id=\"Move_important_Virtual_Machines_and_Containers\" class=\"mw-headline\">Move important Virtual Machines and Containers<\/span><\/h3>\n<p>If any VMs and CTs need to keep running for the duration of the upgrade, migrate them away from the node that is currently upgraded. A migration of a VM or CT from an older version of Proxmox VE to a newer version will always work. A migration from a newer Proxmox VE version to an older version may work, but is in general not supported. Keep this in mind when planning your cluster upgrade.<\/p>\n<h3><span id=\"Update_the_configured_APT_repositories\" class=\"mw-headline\">Update the configured APT repositories<\/span><\/h3>\n<p>First, make sure that the system is running using the latest Proxmox VE 5.4 packages:<\/p>\n<pre>apt update\r\napt dist-upgrade\r\n<\/pre>\n<p>Update all Debian repository entries to Buster.<\/p>\n<pre>sed -i 's\/stretch\/buster\/g' \/etc\/apt\/sources.list\r\n<\/pre>\n<p>Disable all Proxmox VE 5.x repositories. This includes the pve-enterprise repository, the pve-no-subscription repository and the pvetest repository.<\/p>\n<p>To do so add the # symbol to comment out these repositories in the \/etc\/apt\/sources.list.d\/pve-enterprise.list and \/etc\/apt\/sources.list files. See\u00a0<a title=\"Package Repositories\" href=\"https:\/\/pve.proxmox.com\/wiki\/Package_Repositories\">Package_Repositories<\/a><\/p>\n<h3><span id=\"Add_the_Proxmox_VE_6_Package_Repository\" class=\"mw-headline\">Add the Proxmox VE 6 Package Repository<\/span><\/h3>\n<pre>echo \"deb <a class=\"external free\" href=\"https:\/\/enterprise.proxmox.com\/debian\/pve\" rel=\"nofollow\">https:\/\/enterprise.proxmox.com\/debian\/pve<\/a> buster pve-enterprise\" &gt; \/etc\/apt\/sources.list.d\/pve-enterprise.list\r\n<\/pre>\n<p>For the no-subscription repository see\u00a0<a title=\"Package Repositories\" href=\"https:\/\/pve.proxmox.com\/wiki\/Package_Repositories\">Package Repositories<\/a><\/p>\n<p><b>(Ceph only)<\/b>\u00a0Replace ceph.com repositories with proxmox.com ceph repositories<\/p>\n<pre>echo \"deb <a class=\"external free\" href=\"http:\/\/download.proxmox.com\/debian\/ceph-luminous\" rel=\"nofollow\">http:\/\/download.proxmox.com\/debian\/ceph-luminous<\/a> buster main\" &gt; \/etc\/apt\/sources.list.d\/ceph.list\r\n<\/pre>\n<p>If there is a backports line, remove it &#8211; currently, the upgrade has not been tested with packages from the backports repository installed.<\/p>\n<p>Update the repositories data:<\/p>\n<pre>apt update\r\n<\/pre>\n<h3><span id=\"Upgrade_the_system_to_Debian_Buster_and_Proxmox_VE_6.0\" class=\"mw-headline\">Upgrade the system to Debian Buster and Proxmox VE 6.0<\/span><\/h3>\n<p>This action will take some time depending on the system performance &#8211; up to 60 min or more. On high-performance servers with SSD storage, the dist-upgrade can be finished in 5 minutes.<\/p>\n<p>Start with this step to get the initial set of upgraded packages:<\/p>\n<pre> apt dist-upgrade\r\n<\/pre>\n<p>During the steps above, you may be asked to approve some of the new packages replacing configuration files. They are not relevant to the Proxmox VE upgrade, so you can choose what you want to do.<\/p>\n<p>Reboot the system in order to use the new PVE kernel<\/p>\n<h2><span id=\"After_the_Proxmox_VE_upgrade\" class=\"mw-headline\">After the Proxmox VE upgrade<\/span><\/h2>\n<h3><span id=\"For_Clusters\" class=\"mw-headline\">For Clusters<\/span><\/h3>\n<ul>\n<li>remove extra the corosync 3 repository used to upgrade corosync on PVE 5 \/ Stretch if not done already. If you followed the steps here you can simply execute the following command to do so:<\/li>\n<\/ul>\n<pre>rm \/etc\/apt\/sources.list.d\/corosync3.list\r\n<\/pre>\n<h3><span id=\"For_Hyperconverged_Ceph\" class=\"mw-headline\">For Hyperconverged Ceph<\/span><\/h3>\n<p>Now you should upgrade the Ceph cluster to the Nautilus release, following the article\u00a0<a title=\"Ceph Luminous to Nautilus\" href=\"https:\/\/pve.proxmox.com\/wiki\/Ceph_Luminous_to_Nautilus\">Ceph Luminous to Nautilus<\/a>.<\/p>\n<h2><span id=\"Checklist_issues\" class=\"mw-headline\">Checklist issues<\/span><\/h2>\n<h3><span id=\"proxmox-ve_package_is_too_old\" class=\"mw-headline\">proxmox-ve package is too old<\/span><\/h3>\n<p>Check the configured package repository entries (see\u00a0<a title=\"Package Repositories\" href=\"https:\/\/pve.proxmox.com\/wiki\/Package_Repositories\">Package_Repositories<\/a>) and run<\/p>\n<pre>apt update\r\n<\/pre>\n<p>followed by<\/p>\n<pre>apt dist-upgrade\r\n<\/pre>\n<p>to get the latest PVE 5.x packages\u00a0<b>before<\/b>\u00a0upgrading to PVE 6.x<\/p>\n<h3><span id=\"corosync_2.x_installed.2C_cluster-wide_upgrade_to_3.x_needed.21\" class=\"mw-headline\">corosync 2.x installed, cluster-wide upgrade to 3.x needed!<\/span><\/h3>\n<p>See section\u00a0<a href=\"https:\/\/pve.proxmox.com\/wiki\/Upgrade_from_5.x_to_6.0#Cluster:_always_upgrade_to_Corosync_3_first\">Upgrade to corosync 3\u00a0<b>first<\/b><\/a><\/p>\n<h2><span id=\"Troubleshooting\" class=\"mw-headline\">Troubleshooting<\/span><\/h2>\n<ul>\n<li>Failing upgrade to &#8220;buster&#8221;<\/li>\n<\/ul>\n<p>Make sure that the repository configuration for Buster is correct.<\/p>\n<p>If there was a network failure and the upgrade has been made partially try to repair the situation with<\/p>\n<pre>apt -f install<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Proxmox VE 6.x introduces several new major features. Carefully plan the upgrade, make and verify backups before beginning, and test extensively. Depending on the existing configuration, several manual steps\u2014including some downtime\u2014may be required. Note:\u00a0A valid and tested backup is\u00a0always\u00a0needed before starting the upgrade process. Test the backup beforehand in a test lab setup. In [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[455,477,1,730,830,42,51,495,691],"tags":[1369,1370,1213,693,921,1368],"class_list":["post-4721","post","type-post","status-publish","format-standard","hentry","category-apache2","category-backup-2","category-viazap","category-clusterweb","category-debian","category-leitura-recomendada","category-linux-linuxrs","category-profissional-de-ti","category-virtualizacao-2","tag-5-x","tag-6-0","tag-from","tag-proxmox","tag-to","tag-upgrade"],"_links":{"self":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4721"}],"version-history":[{"count":1,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4721\/revisions"}],"predecessor-version":[{"id":4722,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4721\/revisions\/4722"}],"wp:attachment":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}