mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Merge branch 'feature-1701'
This commit is contained in:
commit
3cb3366eb7
@ -56,12 +56,14 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
string ro = "";
|
||||
string driver = "";
|
||||
string cache = "";
|
||||
string disk_io = "";
|
||||
string source = "";
|
||||
string clone = "";
|
||||
|
||||
int disk_id;
|
||||
string default_driver = "";
|
||||
string default_driver_cache = "";
|
||||
string default_driver = "";
|
||||
string default_driver_cache = "";
|
||||
string default_driver_disk_io = "";
|
||||
bool readonly;
|
||||
|
||||
const VectorAttribute * nic;
|
||||
@ -298,6 +300,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
default_driver_cache = "default";
|
||||
}
|
||||
|
||||
get_default("DISK","IO",default_driver_disk_io);
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
num = vm->get_template_attribute("DISK",attrs);
|
||||
@ -316,6 +319,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
ro = disk->vector_value("READONLY");
|
||||
driver = disk->vector_value("DRIVER");
|
||||
cache = disk->vector_value("CACHE");
|
||||
disk_io= disk->vector_value("IO");
|
||||
source = disk->vector_value("SOURCE");
|
||||
clone = disk->vector_value("CLONE");
|
||||
|
||||
@ -406,14 +410,23 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
|
||||
if ( !cache.empty() )
|
||||
{
|
||||
file << cache << "'/>" << endl;
|
||||
file << cache << "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
file << default_driver_cache << "'/>" << endl;
|
||||
file << default_driver_cache << "'";
|
||||
}
|
||||
|
||||
file << "\t\t</disk>" << endl;
|
||||
if ( !disk_io.empty() )
|
||||
{
|
||||
file << " io='" << disk_io << "'";
|
||||
}
|
||||
else if ( !default_driver_disk_io.empty() )
|
||||
{
|
||||
file << " io='" << default_driver_disk_io << "'";
|
||||
}
|
||||
|
||||
file << "/>" << endl << "\t\t</disk>" << endl;
|
||||
}
|
||||
|
||||
attrs.clear();
|
||||
|
@ -21,7 +21,7 @@
|
||||
# - os [kernel,initrd,boot,root,kernel_cmd,arch]
|
||||
# - vcpu
|
||||
# - features [acpi, pae]
|
||||
# - disk [driver, cache]
|
||||
# - disk [driver, cache, io]
|
||||
# - nic [filter, model]
|
||||
# - raw
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
OS = [ boot = "hd", arch = "i686" ]
|
||||
FEATURES = [ PAE = "no", ACPI = "yes" ]
|
||||
|
||||
DISK = [ driver = "raw" , cache = "default"]
|
||||
DISK = [ driver = "raw" , cache = "none"]
|
||||
|
||||
#NIC = [ filter = "clean-traffic", model="virtio" ]
|
||||
#RAW = "<devices><serial type=\"pty\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\" tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></console></devices>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user