Hi Pavan,

I am currently playing around with setting up a OVMF based test framework 
myself. You likely need to tell qemu to use OVMF as it's firmware. I attach my 
current working libvirt XML file for creating UEFI VMs (diskless) - note the 
<loader> and the <nvram> elements within the <os> element.

You want to add a disk sourced from the qcow image and that should work.

Cheers,
Tom

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Pavan Kumar 
Aravapalli
Sent: 22 May 2019 12:02
To: Devel EDK2 <devel@edk2.groups.io>
Subject: [edk2-devel] Help needed in building UEFI qcow2 images


Hi,



[re-posting the question]



I am looking for information/documentation which helps me in enabling UEFI boot 
to the existing (KVM)VM template. I am trying for CentOS 6.5(64-bit) no GUI 
64-bit (KVM) template.





I found some images available over 
https://www.kraxel.org/repos/images/<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.kraxel.org_repos_images_&d=DwMFAw&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=SzAVyxtJHZm7PriTfxFyvkqqZ_OgUqnNtgjrlf7jVU4&m=txzCgRJWkEmPJeuUxTWCEaTYpYEUWr6BmgcbVIpvuI0&s=VNfaavLgc8f7brJsIT2rTlp9QzZRyNUOTsp7rqTHK6E&e=>
 with fedora os, but I am looking for uefi enabled Cent OS template. It would 
be helpfull if any documentation or steps provided for the same.




Regards,

Pavan.
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Accelerite, a Persistent Systems business. It is intended only for 
the use of the individual or entity to which it is addressed. If you are not 
the intended recipient, you are not authorized to read, retain, copy, print, 
distribute or use this message. If you have received this communication in 
error, please notify the sender and delete all copies of this message. 
Accelerite, a Persistent Systems business does not accept any liability for 
virus infected mails.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#41228): https://edk2.groups.io/g/devel/message/41228
Mute This Topic: https://groups.io/mt/31718606/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

<domain type='kvm' id='5'>
  <name>Qemu Test</name>
  <uuid>6a92c8c3-c6b4-4b57-a164-0a9917eeaf19</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64'>hvm</type>
    <bootmenu enable='yes' timeout='3000'/>
    <loader readonly='yes' secure='no' type='pflash'>/tmp/ovmf-test/OVMF_CODE.fd</loader>
    <nvram template='/tmp/ovmf-test/OVMF_VARS.fd'>/tmp/ovmf-test/OVMF_VARS2.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Skylake-Server-IBRS</model>
    <feature policy='require' name='hypervisor'/>
    <feature policy='disable' name='arat'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>preserve</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>preserve</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        [ADDRESS]
      </source>
    </hostdev>
    <serial type='file'>
      <source path='/tmp/ovmf-test/serial0.log'/>
      <target port='0' />
      <alias name='serial0'/>
    </serial>
    <serial type='file'>
      <source path='/tmp/ovmf-test/serial1.log'/>
      <target port='1' />
      <alias name='serial1'/>
    </serial>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
      <image compression='off'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <rng model='virtio'>
      <backend model='random'>/dev/urandom</backend>
      <alias name='rng0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </rng>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+107:+107</label>
    <imagelabel>+107:+107</imagelabel>
  </seclabel>
</domain>

Reply via email to