1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

bug #399: Changed ARCHITECURE for ARCH in VMware to make it coherent with KVM driver

(cherry picked from commit 4b006499ab577bcdf2638576953808ab656959e7)
This commit is contained in:
Ruben S. Montero 2010-11-13 01:12:11 +01:00 committed by Tino Vázquez
parent a801dbbc8e
commit d37c50a6d1

View File

@ -132,26 +132,24 @@ int LibVirtDriver::deployment_description_vmware(
if( os != 0 )
{
arch = os->vector_value("ARCHITECTURE");
arch = os->vector_value("ARCH");
}
}
if ( arch.empty() )
{
get_default("OS","ARCH",arch);
if (arch.empty())
{
goto error_vmware_arch;
}
}
// Start writing to the file with the info we got
file << "\t<os>" << endl;
if ( arch.empty() )
{
get_default("OS","ARCHITECTURE",arch);
}
if (arch.empty())
{
goto error_vmware_arch;
}
file << "\t\t<type arch='" << arch << "'>hvm</type>" << endl;
file << "\t</os>" << endl;
@ -245,7 +243,7 @@ int LibVirtDriver::deployment_description_vmware(
}
attrs.clear();
// ------------------------------------------------------------------------
// Context Device
// ------------------------------------------------------------------------
@ -329,7 +327,7 @@ int LibVirtDriver::deployment_description_vmware(
}
attrs.clear();
file << "\t</devices>" << endl;
// ------------------------------------------------------------------------
@ -369,7 +367,7 @@ error_vmware_file:
return -1;
error_vmware_arch:
vm->log("VMM", Log::ERROR, "No ARCHITECTURE defined and no default provided.");
vm->log("VMM", Log::ERROR, "No ARCH defined and no default provided.");
file.close();
return -1;
@ -383,4 +381,3 @@ error_vmware_disk:
file.close();
return -1;
}