mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 12:22:38 +09:00
Merge branch 'feature-3053'
This commit is contained in:
commit
a7249044e4
3 files changed
+76
-14
No files matched your search
@@ -224,6 +224,33 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="medium-6 columns">
|
||||
<label>
|
||||
{{tr "virtio-scsi Queues"}}
|
||||
{{{tip (tr "Number of vCPU queues to use in the virtio-scsi controller. Leave blank to use the default value.")}}}
|
||||
<select wizard_field="VIRTIO_SCSI_QUEUES">
|
||||
<option value=""></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+46
-12
@@ -203,19 +203,21 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
|
||||
const VectorAttribute * features;
|
||||
|
||||
bool pae = false;
|
||||
bool acpi = false;
|
||||
bool apic = false;
|
||||
bool hyperv = false;
|
||||
bool localtime = false;
|
||||
bool guest_agent = false;
|
||||
bool pae = false;
|
||||
bool acpi = false;
|
||||
bool apic = false;
|
||||
bool hyperv = false;
|
||||
bool localtime = false;
|
||||
bool guest_agent = false;
|
||||
int virtio_scsi_queues = 0;
|
||||
|
||||
int pae_found = -1;
|
||||
int acpi_found = -1;
|
||||
int apic_found = -1;
|
||||
int hyperv_found = -1;
|
||||
int localtime_found = -1;
|
||||
int guest_agent_found = -1;
|
||||
int pae_found = -1;
|
||||
int acpi_found = -1;
|
||||
int apic_found = -1;
|
||||
int hyperv_found = -1;
|
||||
int localtime_found = -1;
|
||||
int guest_agent_found = -1;
|
||||
int virtio_scsi_queues_found = -1;
|
||||
|
||||
string hyperv_options = "";
|
||||
|
||||
@@ -799,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;
|
||||
}
|
||||
|
||||
@@ -1148,6 +1163,8 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
hyperv_found = features->vector_value("HYPERV", hyperv);
|
||||
localtime_found = features->vector_value("LOCALTIME", localtime);
|
||||
guest_agent_found = features->vector_value("GUEST_AGENT", guest_agent);
|
||||
virtio_scsi_queues_found =
|
||||
features->vector_value("VIRTIO_SCSI_QUEUES", virtio_scsi_queues);
|
||||
}
|
||||
|
||||
if ( pae_found != 0 )
|
||||
@@ -1180,6 +1197,11 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
get_default("FEATURES", "GUEST_AGENT", guest_agent);
|
||||
}
|
||||
|
||||
if ( virtio_scsi_queues_found != 0 )
|
||||
{
|
||||
get_default("FEATURES", "VIRTIO_SCSI_QUEUES", virtio_scsi_queues);
|
||||
}
|
||||
|
||||
if ( acpi || pae || apic || hyperv )
|
||||
{
|
||||
file << "\t<features>" << endl;
|
||||
@@ -1226,6 +1248,18 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
<< "\t</devices>" << endl;
|
||||
}
|
||||
|
||||
if ( virtio_scsi_queues > 0 )
|
||||
{
|
||||
file << "\t<devices>" << endl
|
||||
<< "\t\t<controller type='scsi' index='0' model='virtio-scsi'>"
|
||||
<< endl;
|
||||
|
||||
file << "\t\t\t<driver queues='" << virtio_scsi_queues << "'/>" << endl;
|
||||
|
||||
file << "\t\t</controller>" << endl
|
||||
<< "\t</devices>" << endl;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Raw KVM attributes
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
# - emulator
|
||||
# - os [kernel,initrd,boot,root,kernel_cmd,arch,machine]
|
||||
# - vcpu
|
||||
# - features [acpi, pae, apic, hyperv, localtime, guest_agent]
|
||||
# - features [acpi, pae, apic, hyperv, localtime, guest_agent, virtio_scsi_queues]
|
||||
# - disk [driver, cache, io, discard, total_bytes_sec, total_iops_sec, read_bytes_sec, write_bytes_sec, read_iops_sec, write_iops_sec]
|
||||
# - nic [filter, model]
|
||||
# - raw
|
||||
@@ -32,7 +32,8 @@
|
||||
#VCPU = 1
|
||||
|
||||
OS = [ arch = "x86_64" ]
|
||||
FEATURES = [ PAE = "no", ACPI = "yes", APIC = "no", HYPERV = "no", GUEST_AGENT = "no" ]
|
||||
FEATURES = [ PAE = "no", ACPI = "yes", APIC = "no", HYPERV = "no", GUEST_AGENT = "no",
|
||||
VIRTIO_SCSI_QUEUES = "0" ]
|
||||
|
||||
DISK = [ driver = "raw" , cache = "none"]
|
||||
|
||||
|
||||
Reference in new issue
Block a user