mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
F #5671: Support for ARM and KVM hypervisor
(cherry picked from commit f7672b57d0f9fca2b714478df20cca2cdaef8af5)
This commit is contained in:
parent
f1f2d19d88
commit
ccf21b5e07
@ -628,10 +628,6 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
std::string sd_bus;
|
||||
std::string disk_bus;
|
||||
|
||||
bool pm_defaults = true;
|
||||
std::string pm_suspend_to_disk = "yes";
|
||||
std::string pm_suspend_to_mem = "yes";
|
||||
|
||||
string vm_xml;
|
||||
|
||||
Nebula& nd = Nebula::instance();
|
||||
@ -799,17 +795,18 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
}
|
||||
|
||||
bool boot_secure = false;
|
||||
|
||||
string firmware;
|
||||
|
||||
|
||||
get_attribute(vm, nullptr, nullptr, "OS", "FIRMWARE", firmware);
|
||||
|
||||
if ( !firmware.empty() && !one_util::icasecmp(firmware, "BIOS") )
|
||||
|
||||
bool is_uefi = !firmware.empty() && !one_util::icasecmp(firmware, "BIOS");
|
||||
|
||||
if ( is_uefi )
|
||||
{
|
||||
string firmware_secure = "no";
|
||||
|
||||
if ( get_attribute(vm, nullptr, nullptr, "OS", "FIRMWARE_SECURE", boot_secure) &&
|
||||
boot_secure)
|
||||
|
||||
if ( get_attribute(vm, nullptr, nullptr, "OS", "FIRMWARE_SECURE",
|
||||
boot_secure) && boot_secure)
|
||||
{
|
||||
firmware_secure = "yes";
|
||||
}
|
||||
@ -821,12 +818,6 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
file << "\t\t<nvram>"
|
||||
<< vm->get_system_dir() << "/" << vm->get_name() << "_VARS.fd"
|
||||
<< "</nvram>\n";
|
||||
|
||||
// Suspend to mem and disk disabled to avoid boot problems with UEFI
|
||||
// firmware
|
||||
pm_defaults = false;
|
||||
pm_suspend_to_disk = "no";
|
||||
pm_suspend_to_mem = "no";
|
||||
}
|
||||
|
||||
file << "\t</os>" << endl;
|
||||
@ -834,13 +825,13 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
// ------------------------------------------------------------------------
|
||||
// POWER MANAGEMENT SECTION
|
||||
// ------------------------------------------------------------------------
|
||||
if (!pm_defaults)
|
||||
if ( is_uefi && arch != "aarch64" )
|
||||
{
|
||||
// Suspend to mem and disk disabled to avoid boot problems with UEFI
|
||||
// firmware in x86 arch
|
||||
file << "\t<pm>\n"
|
||||
<< "\t\t<suspend-to-disk enabled=\"" << pm_suspend_to_disk
|
||||
<< "\"/>\n"
|
||||
<< "\t\t<suspend-to-mem enabled=\"" << pm_suspend_to_mem
|
||||
<< "\"/>\n"
|
||||
<< "\t\t<suspend-to-disk enabled=\"no\"/>\n"
|
||||
<< "\t\t<suspend-to-mem enabled=\"no\"/>\n"
|
||||
<< "\t</pm>\n";
|
||||
}
|
||||
|
||||
@ -1852,7 +1843,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
file << "\t\t<pae/>" << endl;
|
||||
}
|
||||
|
||||
if ( acpi )
|
||||
if ( acpi && (arch != "aarch64" || is_uefi ))
|
||||
{
|
||||
file << "\t\t<acpi/>" << endl;
|
||||
}
|
||||
|
@ -90,4 +90,4 @@ SPICE_OPTIONS = "
|
||||
#
|
||||
# Open Virtual Machine Firware (UEFI Firmware)
|
||||
# List of valid firmware available to users (full path in the hosts)
|
||||
OVMF_UEFIS = "/usr/share/OVMF/OVMF_CODE.fd /usr/share/OVMF/OVMF_CODE.secboot.fd"
|
||||
OVMF_UEFIS = "/usr/share/OVMF/OVMF_CODE.fd /usr/share/OVMF/OVMF_CODE.secboot.fd /usr/share/AAVMF/AAVMF_CODE.fd"
|
||||
|
@ -93,4 +93,5 @@ DEFAULT_ATTACH_NIC_MODEL=virtio
|
||||
#DEFAULT_ATTACH_NIC_FILTER=clean-traffic
|
||||
|
||||
# Virtual Machine Firmware path to the NVRAM file
|
||||
# OVMF_NVRAM="/usr/share/AAVMF/AAVMF_VARS.fd" for aarch64 guests
|
||||
OVMF_NVRAM="/usr/share/OVMF/OVMF_VARS.fd"
|
||||
|
Loading…
x
Reference in New Issue
Block a user