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

Revert "F #5671: Support for ARM and KVM hypervisor"

This reverts commit ccf21b5e0774e9bedbd11ee9a9807adc994b9a43.
This commit is contained in:
Ruben S. Montero 2021-12-14 13:17:50 +01:00
parent ccf21b5e07
commit 8844e94d62
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
3 changed files with 24 additions and 16 deletions

View File

@ -628,6 +628,10 @@ 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();
@ -795,18 +799,17 @@ int LibVirtDriver::deployment_description_kvm(
}
bool boot_secure = false;
string firmware;
get_attribute(vm, nullptr, nullptr, "OS", "FIRMWARE", firmware);
bool is_uefi = !firmware.empty() && !one_util::icasecmp(firmware, "BIOS");
if ( is_uefi )
if ( !firmware.empty() && !one_util::icasecmp(firmware, "BIOS") )
{
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";
}
@ -818,6 +821,12 @@ 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;
@ -825,13 +834,13 @@ int LibVirtDriver::deployment_description_kvm(
// ------------------------------------------------------------------------
// POWER MANAGEMENT SECTION
// ------------------------------------------------------------------------
if ( is_uefi && arch != "aarch64" )
if (!pm_defaults)
{
// 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=\"no\"/>\n"
<< "\t\t<suspend-to-mem enabled=\"no\"/>\n"
<< "\t\t<suspend-to-disk enabled=\"" << pm_suspend_to_disk
<< "\"/>\n"
<< "\t\t<suspend-to-mem enabled=\"" << pm_suspend_to_mem
<< "\"/>\n"
<< "\t</pm>\n";
}
@ -1843,7 +1852,7 @@ int LibVirtDriver::deployment_description_kvm(
file << "\t\t<pae/>" << endl;
}
if ( acpi && (arch != "aarch64" || is_uefi ))
if ( acpi )
{
file << "\t\t<acpi/>" << endl;
}

View File

@ -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 /usr/share/AAVMF/AAVMF_CODE.fd"
OVMF_UEFIS = "/usr/share/OVMF/OVMF_CODE.fd /usr/share/OVMF/OVMF_CODE.secboot.fd"

View File

@ -93,5 +93,4 @@ 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"