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:
parent
d6895c4716
commit
a24f3f8e6c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user