diff --git a/src/vmm/LibVirtDriverKVM.cc b/src/vmm/LibVirtDriverKVM.cc index b49be083d8..83a3fa3af5 100644 --- a/src/vmm/LibVirtDriverKVM.cc +++ b/src/vmm/LibVirtDriverKVM.cc @@ -529,6 +529,7 @@ int LibVirtDriver::deployment_description_kvm( bool localtime = false; bool guest_agent = false; int virtio_scsi_queues = 0; + int scsi_targets_num = 0; int pae_found = -1; int acpi_found = -1; @@ -1255,6 +1256,7 @@ int LibVirtDriver::deployment_description_kvm( { file << "\t\t\t
" << endl; + scsi_targets_num++; } } @@ -1733,13 +1735,16 @@ int LibVirtDriver::deployment_description_kvm( << "\t" << endl; } - if ( virtio_scsi_queues > 0 ) + if ( virtio_scsi_queues > 0 || scsi_targets_num > 1) { file << "\t" << endl << "\t\t" << endl; - file << "\t\t\t" << endl; + if ( virtio_scsi_queues > 0 ) + { + file << "\t\t\t" << endl; + } file << "\t\t" << endl << "\t" << endl; @@ -1778,7 +1783,7 @@ int LibVirtDriver::deployment_description_kvm( << "\t\t\t" << one_util::escape_xml(vm->get_system_dir()) << "\n" - << "" + << "\t\t\t" << one_util::escape_xml(vm->get_name()) << "\n" << "\t\t\t"