mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
feature #2143: add machine type to KVM deployment file
Based on a patch submited by Vladislav Gorbunov <vadikgo@icloud.com> in http://dev.opennebula.org/issues/2143#note-2
This commit is contained in:
1 parent
869b6d5ddd
commit
b2332e1250
2 files changed
+16
-2
No files matched your search
@@ -46,6 +46,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
string kernel_cmd = "";
|
||||
string bootloader = "";
|
||||
string arch = "";
|
||||
string machine = "";
|
||||
|
||||
vector<string> boots;
|
||||
|
||||
@@ -190,6 +191,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
kernel_cmd = os->vector_value("KERNEL_CMD");
|
||||
bootloader = os->vector_value("BOOTLOADER");
|
||||
arch = os->vector_value("ARCH");
|
||||
machine = os->vector_value("MACHINE");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +205,19 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
}
|
||||
}
|
||||
|
||||
file << "\t\t<type arch='" << arch << "'>hvm</type>" << endl;
|
||||
if ( machine.empty() )
|
||||
{
|
||||
get_default("OS", "MACHINE", machine);
|
||||
}
|
||||
|
||||
file << "\t\t<type arch='" << arch << "'";
|
||||
|
||||
if ( !machine.empty() )
|
||||
{
|
||||
file << " machine='" << machine << "'";
|
||||
}
|
||||
|
||||
file << ">hvm</type>" << endl;
|
||||
|
||||
if ( kernel.empty() )
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
# (all domains will use these values as defaults). These values can
|
||||
# be overridden in each VM template. Valid atributes are:
|
||||
# - emulator
|
||||
# - os [kernel,initrd,boot,root,kernel_cmd,arch]
|
||||
# - os [kernel,initrd,boot,root,kernel_cmd,arch,machine]
|
||||
# - vcpu
|
||||
# - features [acpi, pae, apic]
|
||||
# - disk [driver, cache, io]
|
||||
|
||||
Reference in new issue
Block a user