1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-29 18:50:08 +03:00

M #-: Attach SR-IOV devices to the right PCI port (#2695)

SR-IOV devices were being attached to the first PCI port available and opennebula was rendering the port number incorrectly
This commit is contained in:
brodriguez-opennebula 2023-08-07 10:19:42 +02:00 committed by GitHub
parent d6895c4716
commit a24f3f8e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1938,16 +1938,17 @@ int LibVirtDriver::deployment_description_kvm(
<< "/>\n";
file << "\t\t\t</source>\n";
if ( !vm_domain.empty() && !vm_bus.empty() && !vm_slot.empty() &&
!vm_func.empty() )
{
file << "\t\t\t\t<address type='pci'"
<< " domain=" << one_util::escape_xml_attr(vm_domain)
<< " bus=" << one_util::escape_xml_attr(vm_bus)
<< " slot=" << one_util::escape_xml_attr(vm_slot)
<< " function=" << one_util::escape_xml_attr(vm_func)
<< "/>\n";
}
}
if ( !vm_domain.empty() && !vm_bus.empty() && !vm_slot.empty() &&
!vm_func.empty() )
{
file << "\t\t\t\t<address type='pci'"
<< " domain=" << one_util::escape_xml_attr(vm_domain)
<< " bus=" << one_util::escape_xml_attr(vm_bus)
<< " slot=" << one_util::escape_xml_attr(vm_slot)
<< " function=" << one_util::escape_xml_attr(vm_func)
<< "/>\n";
}
file << "\t\t</hostdev>" << endl;