1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-03 01:17:41 +03:00
one/include
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
..
AclManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
AclRule.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ActionSet.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
AddressRange.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
AddressRangeInternal.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
AddressRangeIPAM.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
AddressRangePool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Attribute.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
AuthManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
AuthRequest.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
BitMap.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
CachePool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Callbackable.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Client.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Cluster.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Clusterable.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ClusterableSingle.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ClusterPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ClusterTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Datastore.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
DatastorePool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
DatastoreTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
DefaultQuotas.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
DispatchManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Document.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
DocumentPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
DocumentTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Driver.h M #-: Fix oned segfault after driver init failed (#2217) 2022-07-18 18:04:36 +02:00
DriverManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
EnumString.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ExecuteHook.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ExtendedAttribute.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
FedReplicaManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Group.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
GroupPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
GroupTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
History.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Hook.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HookAPI.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HookImplementation.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HookLog.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HookManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HookPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HookStateHost.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HookStateImage.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HookStateVirtualNetwork.h M #-: Bump version 6.9.80 2022-04-18 19:45:21 +02:00
HookStateVM.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Host.h F #5940: Improve PCI Passthrough and SRIOV support 2022-09-07 15:54:38 +02:00
HostMonitoringTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HostPool.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
HostShare.h F #5940: Improve PCI Passthrough and SRIOV support 2022-09-07 15:54:38 +02:00
HostShareCapacity.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HostShareDatastore.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HostShareNUMA.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
HostSharePCI.h F #5940: Improve PCI Passthrough and SRIOV support 2022-10-04 20:53:08 +02:00
HostTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Image.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ImageManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ImagePool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ImageTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
InformationManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
IPAMManager.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
IPAMRequest.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
LibVirtDriver.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
LifeCycleManager.h B #5867: Fix quotas and fsck 2022-06-20 18:35:40 +02:00
Listener.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Log.h B #5820: add 4,5 debug levels (#2135) 2022-06-08 18:27:38 +02:00
LogDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
LoginToken.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
MarketPlace.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
MarketPlaceApp.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
MarketPlaceAppPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
MarketPlaceAppTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
MarketPlaceManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
MarketPlacePool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
MarketPlaceTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
mem_collector.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Message.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
MySqlDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Nebula.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
NebulaLog.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
NebulaService.h M #-: Bump to 6.99.80 2022-04-20 12:47:55 +02:00
NebulaTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
NebulaUtil.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ObjectCollection.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ObjectSQL.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ObjectXML.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
OneDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
OpenNebulaTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
PoolObjectAuth.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
PoolObjectSQL.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
PoolSQL.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
PoolSQLCache.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
PostgreSqlDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ProtocolMessages.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
Quota.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
QuotaDatastore.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
QuotaImage.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
QuotaNetwork.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Quotas.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
QuotasSQL.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
QuotaVirtualMachine.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RaftManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RankScheduler.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ReplicaManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ReplicaRequest.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ReplicaThread.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Request.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerAcl.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerAllocate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerAllocateDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerChmod.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerChown.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerClone.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerCluster.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerConnection.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerDatastore.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerDelete.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerDropDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerGroup.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerHook.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerHost.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerImage.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerInfo.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerLock.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerMarketPlace.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerMarketPlaceApp.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerPoolInfoFilter.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerProxy.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerRename.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerSchedAction.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerSecurityGroup.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerSystem.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerUpdateDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerUpdateTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerUser.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerVdc.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerVirtualMachine.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerVirtualNetwork.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
RequestManagerVirtualRouter.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerVMTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerVNTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
RequestManagerZone.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ScheduledAction.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
SecurityGroup.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
SecurityGroupPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Snapshots.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
SqlDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
SqliteDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
SSLUtil.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
StreamManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
StringBuffer.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
SyncRequest.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
SystemDB.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Template.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
TransferManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
User.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
UserPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
UserTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Vdc.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VdcPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VirtualMachine.h F #5940: Improve PCI Passthrough and SRIOV support 2022-10-04 20:53:08 +02:00
VirtualMachineAttribute.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VirtualMachineDisk.h B #5867: Fix quotas and fsck 2022-06-20 18:35:40 +02:00
VirtualMachineManager.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VirtualMachineManagerDriver.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VirtualMachineMonitorInfo.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VirtualMachineNic.h F #5940: Improve PCI Passthrough and SRIOV support 2022-10-04 20:53:08 +02:00
VirtualMachinePool.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
VirtualMachineTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VirtualNetwork.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
VirtualNetworkPool.h f #5725: State for Virtual Networks 2022-04-09 15:20:17 +02:00
VirtualNetworkTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VirtualRouter.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VirtualRouterPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VMActions.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VMGroup.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VMGroupPool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VMGroupRole.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VMGroupRule.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VMTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VMTemplatePool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VNTemplate.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
VNTemplatePool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
XenDriver.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
XMLDriver.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
Zone.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ZonePool.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00
ZoneServer.h M #-: Bump version 6.3.85 2022-04-07 19:49:58 +02:00