2211 Commits
Author SHA1 Message Date
Jan Orel 42d9cfe9c2 F #-: Import OneKS from one-ee-tools 2026-07-22 13:09:11 +02:00
Jan Orel cf0b0bc2fa B OpenNebula/one#7562: Manage OneForm service in HA raft hook (#4328) 2026-07-21 13:06:49 +02:00
Ruben S. Montero ec563d86dc M #-: Bump OpenNebula and DB version to 7.6.0 2026-07-17 10:57:26 +02:00
Pavel Czerný 5e0d05a90b M #-: Update bash completion (#4314) 2026-07-16 16:53:47 +02:00
Ruben S. Montero 1d421ca89d M #-: Bump version to 7.3.85 2026-07-14 08:38:08 +02:00
Pavel Czerný d1c2d07a4c M #-: Remove deprecated CLI methods (#4295) 2026-07-09 15:56:11 +02:00
Jan Orel 87389d952d M #-: Update Gemfile locks (#4303) 2026-07-09 11:56:31 +02:00
Ruben S. Montero 898838fcb9 Revert "F OpenNebula/one#7609: Add S3 support for Restic (#4271)"
This reverts commit 44974750ec.
2026-07-08 11:12:43 +02:00
Dmitrii GilevandTino Vázquez 44974750ec F OpenNebula/one#7609: Add S3 support for Restic (#4271)
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
Signed-off-by: Dmitrii Gilev <dgilev@opennebula.io>
2026-07-08 10:21:56 +02:00
Ruben S. Montero 4b00876502 F #7615: add selected disk support for backups
Add DISK_IDS as part of the VM backup configuration so backups can target a
subset of eligible VM disks. The configuration parser now normalizes and
validates the list against the VM and resets the incremental chain when the
selected disk set changes.

co-authored-by: Pavel Czerny <pczerny@opennebula.io>
(cherry picked from commit 59c2cac474de545eddd642e03e3caac8fb47c1cc)
2026-07-01 22:29:39 +02:00
d48a32e252 F #7490: VLAN Groups for VNET multi-tenancy
This PR adds Group VLAN authorization rules for Virtual Network self-provisioning
through VN Template instantiation and VNET updates derived from a VN Template.

The feature lets administrators define VLAN usage policies at group level. These policies are
evaluated when users instantiate VN Templates or update VNETs that were instantiated from a VN
Template. Direct VNET allocation is not treated as the tenant self-provisioning path; the intended
multi-tenant model is to expose network creation through reservations and VN Template
instantiation, while direct VNET allocation remains an admin-controlled operation.

Group VLAN rules are stored under `VLAN_RULES` as `RULE` vector attributes.

Rule format:

```txt
RULE = [
  ID          = "5,6,100-200",
  SCOPE       = "CVLAN",
  VNTEMPLATE  = "10,20-30"
]

Fields:

- ID: VLAN values allowed by the rule. Supports single values and ranges, comma-separated.
    - Examples: "5", "5,6,100-200"

- SCOPE: VLAN attribute scope controlled by the rule.
    - Supported scopes: VLAN_ID, OUTER_VLAN_ID, CVLAN, VLAN_TAGGED_ID, ANY

- VNTEMPLATE: optional VN Template IDs where the rule applies.
    - Supports single values and ranges, comma-separated.
    - -1 or missing value means the rule applies to any VN Template.

Examples:

RULE = [
  ID = "100-200",
  SCOPE = "VLAN_ID",
  VNTEMPLATE = "10"
]

Allows VLAN_ID values from 100 to 200 when instantiating or updating VNETs derived from VN Template
10.

RULE = [
  ID = "300,400-450",
  SCOPE = "ANY",
  VNTEMPLATE = "-1"
]

Allows the listed VLAN IDs/ranges for any supported VLAN scope and any VN Template.

Rules are parsed into an internal structured representation when group VLAN data is loaded or
updated. Each rule is normalized into:

- scope
- VLAN ID ranges
- VN Template ID ranges

This avoids reparsing raw template attributes during authorization checks.

Validation is applied to these input scopes:

- VLAN_ID
- OUTER_VLAN_ID
- CVLAN
- VLAN_TAGGED_ID

VLAN_ID and OUTER_VLAN_ID are validated as single integer values. CVLAN and VLAN_TAGGED_ID accept
range expressions such as 5,6-10.

For each requested VLAN value or range:

1. The input is parsed into one or more test ranges.
2. Rules are scanned for matching scope, including ANY.
3. Rules are filtered by VN Template ID:
    - empty/-1 VNTEMPLATE matches all templates
    - explicit ranges match only included template IDs

4. A requested range is accepted only if it is fully covered by a single rule range.
5. The check passes when all requested ranges are covered.

Automatic VLAN selection is rejected when the user belongs to a group with VLAN rules matching the
target VN Template, including global rules. This avoids bypassing explicit group VLAN policy
through automatic allocation.

VNETs instantiated from VN Templates now preserve the source VN Template ID as a first-class VNET
attribute:

<VNET>
  ...
  <TEMPLATE_ID>...</TEMPLATE_ID>
  ...
</VNET>

TEMPLATE_ID = -1 means the VNET was created directly and was not instantiated from a VN Template.

This ID is immutable from user template updates:

- it is removed from the VNET template body on insert/update
- it is serialized as a top-level VNET attribute
- update operations use the stored value to validate VLAN authorization

A database migrator moves legacy TEMPLATE/TEMPLATE_ID values to top-level VNET/TEMPLATE_ID.

The tenant self-provisioning model for VNETs is based on controlled entry points:

- VNET reservations
- VN Template instantiation

Group VLAN authorization is enforced on VN Template instantiation and on updates to VNETs that were
instantiated from a VN Template.

Direct VNET allocation is not considered the tenant-facing self-provisioning path. It should remain
admin-controlled, as unrestricted VNET creation can expose other sensitive network attributes such
as PHYDEV, BRIDGE, and driver-specific configuration in addition to VLAN IDs.

Existing VNETs created from VN Templates may have the source template ID stored inside TEMPLATE/
TEMPLATE_ID. The migration step moves that value to top-level VNET/TEMPLATE_ID and removes it from
the template body.

This PR also updates the AR operations (add/del/update) so tenants can easily managed the VNET instantiations.

Existing directly-created VNETs will have no source VN Template and are treated as TEMPLATE_ID =
-1.

Existing group objects without VLAN rules are initialized with an empty VLAN_RULES section,
preserving current behavior until rules are explicitly configured.

Configuration compatibility:

- VLAN_ID, CVLANS, and AR/VLAN_ID are no longer expected to be handled through generic VNET
  restricted attributes for the VN Template instantiation flow.

- OneCfg migration/update handling for configuration files will be addressed separately before
    release.

co-authored-by: Pavel Czerny <pczerny@opennebula.io>
co-authored-by: Miguel E. Ruiz <mruiz@opennebula.io>
co-authored-by: dcarracedo <dcarracedo@opennebula.io>
2026-06-24 11:26:36 +02:00
Tino Vázquez 8a687339b5 L #-: Remove rubocop safenavitaionwithempty check 2026-06-23 13:25:32 +02:00
Jan Orel cef1db4ff2 M #-: Drop forced logrotate on service start from systemd units (#4262)
* Fixup path when removing other arch cbc solver
* Drop forced logrotate on service start from systemd units
2026-06-12 11:36:10 +02:00
MarioRobresandRuben S. Montero 7a69805a8d F OpenNebula/one#7660: Interactive Backup EXport server for third-party backup/restore solutions (#4260)
This commit introduces a new backup driver based on an "interactive" server. The purpose is to ease the integration of third-party backup systems so they are able to pull backups/increments from the hypervisors:

 - New backup driver
 - New OpenNebula Backup Exporter (OneBEX). The REST API supports: status,
   export, exporters, blocks, data and finish.
 - Initial support for file based virtual disks (incrementals only support CBT)
 - Refactor backup_qcow2 to accomodate the new logic
 - New restore logic to directly write images to the datastore from the backup service. 

Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2026-06-11 17:27:41 +02:00
Ruben S. Montero d8e57c4be3 B #7721: Fix LVM TM configuration to properly account for system ds. 2026-06-04 18:31:07 +02:00
Jan Orel cfa8e3e82c F OpenNebula/one#7653: Drop !requiretty from Debian sudoers for sudo-rs (#4247)
- Ubuntu 26.04 ships sudo-rs, it does not implement the 'requiretty'
- setting is a no-op on Debian/Ubuntu sudo anyway
2026-06-02 11:00:39 +02:00
Daniel Clavijo CocaandRuben S. Montero fe1023926d F #7679, #7707: Add OVS representor support and monitoring updates
- Configure Open vSwitch VF representor ports
- Apply VLAN, QinQ, and trunk tagging to representors
- Clear OVS port tags when VLAN_ID is empty on update
- Update monitoring components for the new network support
- Fix non string message driver logging
- #7707, fix update VLAN IDs

co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2026-06-01 09:34:17 +02:00
Pavel Czerný 3fbe3b7194 M #-: Create NEXT_INDEX on AR creation (#4241)
Linting opennebula_vm.rb
2026-05-29 09:00:37 +02:00
Jan Orel 1596caf1c5 F OpenNebula/one#7653: Add Ubuntu2604 support (#4240)
* Fix place link order on Ubuntu 26.04
* Add Ubuntu 26.04 support to install_gems
2026-05-28 15:52:08 +02:00
8fc632ec4e F #1536, #7253: Implement global MAC adress space and MAC parsing
New configuration attribue MAC_GLOBAL_SPACE in oned.conf to enable the global
MAC address space generation mode.

MAC addresses are generated from a global pool preventing collisions across
VNETs. This does not apply to IP networks and limits the number of VNETs to
2^20, with a max of 2^20 leases per VNET.

This commit also implementes:
  * A round-robin assignment of addresses. (jukka.jokiniva@qt.io)
  * Optimizes the storing of the BitMap - do not store leading zeros

co-authored-by: Pavel Czerny <pczerny@opennebula.io>
co-authored-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
2026-05-26 18:02:39 +02:00
Jan Orel c37238db9f B #-: Pin dry-(schema|validation) due to debian12 (#4219)
- update locks
 - dis-continue Debian11, we will support 12+13
2026-05-15 20:06:03 +02:00
Daniel Clavijo Coca 319e3b05fe F OpenNebula/one#7509: Explicit SRIOV info (#4215) 2026-05-14 12:22:45 +02:00
Guillermo Ramos ba9d43f548 F #OpenNebula/one#7509: fix (sort) schema definition (#4209)
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
2026-05-13 15:29:30 +02:00
Guillermo Ramos 1378462bb2 F #OpenNebula/one#7509: update schema definition (#4203)
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
2026-05-12 13:18:48 +02:00
Pavel Czerný 7f6b45ecc4 F #4159: Allow dynamic VMGroup management (#4172) 2026-05-11 10:58:30 +02:00
mkutouskiandJan Orel 4188fe50ad B #7646: Apply log rotation fix to remaining services
Extend the FireEdge log fix to oned, oneflow, oneform, onegate and
onehem so they share the same rotation behavior:

- Add compress / compressoptions -9 / delaycompress to the logrotate
  configs. With copytruncate, delaycompress avoids gzipping the
  freshly-rotated file in the same pass and keeps service restarts
  fast even when ExecStartPre runs logrotate -f.

- Drop the synchronous gzip ExecStartPre loops from each unit. The
  glob (e.g. oneflow*.log) does not match files rotated with
  dateformat -%Y%m%d-%s, so the loop was ineffective, and running
  gzip without backgrounding blocked startup.

- Ship a logrotate config for oneform; the unit was pointing at
  /etc/logrotate.d/opennebula-form but no such file existed, so
  oneform.log was never rotated.

- src/hem/bin/onehem-server: use >> instead of > so restarts via the
  shell wrapper do not truncate the log, matching oneflow / onegate /
  oneform / fireedge wrappers (originally fixed in #6034).

Signed-off-by: Mikalai Kutouski <mkutouski@opennebula.io>
Co-authored-by: Jan Orel <jorel@opennebula.io>
2026-05-11 10:26:58 +02:00
Jan Orel e2bcfcd19e B OpenNebula/one#7608: Fix opennebula-cli gem standalone install (#4165)
Add load_opennebula_paths stub to the CLI gem and include the missing
opennebula/lib/ files in the OCA gem so both gems work when installed
standalone via RubyGems.
2026-05-04 19:05:07 +02:00
Jan Orel 185c30920a M #-: Allow added config dirs in branch protect smoke test (#4182)
* M #-: Allow added config dirs in branch protect smoke test
* L #: subtle lint

(cherry picked from commit 2545db19d8)
2026-04-28 16:39:28 +02:00
Victor Palma ea1df5ffec F #7259: Add OpenNebula Document Server (ODS)
OpenNebula Document Server (ODS) is a lightweight Sinatra-based server that
provides a foundation for building API servers within the OpenNebula ecosystem
which work with Documents. It can be used as a base class for custom services,
making it easier to maintain consistency across different OpenNebula
servers.

Features
========

- Provides a configurable base server class that can be inherited.
- Centralized logging setup with `LogConfig`.
- Supports modular route registration via `AppRoutes`.
- Easy configuration through `ConfigLoader`.
- Preconfigured error handling and exception management.
2026-04-28 09:03:45 +02:00
Pavel Czerný 1605a4e97b F #7487: Configurable API result log length (#4164) 2026-04-21 10:36:37 +02:00
MarioRobres a6afdffde3 F #-: workflow to automatically disable new failing Rubocop cops (#4163) 2026-04-21 10:07:24 +02:00
Pavel Czerný 37524d156e L #-: Ruby linting src/cli/* files (#4159) 2026-04-20 11:34:39 +02:00
roamingengineer311 b196bd771a M #-: Add backup/restore jobs status metrics per vm (#4161)
Added to Prometheus opennebula-exporter
2026-04-16 16:19:32 +02:00
Pavel Czerný 684ec4f4a0 M #-: Update xml-schemas (#4141)
* Add LOCK attribute
* Use LOCK, PERMISSIONS adn IDS attributes from shared, if possible
2026-04-06 15:19:35 +02:00
Ruben S. Montero ebbb7be5d4 M #-: Bump version 7.3.80 2026-03-30 09:58:53 +02:00
Jan Orel b2d9fc8654 M #-: Add Suse15 ARM64 Gemfile.lock (#4126) 2026-03-25 15:19:41 +01:00
Jan Orel b777defb67 M #-: Add own suse sudoers, due to iscsiadm in /sbin (#4121) 2026-03-23 17:06:15 +01:00
David 2ebe4ee328 M #-: Add oneform man page (#4104)
Signed-off-by: dcarracedo <dcarracedo@opennebula.io>
2026-03-19 19:15:40 +01:00
Jan Orel 3b34fcc044 M #-: rubygems: Lock public_suffix gem (#4117)
Avoid installing too new public_suffix in Suse15 with old ruby
+ refresh gems
2026-03-19 14:47:06 +01:00
MarioRobres 3d82493cfe M #-: add DATASTORE_CAPACITY_CHECK to opennebula_configuration.xsd (#4115) 2026-03-19 12:03:28 +01:00
MarioRobres e7b808e21f M #-: VirtioFS not persistent and extra dir check (#4114) 2026-03-18 14:53:46 +01:00
d8e0ee2036 F #7373: FSaaS (File System as a Service) for OpenNebula
NAME   = test_ds
DS_MAD = virtiofs
TM_MAD = local
TYPE   = IMAGE_DS
DISK_TYPE = FILESYSTEM

oneadmin@ubuntu2204-kvm-ssh-7-0-f4a9-0:~$ cat img.txt
NAME="test_fs"
TYPE="FILESYSTEM"
PATH="/var/tmp/sharedfs_test"
PERSISTENT="YES"
PERSISTENT_TYPE="SHAREABLE"

DISK=[
  IMAGE_ID="21" ]

Notes:

* Same FS image cannot be used twice in the same VirtualMachine, nor the
  same tag twice
* OpenNebula will generate a MOUNT_POINT = /mnt/one-fs-<image_id> and a
  MOUNT_TAG = one-tag-<image_id>. Both can be overwritten at DISK level.
* When using Hugepages in the VM that will be used for virtiofs and
  memory access will default to shared. Do not use
  MEMORY_ACCESS='private'
* If not using hugepages the VM will use memfd as memoryBacking source
  if it includes a filesystem.
* OpenNebula will map FS access (UID/GID) to a given user that can be
  configured per host, cluster or globally in vmm_exec_kvm.conf. By
  default all access is mapped to oneadmin account.
* Datastore monitorization will report 0 free/used/total size. Images,
  representing the FS folder, reports size as the result of a du -sb
  command.
* Most of the disk operations do not apply to filesystem disks: resize, snapshots,
  save-as, backup.

co-authored-by: MarioRobres <mrobres@opennebula.io>
co-authored-by: Marco Mancini <mmancini@opennebula.io>

Signed-off-by: MarioRobres <mrobres@opennebula.io>
Signed-off-by: Marco Mancini <mmancini@opennebula.io>
2026-03-18 09:57:54 +01:00
Jan Orel 9465a84267 F Opennebula#7450: Support SLES15 build (#4110)
- update install_gems, update_lock, add Gemfile for Suse 15
- don't generate python grpc bindings if tool is missing
  (it's missing in Suse build env)
2026-03-16 19:37:48 +01:00
Ruben S. Montero 72a773dcd4 F #7311: LXC Disk Snapshot support
It supports live snapshot operations for LXC and the following storage
drivers:

- fs_lvm
- ceph
- shared (only raw disks)
- local (only raw disks)
2026-03-11 17:16:28 +01:00
MarioRobres 2c293ab32c L #-: Rubocop 1.85 (#4094) 2026-03-09 11:33:05 +01:00
Ruben S. Montero 5c0f1adcdb M #-: Remove unsupported TM_MAD_SYSTEM configurations 2026-03-03 11:23:03 +01:00
Pavel Czerný ee3daf5e5e M #-: Purge unused attributes from config xml-schema (#4090) 2026-03-01 14:25:33 +01:00
Ruben S. Montero 81fd8e353b Revert "F #7373: FSaaS (File System as a Service) for OpenNebula"
This reverts commit fa72e8fd7f.
2026-02-26 19:24:53 +01:00
Ruben S. Montero bb6bb45a2a F #913: Add DS_LIVE_MIGRATE attribute
Add new attribute to prevent migrations on unsopported drivers. Add
migrator to add it to DS templates

coauthored-by: Guillermo Ramos <gramos@opennebula.io>
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
2026-02-26 11:58:33 +01:00
fa72e8fd7f F #7373: FSaaS (File System as a Service) for OpenNebula
NAME   = test_ds
DS_MAD = virtiofs
TM_MAD = local
TYPE   = IMAGE_DS
DISK_TYPE = FILESYSTEM

oneadmin@ubuntu2204-kvm-ssh-7-0-f4a9-0:~$ cat img.txt
NAME="test_fs"
TYPE="FILESYSTEM"
PATH="/var/tmp/sharedfs_test"
PERSISTENT="YES"
PERSISTENT_TYPE="SHAREABLE"

DISK=[
  IMAGE_ID="21",
  MOUNTPOINT="/mnt",
  TARGET="disk0_tag" ]

co-authored-by: MarioRobres <mrobres@opennebula.io>
co-authored-by: Marco Mancini <mmancini@opennebula.io>

Signed-off-by: MarioRobres <mrobres@opennebula.io>
Signed-off-by: Marco Mancini <mmancini@opennebula.io>
2026-02-26 11:18:38 +01:00