Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 89 additions & 10 deletions content/software/upgrade_process/upgrade_guide/upgrading_single.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,89 @@ weight: "3"

<a id="upgrade-single"></a>

If you are upgrading from a 7.2.x installation you only need to follow a reduced set of steps. If you are running a 6.10.x version or older, please check [this set of steps]({{% relref "./upgrading_single.html#upgrade-6" %}}) (some additional steps may be necessary, please review them at the end of this section).


<!--# Upgrading Single Front-end Deployments -->
{{< alert title="Important" type="info" >}}
If you haven’t done so, please enable the [OpenNebula and needed 3rd party repositories]({{% relref "frontend_install#setup-opennebula-repos" %}}) before attempting the upgrade process.{{< /alert >}}

<a id="upgrade-7"></a>
## Upgrading from 7.2.x

This section describes the installation procedure for systems that are already running a 7.2.x OpenNebula. The upgrade to OpenNebula 7.2 can be done directly by following this section, you don’t need to perform intermediate version upgrades. The upgrade will preserve all current users, Hosts, resources and configurations.

When performing a minor upgrade OpenNebula adheres to the following convention to ease the process:

- No changes are made to the configuration files, so no configuration file will be changed during the upgrade.
- Database versions are preserved, so no upgrade of the database schema is needed.

When a critical bug requires an exception to the previous rules it will be explicitly noted in this guide.

### Step 1. Stop OpenNebula Services

Before proceeding, make sure you don’t have any VMs in a transient state (prolog, migr, epil, save). Wait until these VMs reach a final state (running, suspended, stopped, done). Check the [Managing Virtual Machines guide]({{% relref "product/virtual_machines_operation/virtual_machines/vm_instances#vm-guide-2" %}}) for more information on the VM life-cycle in OpenNebula.

Now you are ready to stop OpenNebula and any other related services you may have running, e.g. Sunstone or OneFlow. It’s preferable to use the system tools, like systemctl or service as root in order to stop the services.

### Step 2. Upgrade Front-end to the New Version

Upgrade the OpenNebula software using the package manager of your OS. Refer to the [Single Front-end Installation guide]({{% relref "frontend_install" %}}) for a complete list of the OpenNebula packages installed on your system. Package repos must be pointing to the latest version (7.2).

For example, in CentOS/RHEL simply execute:

```bash
yum upgrade opennebula
```

For Debian/Ubuntu use:

```bash
apt-get update
apt-get install --only-upgrade opennebula
```

### Step 3. Upgrade Hypervisors to the New Version

Upgrade the OpenNebula node KVM or LXC packages, using the package manager of your OS.

For example, in an rpm-based Linux distribution simply execute:

```bash
yum upgrade opennebula-node-kvm
```

For deb-based distros use:

```bash
apt-get update
apt-get install --only-upgrade opennebula-node-kvm
```

{{< alert title="Note" type="info" >}}
If you are using LXC the package is `opennebula-node-lxc`.
{{< /alert >}}

### Step 4. Update the Drivers

You should now be able to start OpenNebula as usual, running `service opennebula start` as `root`. At this point, as `oneadmin` user, execute `onehost sync` to update the new drivers in the Hosts.

{{< alert title="Note" type="info" >}}
You can skip this step if you are not using KVM Hosts, or any Hosts that use remote monitoring probes.
{{< /alert >}}

### 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. After that, keep an eye on oned.log while you issue the onevm, onevnet, oneimage, oneuser, onehost **list** commands. Try also using the **show** subcommand for some resources.

### Restoring the Previous Version

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

<a id="upgrade-6"></a>

## Upgrading from 6.x and higher

### Step 1. Check Virtual Machine Status
Expand Down Expand Up @@ -98,17 +177,17 @@ Before upgrading OpenNebula, ensure that the configuration state is clean, with
```default
$ onecfg status
--- Versions ------------------------------
OpenNebula: 7.0.0
OpenNebula: 7.2.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
New config: 7.2.0
- from 6.10.0 to 6.10.2 (YAML, Ruby)
- from 6.10.2 to 7.0.0 (YAML, Ruby)
- from 6.10.2 to 7.2.0 (YAML, Ruby)
```

{{< alert title="Note" type="info" >}}
Expand All @@ -125,7 +204,7 @@ After confirming the configuration state, in most cases you can proceed with the
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
ANY : Configuration updated to 7.2.0
```

If you get conflicts when running the `onecfg` upgrade, refer to the [onecfg upgrade basic usage documentation]({{% relref "../configuration_management_ee/usage#cfg-usage" %}}) on how to upgrade and troubleshoot the configurations, in particular the [onecfg upgrade doc]({{% relref "../configuration_management_ee/usage#cfg-upgrade" %}}) and the [Troubleshooting section]({{% relref "../configuration_management_ee/conflicts#cfg-conflicts" %}}).
Expand All @@ -134,8 +213,8 @@ Finally, check the configuration state via `onecfg status`. There should be no e

```default
--- Versions ------------------------------
OpenNebula: 7.0.0
Config: 7.0.0
OpenNebula: 7.2.0
Config: 7.2.0

--- Available Configuration Updates -------
No updates available.
Expand All @@ -158,16 +237,16 @@ 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
> Running migrator /usr/lib/one/ruby/onedb/shared/6.10.0_to_7.2.0.rb
> Done in 0.00s

Database migrated from 6.10.0 to 7.0.0 (OpenNebula 7.0.0) by onedb command.
Database migrated from 6.10.0 to 7.2.0 (OpenNebula 7.2.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
> Running migrator /usr/lib/one/ruby/onedb/local/6.10.0_to_7.2.0.rb
> Done in 0.08s

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

Total time: 0.12s
```
Expand Down
Loading