DaanHoogland commented on code in PR #7084:
URL: https://github.com/apache/cloudstack/pull/7084#discussion_r1068090896
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtReadyCommandWrapper.java:
##########
@@ -42,18 +42,21 @@ public final class LibvirtReadyCommandWrapper extends
CommandWrapper<ReadyComman
public Answer execute(final ReadyCommand command, final
LibvirtComputingResource libvirtComputingResource) {
Map<String, String> hostDetails = new HashMap<String, String>();
- if (hostSupportsUefi() &&
libvirtComputingResource.isUefiPropertiesFileLoaded()) {
+ if (hostSupportsUefi(libvirtComputingResource.isUbuntuHost()) &&
libvirtComputingResource.isUefiPropertiesFileLoaded()) {
hostDetails.put(Host.HOST_UEFI_ENABLE, Boolean.TRUE.toString());
}
return new ReadyAnswer(command, hostDetails);
}
- private boolean hostSupportsUefi() {
+ private boolean hostSupportsUefi(boolean isUbuntuHost) {
String cmd = "rpm -qa | grep -i ovmf";
+ if (isUbuntuHost) {
+ cmd = "dpkg -l ovmf";
+ }
Review Comment:
```suggestion
String cmd = null;
if (isUbuntuHost) {
cmd = "dpkg -l ovmf";
} else {
cmd = "rpm -qa | grep -i ovmf";
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]