mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 12:22:38 +09:00
F #3053: add explicit address to scsi drives
By default scsi drives increase the unit part of the address. This causes problems in linux as the devices are not created in order. Setting the target forces the order to be maintained. https://bugzilla.redhat.com/show_bug.cgi?id=1200049
This commit is contained in:
1 parent
05511e5c59
commit
e164fde85f
1 file changed
+13
@@ -801,6 +801,19 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
file << "\t\t\t</iotune>" << endl;
|
||||
}
|
||||
|
||||
// ---- SCSI target ----
|
||||
|
||||
if ( target[0] == 's' && target[1] == 'd' )
|
||||
{
|
||||
int target_number = target[2] - 'a';
|
||||
|
||||
if ( target_number >= 0 && target_number < 256 )
|
||||
{
|
||||
file << "\t\t\t<address type='drive' controller='0' bus='0' " <<
|
||||
"target='" << target_number << "' unit='0'/>" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
file << "\t\t</disk>" << endl;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user