Veeam Backup (EE)
The OpenNebula-Veeam® Backup Integration exposes an oVirt-compatible REST API through the oVirtAPI server component, allowing Veeam to connect to OpenNebula as if it were an oVirt/RHV hypervisor. Veeam discovers OpenNebula resources through oVirtAPI and pulls backup data from hypervisors through the OpenNebula Backup Exporter (OneBEX). This integration enables image-level backups — incremental backups based on Changed Block Tracking (CBT) — and granular restores such as full VM and file-level restores from the Veeam console. This integration is exclusive to the OpenNebula Enterprise Edition (EE).
Features
| Area | Benefit | Description |
|---|---|---|
| Data Protection | Agentless, Image-Level Backups | Protect entire VMs without installing or managing agents inside the guest OS. |
| Efficiency | Incremental Backups (CBT) | Leverages Change Block Tracking (CBT) via the API to back up only the data that has changed, reducing backup windows. |
| Native Integration | Uses Standard Veeam Workflow | Connect OpenNebula as a standard “oVirt” hypervisor in Veeam. No additional custom Veeam plug-ins are required. |
| Recovery | Flexible Restore Options | Enables Full VM restores, instant VM recovery, and file-level restores directly from the Veeam B&R console. |
| Automation | Full Discovery | Veeam automatically discovers and displays the OpenNebula Cluster hierarchy (Clusters, Hosts, VMs, and storage). |
| Portability | VMWare import | Enables restoring Virtual Machines backed up in Veeam from VMWare into OpenNebula. |
Compatibility
The oVirtAPI module is compatible with the Veeam Backup & Replication version specified in the Platform Notes.
The following table summarizes the supported backup modes for each storage system:
| Storage | Full | Incremental |
|---|---|---|
| File (qcow2) | Yes | Yes |
| File (raw) | No† | No† |
| Ceph (RBD) | Yes | Yes |
| LVM | Yes | Yes |
| NetApp | No† | No† |
| PureFA | No† | No† |
† File (raw) and NetApp backup modes were supported in previous OpenNebula versions, such as 7.0 and 7.2. In OpenNebula version 7.4, they are not supported by the current OneBEX-based integration, but are planned to be supported in future maintenance releases.
Volatile Disk Backups
Volatile disks cannot be backed up by default. To back up volatile disks, enable this functionality in the OpenNebula Virtual Machine configuration by setting the BACKUP_VOLATILE parameter to YES. Otherwise, the disk is not listed in Veeam. For more information about volatile disk backups in OpenNebula, see the backup documentation page.
Limitations
The following is a list of the limitations affecting the Veeam integration with OpenNebula:
- The KVM appliance deployed by Veeam does not include context packages. To configure the appliance network, either manually choose any available free IP in the management network or set up a DHCP service.
- Alpine Virtual Machines cannot be backed up.
- During upload image transfers, you may see a warning message stating
Unable to use transfer URL for image transfer: Switched to proxy URL. Backup performance may be affected. This is expected and shouldn’t affect performance. - Spaces are not allowed in Virtual Machine names in the integration. Avoid using them, even if they are allowed in OpenNebula itself, to prevent issues when performing in-place restores.
If you encounter other issues or bugs, check the Known Issues page for Veeam-related issues.
Architecture
To ensure a compatible integration between OpenNebula and Veeam Backup, the following components and network configuration are required:
- Veeam Workers: Deployed from the Veeam server to process backups and restores.
- oVirtAPI Server: Exposes the oVirt-compatible API on TCP ports 80 (HTTP) and 443 (HTTPS). These ports are required for the Veeam integration; using other ports breaks the integration. The server can run on the OpenNebula Front-end or in a separate environment, such as a VM, if these ports are unavailable on the Front-end. A separate deployment may degrade performance.
- OpenNebula Backup Exporter (OneBEX): Runs on demand on the OpenNebula hypervisors and exposes VM backup data to Veeam. See Interactive Backup Integrations for implementation details.
- Veeam (interactive) Backup Datastore: An OpenNebula
BACKUP_DSusingDS_MAD="interactive"andVEEAM_DS="YES". This datastore coordinates Veeam backup operations and tracks backup metadata. The backup itself is stored in the Veeam repository. - Management Network: Provides connectivity between all of the following components:
- OpenNebula Front-end
- oVirtAPI Server, if deployed separately
- OpenNebula OneBEX endpoint on each hypervisor
- All OpenNebula Hosts running VMs to be backed up
- Veeam Server
- Veeam Workers
Firewall Configuration
| Source | Destination | Port | Service / Purpose |
|---|---|---|---|
| Veeam Server | OpenNebula Front-end | TCP/443 | oVirtAPI (HTTPS) |
| Veeam Workers | OpenNebula Front-end | TCP/443 | oVirtAPI (HTTPS) |
| Veeam Server | OpenNebula Hosts | TCP/13014 | OneBEX image transfers |
| Veeam Workers | OpenNebula Hosts | TCP/13014 | OneBEX backup and restore transfers |
| Veeam Server | OpenNebula Hosts | TCP/13015 | OneBEX SSL image transfers (optional) |
| Veeam Workers | OpenNebula Hosts | TCP/13015 | OneBEX SSL backup and restore transfers (optional) |
The required connections are initiated by the Veeam components. Therefore, the firewall must allow traffic from the Veeam Server and Veeam Workers to the corresponding destination ports on the OpenNebula Front-end and Hosts.
Installation and Configuration
1. Configure OneBEX
Configure OneBEX on every OpenNebula hypervisor that can run VMs backed up by Veeam. OneBEX starts on demand during the backup operation and exposes the prepared disk exports directly to Veeam.
The Veeam Server and Veeam Backup Appliance must be able to connect to the configured OneBEX address and port on each hypervisor.
By default, OneBEX uses unauthenticated HTTP on port 13014. This creates a security risk that VM disk data could be intercepted by a malicious 3rd-party during backup. Therefore it is recommended to encrypt OneBEX traffic.
To encrypt OneBEX traffic, configure TLS as described in Configuring SSL in the Hosts. Restrict the OneBEX ports with firewall rules so they are reachable only from the OpenNebula Front-end and the Veeam Server and Workers. These ports carry raw VM disk data while a backup is running.
During interactive restores, the restore writer listens on all interfaces (0.0.0.0) by default. Set the ONE_BEX_WRITER_ADDR environment variable in the Front-end to bind it to a specific address. Restrict the restore port range configured by port_min and port_max to the Front-end nodes that relay restore data because these ports accept raw image data without authentication or encryption.
Edit the OneBEX configuration in the OpenNebula remotes directory. Open the file in the following location:
/var/lib/one/remotes/etc/onebex/onebex-server.conf
After updating the configuration file, synchronize the Hosts:
onehost sync -f
For OneBEX parameters and API details, see Interactive Backup Integrations.
/var/lib/one/remotes/etc/onebex/onebex-server.conf need to be performed on all frontends.2. Enable VM Guest Agent Monitoring
For Veeam to discover guest IP addresses on the correct NIC, enable the QEMU Guest Agent communication channel in each VM template with FEATURES = [ GUEST_AGENT = "YES" ], and install and start the QEMU Guest Agent inside the guest. See Enabling QEMU Guest Agent for details.
On the Front-end, edit:
/var/lib/one/remotes/etc/im/kvm-probes.d/guestagent.conf
Set :enabled to true and add :vm_guest_interfaces_b64 under the existing :commands section:
:enabled: true
:commands:
:vm_qemu_ping: one-$vm_id '{"execute":"guest-ping"}' --timeout 5
:vm_guest_interfaces_b64: >-
one-$vm_id '{"execute":"guest-network-get-interfaces"}' --timeout 10 |
ruby -rjson -rbase64 -e 'puts JSON.generate("return" =>
Base64.strict_encode64(JSON.parse(STDIN.read).fetch("return").to_json))'
Keep any other commands already configured. This command stores the guest interface list as Base64-encoded JSON in MONITORING/VM_GUEST_INTERFACES_B64. The list includes each interface’s MAC address and IP addresses, allowing oVirtAPI to associate guest IPv4 addresses with the right VM NIC. The default GUEST_IP_ADDRESSES value does not include that association.
Then synchronize the configuration to the KVM hosts from the Front-end:
onehost sync --force
After the next VM monitoring cycle, check onevm show <vm-id> --json for MONITORING/VM_GUEST_INTERFACES_B64 on a running VM with a working guest agent.
/var/lib/one/remotes/etc/im/kvm-probes.d/guestagent.conf on all Front-ends.3. Create the Veeam Backup Datastore
Create and configure the Veeam backup datastore in OpenNebula. This datastore uses the interactive datastore driver to start OneBEX, coordinate backup sessions initiated from Veeam, and store the corresponding OpenNebula backup metadata. The backup itself is stored in the Veeam repository.
The datastore template must include VEEAM_DS="YES" so the oVirtAPI Server can identify the datastore used by the Veeam integration, and also DS_MAD="interactive" so OpenNebula can handle the OneBEX workflow.
The following example template creates a Veeam backup datastore:
cat << EOF > /tmp/interactive-datastore.txt
NAME="VeeamDS"
DS_MAD="interactive"
TM_MAD="-"
TYPE="BACKUP_DS"
VEEAM_DS="YES"
RESTRICTED_DIRS="/"
SAFE_DIRS="/var/tmp"
EOF
onedatastore create /tmp/interactive-datastore.txt
Add the datastore to each Cluster containing VMs that will be backed up by Veeam:
onecluster adddatastore <cluster-name> <datastore-name>
For more information about the interactive driver internals, see Interactive Backup Integrations.
4. Install and Configure the oVirtAPI Module
Before starting oVirtAPI, ensure that TCP ports 80 and 443 are available on the server where it will run. oVirtAPI runs as its own service, opennebula-ovirtapi, and listens on both ports. If another service, such as NGINX or Apache serving the OpenNebula web UI, already occupies these ports, the opennebula-ovirtapi service fails to start and the API is unavailable.
oVirtAPI must use ports 80 and 443; changing its ports breaks the Veeam integration. If these ports are unavailable on the Front-end, install oVirtAPI in a separate environment, such as a VM, where both ports are available. This deployment may degrade performance.
To install the oVirtAPI module, configure the OpenNebula repository on the server selected to run oVirtAPI by following the OpenNebula Enterprise Edition Repository Setup Guide. Then install the opennebula-ovirtapi package with the relevant package manager for your OS.
The configuration file can be found at /etc/one/ovirtapi-server.yml. Change the following variables before starting the service:
public_ip: (Required) IP address that Veeam will use to reach the oVirtAPI server. Set this to the address of the Front-end or the separate server running oVirtAPI, as appropriate. The oVirtAPI service cannot start until this value is configured.endpoint_port: Port used by the OpenNebula RPC endpoint (defaults to 2633).backup_freeze: (Optional) Controls which filesystem freeze mode OpenNebula requests when performing backups initiated via the oVirtAPI/Veeam integration. Valid values areNONE,AGENT, andSUSPEND. For details on each mode see the Backup Modes section in the backup guide: Backup Modes.
In the same configuration file, configure the OneBEX port and the port range reserved for interactive restores:
onebex_port: Port where OneBEX listens on the hypervisors. It must match the port configured inonebex-server.conf.onebex_port_ssl: Alternative port used for SSL. Optional, but recommended for secure Image Transfers. If used, it is mandatory to follow section 4.1 to enable this feature in the hosts. The recommended port is 13015.port_minandport_max: Range of available ports reserved for interactive restores.ports_path: File where the oVirtAPI Server tracks ports used for interactive restores.
During installation a self-signed certificate is generated at /etc/one/ovirtapi-ssl.crt for encryption. You can replace this certificate with your own and change the cert_path configuration variable.
The listening addresses, the certificate files, and the number of request threads are set in /etc/one/ovirtapi-puma.rb. The default values are suitable for most deployments.
Finally, enable and start the service:
systemctl enable --now opennebula-ovirtapi
After changing /etc/one/ovirtapi-server.yml or /etc/one/ovirtapi-puma.rb, restart the service with systemctl restart opennebula-ovirtapi.
Up to OpenNebula 7.4.1, oVirtAPI ran inside Apache with Passenger. Starting with 7.4.2 it runs as the dedicated opennebula-ovirtapi service and no longer needs Apache or the Passenger packages.
After upgrading the opennebula-ovirtapi package, Apache may still be running and holding ports 80 and 443, which prevents the new service from starting. If Apache was installed only for oVirtAPI, stop and disable it, then enable the new service:
systemctl disable --now apache2 # Ubuntu/Debian
systemctl disable --now httpd # RHEL/Alma
systemctl enable --now opennebula-ovirtapi
If Apache also serves other sites on this server, move them off ports 80 and 443 instead, as oVirtAPI must keep using both ports.
public_ip must be the VIP address, which is also the one we will use when adding OpenNebula as a Virtualization Platform in Veeam.4.1 Configuring SSL in the Hosts
If using SSL, an NGINX proxy needs to be setup on all hosts. If an Image Transfer is attempted by Veeam against a non-configured host while the onebex_port_ssl variable is defined, the backup will fail.
First, create a certificate for the host. The certificate must be signed by the CA used by the oVirtAPI server (defined as cert_path in the configuration file). Download generate_certificate.sh from the OpenNebula GitHub repository, then run the following command from the directory where you saved it:
bash generate_certificate.sh -n <hostname> -c <ca-certificate> -k <ca-key> -C <destination-host-cert> -K <destination-host-key>
After generating the certificate, copy it to the respective host. We recommend storing it in /etc/one.
Then, you will need to install nginx on the host.
apt install nginx # Ubuntu/Debian
dnf install nginx # Rhel/Alma
Depending on the distribution, you will need to create the configuration file on a different location:
/etc/nginx/sites-enabled/one-ssl.conf # Ubuntu/Debian
/etc/nginx/conf.d/one-ssl.conf # Rhel/Alma
The configuration file must look like the following. Change the ssl_certificate and ssl_certificate_key paths to the ones you generated for this host. If you used a different port than 13015 in the ovirtapi configuration for SSL, make sure to change it in this configuration too.
server {
listen 13015 ssl;
listen [::]:13015 ssl;
server_name _;
# TLS Certificates
ssl_certificate /etc/one/ovirtapi-ssl.crt;
ssl_certificate_key /etc/one/ovirtapi-ssl.key;
# Secure TLS Defaults
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
# Crucial for large disk transfers
client_max_body_size 0;
proxy_request_buffering off;
proxy_buffering off;
# Extended timeouts for large images
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
client_body_timeout 3600s;
location / {
proxy_pass http://127.0.0.1:13014;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}
Finally, start/restart nginx to load the configuration file. You will need to repeat this workflow for each host.
5. Add OpenNebula to Veeam
This section will address the necessary steps to add OpenNebula as a Virtualization Platform into Veeam and deploy the necessary workers.
5.1. Add the New Virtualization Manager
First you need to add OpenNebula as an oVirt platform. To do so, follow the Adding oVirt KVM Manager to Backup Infrastructure Veeam guide with the following considerations:
- When selecting the DNS name or the IP address, it should match the
public_ipconfigured in the ovirtapi module. - On the Credentials tab, set the user and password used to access the OpenNebula Front-end. Use the
oneadminuser or another OpenNebula user with equivalent privileges. This is an OpenNebula user, not a system user. The user should be listed in the System/Users tab of FireEdge or through the CLI withoneuser list. - If the default certificate is used, Veeam may show an untrusted certificate warning. This is expected and will not affect the integration.
5.2. Deploy a KVM Worker
Next you need to deploy at least one KVM Worker. To do so, follow the Adding Workers Veeam guide with the following considerations:
- If you are not using a DHCP service, you will need to use a static address. You can set it to any free IP address in the management network.
- The DNS server used must be able to resolve the hostnames of all KVM hosts.
Restore Cleanup
Successful restores and restores cancelled from Veeam complete the cleanup lifecycle automatically.
However, if a restore fails, Veeam reports the error and the incomplete OpenNebula Image remains in LOCKED state. In that case, remove the incomplete Image manually from OpenNebula:
Get the restore transfer port from the Image PATH attribute, which has the form onebex://<IMAGE_DS_ID>:<PORT_ID>. Send the FINISH frame (0x01) to the writer listening on that port. This stops the writer gracefully and allows OpenNebula to complete the transfer cleanup. Use a Front-end address that is reachable from the system where you run the command. If you run it directly on the Front-end, you can use 127.0.0.1. The restore transfer port must be allowed by any intervening firewall:
python3 -c 'import socket, sys; s = socket.create_connection((sys.argv[1], int(sys.argv[2]))); s.sendall(b"\x01"); s.close()' <FRONTEND_ADDRESS> <PORT_ID>
After the writer finishes, delete the incomplete Image:
oneimage delete <IMAGE_ID>
Logging Information
The oVirtAPI server writes its logs to /var/log/one/ovirtapi.log on the server where it runs. Service start and stop messages are available with journalctl -u opennebula-ovirtapi.
Additional logs for interactive backups are available on the hypervisors:
- OneBEX logs:
/var/log/one/onebex.log
GIVE FEEDBACK
Was this resource helpful?
Glad to hear it
Sorry to hear that