mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
feature #517: Add disk driver definition for VMware
This commit is contained in:
parent
2bbf683909
commit
6311380782
@ -46,6 +46,8 @@ int LibVirtDriver::deployment_description_vmware(
|
||||
string ro = "";
|
||||
string source = "";
|
||||
string datastore = "";
|
||||
string driver = "";
|
||||
string default_driver = "";
|
||||
bool readonly;
|
||||
|
||||
const VectorAttribute * nic;
|
||||
@ -161,6 +163,13 @@ int LibVirtDriver::deployment_description_vmware(
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
file << "\t<devices>" << endl;
|
||||
|
||||
get_default("DISK","DRIVER",default_driver);
|
||||
|
||||
if (default_driver.empty())
|
||||
{
|
||||
default_driver = "raw";
|
||||
}
|
||||
|
||||
num = vm->get_template_attribute("DISK",attrs);
|
||||
|
||||
@ -183,6 +192,7 @@ int LibVirtDriver::deployment_description_vmware(
|
||||
ro = disk->vector_value("READONLY");
|
||||
bus = disk->vector_value("BUS");
|
||||
source = disk->vector_value("SOURCE");
|
||||
driver = disk->vector_value("DRIVER");
|
||||
|
||||
if (target.empty())
|
||||
{
|
||||
@ -233,6 +243,17 @@ int LibVirtDriver::deployment_description_vmware(
|
||||
{
|
||||
file << "/>" << endl;
|
||||
}
|
||||
|
||||
file << "\t\t\t<driver name='";
|
||||
|
||||
if ( !driver.empty() )
|
||||
{
|
||||
file << driver << "'/>" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
file << default_driver << "'/>" << endl;
|
||||
}
|
||||
|
||||
if (readonly)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user