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.)
Set all Hosts to disable mode to stop all monitoring processes.
onehost disable <host_id>
Stop OpenNebula and any other related services you may have running: OneFlow, OneGate and FireEdge. To stop OpenNebula, it’s preferable to use the system tools, like systemctl
or service
running as user root
. For example (note that opennebula-scheduler
is no longer used in 7.0 or newer):
systemctl stop opennebula opennebula-flow.service opennebula-gate.service opennebula-hem.service opennebula-scheduler.service opennebula-fireedge.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-scheduler.service opennebula-fireedge.service
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
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.
Ubuntu/Debian
apt-get update
apt-get install --only-upgrade opennebula opennebula-gate opennebula-flow opennebula-fireedge opennebula-migration python3-pyone
RHEL
yum upgrade opennebula opennebula-gate opennebula-flow opennebula-fireedge opennebula-migration python3-pyone
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
.
/etc/one/sunstone-views.yaml
file. After completing the onecfg upgrade
step, restore this file to its original location. Once the upgrade process is finalized, the file can be safely deleted.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.0.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.0.0
- from 6.10.0 to 6.10.2 (YAML, Ruby)
- from 6.10.2 to 7.0.0 (YAML, Ruby)
After running onecfg status
, you might encounter one of the following messages:
Unknown Configuration Version Error
: No action is required. The configuration version will be initialized automatically during the OpenNebula upgrade, based on the existing version.
Configuration Metadata Outdated Error
: This indicates that a configuration upgrade was skipped during a previous OpenNebula upgrade. To resolve this, reinitialize the configuration state with onecfg init --force
. This will discard any unprocessed configuration upgrades.
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.0.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.0.0
Config: 7.0.0
--- Available Configuration Updates -------
No updates available.
/etc/one/sunstone-views.yaml
file to /etc/one
before execute the following command.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.0.0.rb
> Done in 0.00s
Database migrated from 6.10.0 to 7.0.0 (OpenNebula 7.0.0) by onedb command.
>>> Running migrators for local tables
> Running migrator /usr/lib/one/ruby/onedb/local/6.10.0_to_7.0.0.rb
> Done in 0.08s
Database migrated from 6.10.0 to 7.0.0 (OpenNebula 7.0.0) by onedb command.
Total time: 0.12s
First, move the 7.0 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
/etc/one/sunstone-views.yaml
.Start OpenNebula and any other related services: OneFlow, OneGate and FireEdge. First reload the new systemd unit files:
systemctl daemon-reload
Then restart the services:
systemctl start opennebula opennebula-flow.service opennebula-gate.service opennebula-hem.service opennebula-fireedge.service
If you have any custom monitoring probes, follow these instructions to update them to the new monitoring system
Update the virtualization, storage, and networking drivers. As the oneadmin
user, execute:
onehost sync
Then 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>
<hypervisor>
tag should be replaced by the name of the corresponding hypervisor (i.e., kvm
or lxc
).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.
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
).
If for any reason you need to restore your previous OpenNebula, simply uninstall OpenNebula 7.0 and reinstall your previous version. After that, update the drivers if needed, as outlined in Step 12.
Was this information helpful?
Glad to hear it
Sorry to hear that