Upgrading Single Front-end

If you are upgrading from OpenNebula 7.4.0 or 7.4.1 to 7.4.2, follow the reduced maintenance upgrade procedure below. If you are running 7.2.x or an earlier version, follow Upgrading from 6.x and higher.

Upgrading from 7.4.x

You can upgrade directly from OpenNebula 7.4.0 or 7.4.1 to 7.4.2 without installing intermediate releases. The upgrade preserves existing users, Hosts, resources, and configurations. The database schema remains at version 7.4.0, so no database schema upgrade is required.

OpenNebula 7.4.2 includes configuration migrations. You must run onecfg upgrade after upgrading the packages, including when upgrading directly from 7.4.0.

Check Virtual Machines and Disable Hosts

Wait until no VMs are in a transient state (prolog, migrate, epilog, save), as described in Virtual Machine Instances. Disable all Hosts to stop monitoring:

onehost disable <HOST_ID>

Stop Services and Back up OpenNebula

Stop all installed OpenNebula services including OneForm and OneKS when present:

systemctl stop opennebula opennebula-flow.service opennebula-gate.service opennebula-hem.service opennebula-fireedge.service opennebula-form.service opennebula-ks.service

Then make sure every OpenNebula process is stopped. For example:

systemctl is-active opennebula opennebula-flow.service opennebula-gate.service opennebula-hem.service opennebula-fireedge.service opennebula-form.service opennebula-ks.service

Then back up the configuration files and database before replacing the packages.

Upgrade Packages and Configuration

Before upgrading the packages, use onecfg status to check that configuration migrations for your currently installed version have been completed. Resolve any pending migrations using the Configuration Management guide.

Update the OpenNebula package repository, then upgrade all installed Front-end packages. Keep your modified configuration files when prompted by the package manager.

Run the configuration migration:

onecfg upgrade

Resolve any conflicts using the configuration upgrade instructions. Then run onecfg status and confirm that the configuration is up to date, with no errors or available updates.

Start Services and Complete Feature Updates

Reload the systemd unit files and start the services that were running before the upgrade. Complete the 7.4.2 feature configuration updates for the features you use.

Update Hypervisors and Enable Hosts

Upgrade the hypervisor packages and synchronize the drivers, then enable all Hosts. Check the logs and resource commands as described under Testing.

Feature Updates for 7.4.2

After upgrading to 7.4.2, complete the Sunstone configuration updates for the features you use. When upgrading directly from 7.4.0, also review the Sunstone configuration updates for 7.4.1.

If you use OneKS, update the OneKS appliance and enable monitoring to use the new monitoring and application management features.

Upgrading from 6.x and higher

Step 1. Check Virtual Machine Status

Before proceeding, make sure you don’t have any VMs in a transient state (prolog, migrate, epilog, save). Wait until these VMs get to a final state (running, suspended, stopped, done). (For more information on the life cycle of Virtual Machines, please see Virtual Machine Instances.)

Step 2. Set All Hosts to Disable Mode

Set all Hosts to disable mode to stop all monitoring processes.

onehost disable <HOST_ID>

Step 3. Stop OpenNebula

Stop all installed OpenNebula services, including OneFlow, OneGate, FireEdge, OneForm, and OneKS when present. Use the system tools, such as systemctl or service, as root. Adjust the following example to include only the services installed on your Front-end. For releases earlier than 7.0, also include opennebula-scheduler.service if installed:

systemctl stop opennebula opennebula-flow.service opennebula-gate.service opennebula-hem.service opennebula-fireedge.service opennebula-form.service opennebula-ks.service

Then make sure every OpenNebula process is stopped. For example:

systemctl is-active opennebula opennebula-flow.service opennebula-gate.service opennebula-hem.service opennebula-fireedge.service opennebula-form.service opennebula-ks.service

Step 4. Back up OpenNebula Configuration

Back up the configuration files located in /etc/one and /var/lib/one/remotes/etc. You don’t need to do a manual backup of your database; the onedb command will perform one automatically.

cp -ra /etc/one /etc/one.$(date +'%Y-%m-%d')
cp -ra /var/lib/one/remotes/etc /var/lib/one/remotes/etc.$(date +'%Y-%m-%d')
onedb backup

Step 5. Upgrade OpenNebula Packages Repository

In order to be able to retrieve the packages for the latest version, you need to update the OpenNebula packages repository. The instructions for doing this are detailed here.

Step 6. Upgrade to the New Version

Upgrade all installed OpenNebula components. The examples below include OneForm (opennebula-form) and OneKS (opennebula-ks); omit packages that are not installed and add any other OpenNebula component packages installed on your Front-end.

Ubuntu/Debian

apt-get update
apt-get install --only-upgrade opennebula opennebula-gate opennebula-flow opennebula-fireedge opennebula-form opennebula-ks opennebula-migration python3-pyone

RHEL

yum upgrade opennebula opennebula-gate opennebula-flow opennebula-fireedge opennebula-form opennebula-ks opennebula-guacd opennebula-migration python3-pyone

SLES/openSUSE

zypper refresh
zypper update opennebula opennebula-gate opennebula-flow opennebula-fireedge opennebula-form opennebula-ks opennebula-guacd opennebula-migration python313-pyone

Step 7. Update Configuration Files

In High Availability (HA) setups, you must replace the default value auto of the MONITOR_ADDRESS parameter in /etc/one/monitord.conf with the virtual IP address used in the RAFT_LEADER_HOOK and RAFT_FOLLOWER_HOOK settings in /etc/one/oned.conf.

Before upgrading OpenNebula, ensure that the configuration state is clean, with no pending migrations from previous or outdated configurations. To verify this, run onecfg status. A clean state should produce output similar to:

onecfg status
--- Versions ------------------------------
OpenNebula:  7.4.0
Config:      6.10.0

--- Backup to Process ---------------------
Snapshot:    /var/lib/one/backups/config/2025-06-27_11:05:47-v6.10.0
(will be used as one-shot source for next update)

--- Available Configuration Updates -------
New config:  7.4.0
- from 6.10.0 to 6.10.2 (YAML, Ruby)
- from 6.10.2 to 7.4.0 (YAML, Ruby)

After confirming the configuration state, in most cases you can proceed with the following command, which uses OpenNebula’s internal version tracking to apply the appropriate configuration updates:

onecfg upgrade
ANY   : Found backed up configuration to process!
ANY   : Snapshot to update from '/var/lib/one/backups/config/2025-06-27_11:05:47-v6.10.0'
ANY   : Backup stored in '/var/lib/one/backups/config/2025-06-27_11:39:36_30392'
ANY   : Configuration updated to 7.4.0

If you get conflicts when running the onecfg upgrade, refer to the onecfg upgrade basic usage documentation on how to upgrade and troubleshoot the configurations, in particular the onecfg upgrade doc and the Troubleshooting section.

Finally, check the configuration state via onecfg status. There should be no errors and no new updates available. Your configuration should be up to date for the currently installed OpenNebula version. For example:

--- Versions ------------------------------
OpenNebula:  7.4.0
Config:      7.4.0

--- Available Configuration Updates -------
No updates available.

Step 8. Upgrade the Database Version

Simply run the onedb upgrade -v command. The connection parameters are automatically retrieved from /etc/one/oned.conf. Example:

onedb upgrade -v
Version read:
Shared tables 6.10.0 : OpenNebula 6.10.0 (5d6b8571) daemon bootstrap
Local tables  6.10.0 : OpenNebula 6.10.0 (5d6b8571) daemon bootstrap

Sqlite database backup stored in /var/lib/one/one.db_2025-6-27_11:45:51.bck
Use 'onedb restore' to restore the DB.

>>> Running migrators for shared tables
  > Running migrator /usr/lib/one/ruby/onedb/shared/6.10.0_to_7.4.0.rb
  > Done in 0.00s

Database migrated from 6.10.0 to 7.4.0 (OpenNebula 7.4.0) by onedb command.

>>> Running migrators for local tables
  > Running migrator /usr/lib/one/ruby/onedb/local/6.10.0_to_7.4.0.rb
  > Done in 0.08s

Database migrated from 6.10.0 to 7.4.0 (OpenNebula 7.4.0) by onedb command.

Total time: 0.12s

Step 9. Check DB Consistency

First, move the 7.4 backup file created by the upgrade command to a safe place. If you face any issues the onedb command can restore this backup, but it won’t downgrade databases to previous versions. Then, execute the onedb fsck command:

$ onedb fsck
MySQL dump stored in /var/lib/one/mysql_localhost_opennebula.sql
Use 'onedb restore' or restore the DB using the mysql command:
mysql -u user -h server -P port db_name < backup_file

Total errors found: 0

Step 10. Start OpenNebula

Start the OpenNebula services that were running before the upgrade, including OneFlow, OneGate, FireEdge, OneForm, and OneKS when present. First reload the new systemd unit files:

systemctl daemon-reload

Then start the services, adjusting the list to match those that were running before the upgrade:

systemctl start opennebula opennebula-flow.service opennebula-gate.service opennebula-hem.service opennebula-fireedge.service opennebula-form.service opennebula-ks.service

Step 11. Restore Custom Probes

If you have any custom monitoring probes, follow these instructions to update them to the new monitoring system

Step 12. Update the Hypervisors

Log in to your hypervisor Hosts and update the opennebula-node packages. NOTE: you may need to upgrade the software repository as described above.

Ubuntu/Debian

apt-get update
apt-get install --only-upgrade opennebula-node-<hypervisor>

RHEL

yum upgrade opennebula-node-<hypervisor>

SLES/openSUSE

zypper refresh
zypper update opennebula-node-<hypervisor>

Then update the virtualization, storage, and networking drivers. As the oneadmin user, execute:

onehost sync

Step 13. Enable Hosts

Enable all Hosts, disabled in step 2:

onehost enable <HOST_ID>

If upgrading from a version earlier than 6.0, please see Upgrading from Previous Versions.

Testing

OpenNebula will continue the monitoring and management of your previous Hosts and VMs.

As a measure of caution, look for any error messages in oned.log, and check that all drivers are loaded successfully. You may also try some show subcommand for some resources to check everything is working (e.g., onehost show or onevm show).

Restoring the Previous Version

If for any reason you need to restore your previous OpenNebula, simply uninstall OpenNebula 7.4 and reinstall your previous version. After that, update the drivers if needed, as outlined in Step 12.