Description of problem: VMware can present either BIOS or UEFI to guests. When you export such a guest as a VMware OVF, you can see in the metadata that it records the presence of EFI: <vmw:Config ovf:required="false" vmw:key="firmware" vmw:value="efi" /> (See attached OVF for the complete file) However the libvirt XML equivalent contains no indication that the guest requires EFI. (See attached example from the same guest) Version-Release number of selected component (if applicable): I only tested this on Fedora, but I assume the same must hold true on RHEL 7. libvirt-1.2.14-2.fc23.x86_64 How reproducible: 100% Steps to Reproduce: 1. Create a UEFI guest on VMware 5.5 2. Export it as an OVA. 3. Connect to the server using libvirt: virsh -c 'vpx://root@v2v-vcenter/Datacenter/vmware.home.annexia.org?no_verify=1' dumpxml "RHEL 7.1 UEFI" The OVF & libvirt XML are attached.
Created attachment 1020568 [details] RHEL 7.1 UEFI.ovf Note in the attached OVF file the line: <vmw:Config ovf:required="false" vmw:key="firmware" vmw:value="efi" />
Created attachment 1020569 [details] RHEL 7.1 UEFI.xml The libvirt XML from the same guest. Note there is no indication that the guest requires EFI.
Created attachment 1020572 [details] RHEL 7.1 UEFI.vmx This is the vmx file from a UEFI guest. $ grep -i firmware RHEL*.vmx RHEL 7.1 UEFI.vmx:firmware = "efi"
Created attachment 1020573 [details] RHEL 7.1 Server.vmx This is the vmx file from a NON-UEFI guest. Note that there is no "firmware" line at all in this file.
Currently in libvirt XML the only way to change the firmware type used is to supply a path to the firmware binary, eg <loader>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader> While this works, it is rather horrible for applications to have to care about the long file paths. It is even worse because EFI firmeware for x86 has a different filepath than firmware for aarch64, so apps need to know about arch specific firmware paths. On vmware there is not even any concept of loader paths. It would be nice if we extended the libvirt XML so that we can refer to the firmware types using short symbolic names. eg <loader type="bios|efi|...."/> And then libvirt automatically fill in the correct filepath (if required). This would allow a nice mapping for the vmware VMX config, as also simplify EFI usage for KVM apps. The absence of any <loader> or type attribute would just signify to use the default firmware for the platform
I've got an impl of this idea here (for KVM/QEMI only) https://www.redhat.com/archives/libvir-list/2016-October/msg00045.html this is something we could then wire up for VMWare too Could you confirm that works from libguestfs POV before i merge it.
Just unsetting NEEDINFO. I provided review comments on the patch: https://www.redhat.com/archives/libvir-list/2016-October/thread.html#00045 There are a few problems which mean that it's not usable from libguestfs in its present state unfortunately.
I posted an idea for implementing an interim fix: https://www.redhat.com/archives/libvir-list/2017-November/msg00203.html
Few years later... There was work, part of libvirt 5.2.0, to do automatic firmware selection for QEMU: bug 1564270. This allows guest XMLs to just specify the type of firmware with no need for paths of loader, etc -- for example: <os firmware='bios|efi'> ... </os> Making use of this infrastructure (the XML additions, in particular), I exposed the firmware information of VMware guests in the XML: https://www.redhat.com/archives/libvir-list/2019-April/msg00653.html 3958e3d6a5 docs: document firmware attribute for VMware guests b4e34d1083 vmx: write firmware back from autoselection 9bb6e4e739 vmx: convert firmware config for autoselection Part of libvirt 5.3.0.
Verify bug with build: libvirt-5.5.0-1.module+el8.1.0+3580+d7f6488d.x86_64 Steps: 1.Create a rhel7.6 uefi guest on the ESX6.5 server 2.Export the ova file and check the firmware info from the ovf file # cat esx6_5-rhel7.6-uefi.ovf |grep firmware <vmw:Config ovf:required="false" vmw:key="firmware" vmw:value="efi"/> 3.Check the firmware info from the guest's xml # virsh -c vpx://root.73.141/data/10.73.196.89/?no_verify=1 dumpxml esx6.5-rhel7.6-uefi <domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'> <name>esx6.5-rhel7.6-uefi</name> ... <os firmware='efi'> <type arch='x86_64'>hvm</type> </os> Result: Libvirt vmware driver can expose the firmware/efi property,so change the bug from ON_QA to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:3723