Upgrading Ubuntu 16.04 to Ubuntu 18.04
This article walks through the process of upgrading an Ubuntu 16.04 (Xenial) host running OpenStack workloads to 18.04 (Bionic).
Ubuntu 16.04 is now deprecated and will not be supported with the next (5.3) release of Platform9 Managed OpenStack.
Steps
Prepare the host for the upgrade
Ensure that you are running Platform9 version 4.2.0 or later. Please reach out to Platform9 support to upgrade.
If you have workloads running on this host, you will need to either gracefully shut down the workloads or live-migrate them to another host before you proceed. Please refer to these guides to live-migrate volumes and instances.
Package/Kernel Upgrades
- Upgrade packages on 16.04 to their latest version.
sudo apt update
sudo apt upgrade
- Reboot the host if there were kernel upgrades.
sudo reboot
Disk Cleanup
Remember to have at least 20GB of free disk space under your root partition /
before you begin the upgrade. A good place to cleanup is /boot
which stores all previously installed kernels; the older kernels are safe to delete.
- Identify the current kernel version used.
uname -a
- Fetch the list of available kernels.
dpkg --list | grep linux-image
- Cleanup all kernels with versions lower than your current kernel version.
sudo apt-get purge linux-image-x.x.x.x-generic
We use do-release-upgrade
to upgrade to the next LTS release. For recoverability in case of failure, do-release-upgrade
opens another SSH session on port 1022
. If you have a firewall blocking access to that port, you would need to open that up now.
For example, if you are using ufw
:
sudo ufw allow 1022/tcp
Alternatively, if you use iptables
:
iptables -I INPUT -p tcp --dport 1022 -j ACCEPT
Upgrading to Ubuntu 18.04
- Once the packages installed have all been upgraded to their latest versions, kickoff the Ubuntu upgrade to the next LTS version - which, in this case, is 18.04.
sudo do-release-upgrade

- This fetches the updated package list for bionic and prompts you to continue to begin downloading packages.

- As the installation proceeds, you will be periodically prompted to choose if you want an updated config file for various services. Remember to pick
keep the local version currently installed.

- Once the installation completes, reboot the host.