@@ -628,10 +628,6 @@ int LibVirtDriver::deployment_description_kvm(
628628 std::string sd_bus;
629629 std::string disk_bus;
630630
631- bool pm_defaults = true ;
632- std::string pm_suspend_to_disk = " yes" ;
633- std::string pm_suspend_to_mem = " yes" ;
634-
635631 string vm_xml;
636632
637633 Nebula& nd = Nebula::instance ();
@@ -799,17 +795,18 @@ int LibVirtDriver::deployment_description_kvm(
799795 }
800796
801797 bool boot_secure = false ;
802-
803798 string firmware;
804-
799+
805800 get_attribute (vm, nullptr , nullptr , " OS" , " FIRMWARE" , firmware);
806-
807- if ( !firmware.empty () && !one_util::icasecmp (firmware, " BIOS" ) )
801+
802+ bool is_uefi = !firmware.empty () && !one_util::icasecmp (firmware, " BIOS" );
803+
804+ if ( is_uefi )
808805 {
809806 string firmware_secure = " no" ;
810-
811- if ( get_attribute (vm, nullptr , nullptr , " OS" , " FIRMWARE_SECURE" , boot_secure) &&
812- boot_secure)
807+
808+ if ( get_attribute (vm, nullptr , nullptr , " OS" , " FIRMWARE_SECURE" ,
809+ boot_secure) && boot_secure)
813810 {
814811 firmware_secure = " yes" ;
815812 }
@@ -821,26 +818,20 @@ int LibVirtDriver::deployment_description_kvm(
821818 file << " \t\t <nvram>"
822819 << vm->get_system_dir () << " /" << vm->get_name () << " _VARS.fd"
823820 << " </nvram>\n " ;
824-
825- // Suspend to mem and disk disabled to avoid boot problems with UEFI
826- // firmware
827- pm_defaults = false ;
828- pm_suspend_to_disk = " no" ;
829- pm_suspend_to_mem = " no" ;
830821 }
831822
832823 file << " \t </os>" << endl;
833824
834825 // ------------------------------------------------------------------------
835826 // POWER MANAGEMENT SECTION
836827 // ------------------------------------------------------------------------
837- if (!pm_defaults )
828+ if ( is_uefi && arch != " aarch64 " )
838829 {
830+ // Suspend to mem and disk disabled to avoid boot problems with UEFI
831+ // firmware in x86 arch
839832 file << " \t <pm>\n "
840- << " \t\t <suspend-to-disk enabled=\" " << pm_suspend_to_disk
841- << " \" />\n "
842- << " \t\t <suspend-to-mem enabled=\" " << pm_suspend_to_mem
843- << " \" />\n "
833+ << " \t\t <suspend-to-disk enabled=\" no\" />\n "
834+ << " \t\t <suspend-to-mem enabled=\" no\" />\n "
844835 << " \t </pm>\n " ;
845836 }
846837
@@ -1852,7 +1843,7 @@ int LibVirtDriver::deployment_description_kvm(
18521843 file << " \t\t <pae/>" << endl;
18531844 }
18541845
1855- if ( acpi )
1846+ if ( acpi && (arch != " aarch64 " || is_uefi ) )
18561847 {
18571848 file << " \t\t <acpi/>" << endl;
18581849 }
0 commit comments