mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-19 06:50:07 +03:00
* src/vm/VirtualMachine.cc (insert): Add “EMULATOR” to the list of VM attributes understood by opennebula. * src/vmm/LibVirtDriverKVM.cc (deployment_description_kvm): Get “EMULATOR” from VM template first, then from default and finally from hardcoded path. Thanks Vladislav Gorbunov for the patch
This commit is contained in:
parent
ecc8be7c20
commit
f362e64c05
@ -471,6 +471,18 @@ int VirtualMachine::insert(SqlDB * db, string& error_str)
|
||||
goto error_public;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Check for EMULATOR attribute
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
user_obj_template->get("EMULATOR", value);
|
||||
|
||||
if (!value.empty())
|
||||
{
|
||||
user_obj_template->erase("EMULATOR");
|
||||
obj_template->add("EMULATOR", value);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Check for CPU, VCPU and MEMORY attributes
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -379,11 +379,15 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
// ------------------------------------------------------------------------
|
||||
file << "\t<devices>" << endl;
|
||||
|
||||
get_default("EMULATOR",emulator_path);
|
||||
|
||||
vm->get_template_attribute("EMULATOR", emulator_path);
|
||||
if(emulator_path.empty())
|
||||
{
|
||||
emulator_path = "/usr/bin/kvm";
|
||||
get_default("EMULATOR",emulator_path);
|
||||
|
||||
if(emulator_path.empty())
|
||||
{
|
||||
emulator_path = "/usr/bin/kvm";
|
||||
}
|
||||
}
|
||||
|
||||
file << "\t\t<emulator>" << one_util::escape_xml(emulator_path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user