30 Commits
Author SHA1 Message Date
Pavel Czerný 8993d92a58 M #-: Minor changes to parsing Vector attributes (#4298)
- if possible use vector<unique_ptr<Attribute>> as argument for Template::remove for automatic cleanup
- if possible use 'VectorAttributeinstead ofAttributeforTemplate::remove- theremovemethod has dynamic cast to correct type and deletes attributes, which can't be casted. So no need to add loop with casting after theremove` method
- At few places added checks for empty vector to avoid very rare crashes on malformed Templates
2026-07-09 15:49:11 +02:00
Pavel Czerný 87d55b2cf9 F #7678: Dummy NIC interface for VM (#4251) 2026-06-12 14:29:08 +02:00
Ruben S. Montero ebbb7be5d4 M #-: Bump version 7.3.80 2026-03-30 09:58:53 +02:00
deb127c59b F one#6534: Support for assigning IPs to several VMs
This commit adds support for sharing IPs among several VMs. When a AR is
marked as shared several VMs can request the same IP address either
through a NIC or NIC_ALIAS.

- Shared AR's cannot assign IP address automatically, an specific IP
  needs to be requested.
- Shared AR's have some restrictions:
      - Shared AR cannot use external IPAM
      - Shared AR can only be of type IP4 or IP6_STATIC
      - Shared AR cannot update IPAM or SHARED attribute
      - Shared AR cannot make reservations
      - Shared AR cannot hold by mac
- NICs / NIC_ALIAS using Shared IP will include SHARED=YES

co-authored-by: Jorge Miguel Lobo Escalona <jlobo@opennebula.io>
co-authored-by: MarioRobres <mrobres@opennebula.io>
2026-02-10 10:28:06 +01:00
Tino Vázquez a64f071808 M #-: Bump year 2025 2025-02-28 11:56:18 +01:00
eda55567b1 F #1550: New Scheduler Framework for OpenNebula & DRS scheduler
This commits introduces a new framework for OpenNebula, it is based on
standard the OpenNebula middleware access driver (mad) model. Benefits
compared to the current implementation:

* Less overhead on API server and streamlined communications
* Ease integration with third party schedulers
* New "optimize" action to balance the workload of a cluster
* Embedded Plan Manager to apply optimization and deployment plans with
  custom parameters for the scheduling window
* Custom optimization policies per cluster

This commits introduces 2 schedulers:

* Rank scheduler based on the match-making algorithm present in 6.x
  series
* OpenNebula DRS an optimization algorithm based on an ILP solver for
  placement and cluster optimization

Also new API calls has been added for onecluster as well as the CLI
updates to expose them.

co-authored-by: MarioRobres <mrobres@opennebula.io>
co-authored-by: Pavel Czerny <pczerny@opennebula.io>
co-authored-by: Mirko Stojiljkovic <mstojiljkovic@opennebula.io>
co-authored-by: Valentyn Bohdan <vbohdan@opennebula.io>
2025-02-27 16:33:05 +01:00
Pavel Czerný a15f729488 M #-: Resolve cppcheck issues version 2.13 (#3334)
* Fixed performance issues
* Suppresed style issues
2025-01-02 07:02:44 +01:00
Tino Vázquez 05d147c524 M #-: Bump version 6.10.0
Also bump copyright year to 2024
2024-07-29 14:27:11 +02:00
Pavel Czerný 2fe396ae15 L #-: Add Astyle linting
* Add AStyle to smoke tests
* Format C++ files using AStyle
2024-06-03 11:40:24 +02:00
Ruben S. Montero 0a7a03e098 F 6441: Introduce FLOATING_ONLY for Virtual Router
The new attribute does not allocate extra IPs on NICs with FLOATING_IP =
yes and FLOATING_ONLY = yes. The NIC will only containg a random MAC
address and VROUTER_IP/MAC.

This commit also checks that network mode auto is not used for NIC of a
VROUTER

(cherry picked from commit 18c7816074)
2023-12-22 19:42:03 +01:00
Tino Vázquez 3376afdaf0 M #-: Bump year 2023 2023-01-09 12:23:19 +01:00
Ruben S. Montero 74bc751bd7 F #5940: Improve PCI Passthrough and SRIOV support
- SHORT_ADDRESS can be used to select specific devices  (useful on
  homogenous clusters or nic attach operations). This name has been
  selected because of:
    1. It is the attrbute shown host info
    2. It does not collide with the reserved ADDRESS attribute

- New test and add functions that considers both allocation methods: by
  name (VENDOR/CLASS/DEVICE) or address (SHORT_ADDRESS)

- Parameter check on VM creation

- revert and add method use the same pci_attribute function to add info
  to the VM PCI attribute

- Remove well-known attributes when parsing PCI devices (ADDRESS,
  PREV_ADDRES, BUS, FUNCTION, SLOT, NUMA_NODE, UUID)

- Support for attach and detach NIC with PCI attributes
    * onevm_exec.rb looks for PCI devices for ATTACH=YES when attaching/detaching an interface
    * script action are now written in Ruby
    * KVM module with common actions (hostdev/interface device str)
    * Minor changes in xmlparser and OpenNebulaVM classes

- PCI selection options to onevm nic-attach:
    * pci short_address
    * pci_device device ID
    * pci_vendor vendor ID
    * pci_class class ID

- VF can be configured by setting some parameters through IP link (e.g.
  MAC or VLAN_ID). This commit includes a mixin to activate_vf

    * one_vmm_exec.rb looks for PCI VN_MAD drivers
    * VM class (VNM) adds a @pcis array
    * activate_vf should be called in the pre stage. The following drivers
      acticate VFs (VLAN_ID is implemented as 802.1Q tag)
            - 802.1Q
            - bridge
            - fw
            - ovswitch
    * Supported attributes for VF:
      - MAC
      - VLAN_ID
      - spoof checking (SPOOFCHK)
      - trust (TRUST)

- Predictable PCI addresses for guests is only enabled if PCI bus 1
  is present (PCI bridge bus cannot be hotplugged)

- Improve integration with Libvirt/QEMU:

    * When attach, only activate the VF being attached
    * Attach: Use <interface> and not <hostdev> for VF. There seems to be a race
      condition between accessing the vfio device and permission setup.
    * Attach: Remove address on attach as it may fail beacuse PCI controller
      is not present, e.g.:

        ATTACHNIC: Could not attach NIC to 28534240: error: Failed to attach device
        from /dev/fd/63 error: XML error: Invalid PCI address 0000:01:01.0.
        Only PCI buses up to 0 are available ExitCode: 1

    * Detach: Detach always use <hostdev> as libvirt fails to identified the
      device just by address when using <interface>

- Suntone Support: The "Hardware" profile of a network interface (NIC) of a VM can be of three types, now exposed in Sunstone:

    * "Emulated" it includes the hardware model emulated by Qemu
    * "PCI - Automatic" oned hw scheduler will pick the best PCI device for the NIC
    * "PCI - Manual" user can specify the PCI device by its short-address as shown in host information

This commits also enables the attach/detach operations on PCI based NICs in Suntone. *Note*: only for KVM VMs

(reverts commit aafd5f3014)
(reverts commit 671ef0b2d91aba00b1e6c63e19c4a50c3af20f6f)
2022-10-04 20:53:08 +02:00
Ruben S. Montero 907f26050f F #5940: Improve PCI Passthrough and SRIOV support
- SHORT_ADDRESS can be used to select specific devices  (useful on
  homogenous clusters or nic attach operations). This name has been
  selected because of:
    1. It is the attrbute shown host info
    2. It does not collide with the reserved ADDRESS attribute

- New test and add functions that considers both allocation methods: by
  name (VENDOR/CLASS/DEVICE) or address (SHORT_ADDRESS)

- Parameter check on VM creation

- revert and add method use the same pci_attribute function to add info
  to the VM PCI attribute

- Remove well-known attributes when parsing PCI devices (ADDRESS,
  PREV_ADDRES, BUS, FUNCTION, SLOT, NUMA_NODE, UUID)

- Support for attach and detach NIC with PCI attributes
    * onevm_exec.rb looks for PCI devices for ATTACH=YES when attaching/detaching an interface
    * script action are now written in Ruby
    * KVM module with common actions (hostdev/interface device str)
    * Minor changes in xmlparser and OpenNebulaVM classes

- PCI selection options to onevm nic-attach:
    * pci short_address
    * pci_device device ID
    * pci_vendor vendor ID
    * pci_class class ID

- VF can be configured by setting some parameters through IP link (e.g.
  MAC or VLAN_ID). This commit includes a mixin to activate_vf.

    * one_vmm_exec.rb looks for PCI VN_MAD drivers
    * VM class (VNM) adds a @pcis array
    * activate_vf should be called in the pre stage. The following drivers
      acticate VFs (VLAN_ID is implemented as 802.1Q tag)
            - 802.1Q
            - bridge
            - fw
            - ovswitch

- Improve integration with Libvirt/QEMU:

    * When attach, only activate the VF being attached
    * Attach: Use <interface> and not <hostdev> for VF. There seems to be a race
      condition between accessing the vfio device and permission setup.
    * Attach: Remove address on attach as it may fail beacuse PCI controller
      is not present, e.g.:

        ATTACHNIC: Could not attach NIC to 28534240: error: Failed to attach device
        from /dev/fd/63 error: XML error: Invalid PCI address 0000:01:01.0.
        Only PCI buses up to 0 are available ExitCode: 1

    * Detach: Detach always use <hostdev> as libvirt fails to identified the
      device just by address when using <interface>
2022-09-07 15:54:38 +02:00
Tino Vazquez f7d53e75ff M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Ruben S. Montero 265d05c118 F #5612: (De)/Attach security groups from VM NICs
Author: Pavel Czerný <pczerny@opennebula.systems>
2022-01-25 20:27:05 +01:00
Pavel Czerný f7f076c638 M #-: Fix possible NIC name collision (#962) 2021-03-12 13:09:04 +01:00
Vlastimil Holer 096754b63f M #-: Bump year to 2021 (#778) 2021-02-09 16:07:56 +01:00
Pavel Czerný 123e08cfd6 F #4936: Replace long iterator definition by auto (#215) 2020-09-17 11:10:55 +02:00
Pavel Czerný daaf132a43 F #4936: Remove 'using namespace std' from headers (#60) 2020-07-02 22:42:10 +02:00
Vlastimil Holer f3c50a5d89 M #-: Year bump to 2020 (#4634) 2020-04-30 15:00:02 +02:00
Vlastimil Holer 441cf1f7f9 Bump version to 5.7.85, year to 2019 2019-01-16 11:47:59 +01:00
Ruben S. MonteroandAlejandro Huertas ab1a05b69b F #911: IP(v6) alias(es) support
* Modify VM context generation.
   * Modify attach/detach nic functionality.
   * Modify CLI nic-attach, so an alias can be attached.

Co-authored-by: Alejandro Huertas <ahuertas@opennebula.systems>
2018-12-04 14:41:55 +01:00
Ruben S. Montero 2123afc890 F #2427: Add support to NICs with NETWORK_MODE=auto. This commits includes
logic in oned to delay NIC/context resolution till deployment time. Also
scheduler has been extended to use the match-making algorithm to networks.
Sunstone interface changes to select auto networks.
2018-10-11 15:27:15 +02:00
Ruben S. Montero f54e066949 F #2489: Improve performance of oned:
* Reduce memory footprint
    * Improve connection handling in the RequestManager
    * Reduce the number of locking calls
    * Reduce the size of the VM pool
2018-10-09 11:15:59 +02:00
juanmont 21a2bd49b3 Added new param to header documentation 2018-05-31 16:41:41 +02:00
Ruben S. Montero d8e579d5a3 Extend auth methods to set lock checks 2018-05-31 12:50:02 +02:00
Vlastimil Holer a4c0447ccf Bump year to 2018 (#1623) 2018-01-02 18:27:37 +01:00
Javi Fontan 8de979e42c Bump version 5.3.80 2017-05-25 16:07:35 +02:00
Ruben S. Montero e1cb2c928a F #4809: Add a base class for extended template attributes 2017-04-10 19:25:29 +02:00
Ruben S. Montero 7cbceb043b Added VirtualMachineNic interface to abstract NIC logic 2016-12-24 01:36:30 +01:00