Closed levindecaro closed 2 years ago
The
<os>
<type arch='x86_64' machine='pc-q35-rhel7.6.0'>hvm</type>
<loader readonly='yes' secure='no' type='pflash'>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
<nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/8c00e797-c713-4f4e-9a24-12c3436cf06f.fd</nvram>
<boot dev='cdrom'/>
<boot dev='hd'/>
</os>
I have this issues too. After I upgrade from 4.15.2
OS / ENVIRONMENT Rocky Linux release 8.5 (Green Obsidian)
I think it should be fixed in #5692.
I think it should be fixed in #5692.
that pr would address the
<loader readonly='yes' secure='no' type='pflash'>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
,
part, @leolleeooleo . I don't think it adds the
<nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/8c00e797-c713-4f4e-9a24-12c3436cf06f.fd</nvram>
, which would be needed as well.
Also i'm not sure it will leave the <smbios mode='sysinfo'/>
out and whether that is required/fatal. Can you guys test that PR in and report back? (cc @levindecaro )
In the agent debug log nvram is fine. I think it just miss something (loader) so libvirt remove it. The code vnram was missing '\n' at the end.
I rebase #5692 to tag 4.16.0.0, and replace cloud-plugin-hypervisor-kvm-4.16.0.0.jar UEFI works fine.
My steps:
$ git checkout -b test a85a00bed97bf222acbc28eda893f4ddc57b1f09
$ git rebase -i 4.16.0.0
:1,10s/pick/drop/g
drop 93c3c3b9ac Updating pom.xml version numbers for release 4.16.1.0-SNAPSHOT
drop 462e0511f4 Fix version and add schema upgrade path
drop bdab51424a New upgrade schema path and workaround for system VM template auto registration
drop 4568a68d83 CsDhcp.py: fix runtests.sh error (#5671)
drop 0684aff529 ui: fix incorrect auto-select (#5693)
drop a8e7315e53 UI : Fix SSL certificate submit button not working (#5682)
drop e93d67444d ui-primary-storage: hide provider if Linstor protocol (#5672)
drop c95f8e263a server: set network rate for additional public IPs (#5670)
drop dd458feeb8 IPv6: fix deploy vm issue in ipv6-only networks without VR (#5648)
drop babf94f801 UI: Autoscroll to Error Field (#5200)
pick a85a00bed9 kvm: Fixes UEFI XML Definition Error (#5692)
# Rebase 44c08b5acc..a85a00bed9 onto c95f8e263a (11 commands)
:wq
$ git log
commit 616791c0f0e0e1deeb2457afe4fbecccf552e8b2 (HEAD -> test)
Author: DH Park <pdh1974@gmail.com>
Date: Tue Nov 23 20:14:32 2021 +0900
kvm: Fixes UEFI XML Definition Error (#5692)
UEFI bootMode 추가
commit 44c08b5acc598972b4f0af576ffdea4e2447cb41 (tag: 4.16.0.0)
Author: nicolas <nicovazquez90@gmail.com>
Date: Thu Nov 4 14:14:57 2021 -0300
Updating pom.xml version numbers for release 4.16.0.0
Signed-off-by: nicolas <nicovazquez90@gmail.com>
$ git diff 4.16.0.0
diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 46763a151f..9684b7e224 100644
--- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -2357,6 +2357,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
s_logger.debug(String.format("Enabled Secure Boot for VM UUID [%s].", uuid));
isSecureBoot = true;
}
+
+ bootMode = customParams.get(GuestDef.BootType.UEFI.toString());
}
Map<String, String> extraConfig = vmTO.getExtraConfig();
$ mvn install
$ scp plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-4.16.0.0.jar leo@kvm-agent:
$ ssh leo@kvm-agent
$ cp /usr/share/cloudstack-agent/lib/cloud-plugin-hypervisor-kvm-4.16.0.0.jar ~/cloud-plugin-hypervisor-kvm-4.16.0.0.jar.origin
$ sudo systemctl stop cloudstack-agent.service
$ sudo cp ~/cloud-plugin-hypervisor-kvm-4.16.0.0.jar /usr/share/cloudstack-agent/lib/cloud-plugin-hypervisor-kvm-4.16.0.0.jar
$ sudo systemctl start cloudstack-agent.service
@DaanHoogland
Tested #5692 was fixed for this case. Thank you @leolleeooleo
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
CentOS Linux release 7.9.2009 qemu-kvm-common-ev-2.12.0-44.1.el7_8.1.x86_64 qemu-kvm-ev-2.12.0-44.1.el7_8.1.x86_64 OVMF-20180508-6.gitee3198e672e2.el7.noarch
SUMMARY
Cannot boot VM into UEFI mode, always fallback into BIOS mode.
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
Server Log
Agent debug log