From e164fde85f4459add2e8007ebcf15da5d045d514 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Wed, 17 May 2017 15:24:57 +0200 Subject: [PATCH] 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 --- src/vmm/LibVirtDriverKVM.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index 1404a5c688..92fe50faf7 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -801,6 +801,19 @@ int LibVirtDriver::deployment_description_kvm( file << "\t\t\t" << 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
" << endl; + } + } + file << "\t\t" << endl; }