Azure Virtual Machines
Upgrade Linux Ubuntu VM to 22.04 and 24.04
My steps:
sudo apt update
sudo apt upgrade
- reboot
- shutdown VM
- create a snapshot of OS disk
- boot VM
- UPGRADE steps:
sudo do-release-upgrade
- at the beginning of the process, a new sshd will be started. Take note of the port (i.e. 1022).
- could appear messages of locally modified configration file like ‘a new version (/usr/share/chrony/chrony.conf) of configuration file /etc/chrony/chrony.conf is available, but the version installed currently has been locally modified’. Often the best option is
keep the local version currently installed
. Or ‘Configuration file ‘/etc/default/useradd’ –>keep your currently-installed version
- at the end, reboot the VM
- delete os disk snapshot if everthing works fine
Good luck!
Official Ubuntu documentation for upgrading HERE
-
Remove old 2.0 diagnostic extension from Linux VM
az vm extension list --resource-group MyResGroupName --vm-name MyVMName
az vm extension delete --name Microsoft.Insights.VMDiagnosticsSettings --resource-group MyResGroupName --vm-name MyVMName