[libvirt-users] Cannot boot libvirt guests with OVMF. Raw qemu-kvm works as expected

Martin Kletzander mkletzan at redhat.com
Tue Aug 4 05:47:01 UTC 2015


On Mon, Aug 03, 2015 at 03:39:30PM -0700, Ryan Barry wrote:
>On 08/03/2015 01:43 PM, Ryan Barry wrote:
>> Using:
>>
>> edk2.git-0-20150803.b1141.ga0973dc.x86_64
>> edk2.git-ovmf-x64-0-20150802.b1139.gb234418.noarch
>>
>> On Fedora 22.
>>
>> Provisioning a i440FX system in virt-manager and attempting to boot
>> results in successful EFI initialization, but the VM exits ungracefully
>> after the bootloader (with F22 and CentOS 7 installer images). There's
>> no really useful information in any of the logs.
>>

I haven't tried EFI with 440fx, only with q35.  I haven't found an
option to enable EFI neither a secureboot anywhere in virt-manager.

>> Using qemu-kvm directly (qemu-kvm -bios
>> /usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd -m 1G -cdrom
>> ~rbarry/Downloads/Fedora-Server-netinst-x86_64-22.iso) boots and loads
>> successfully.
>

We don't use '-bios' but '-drive file,if=pflash' and that's done once
for the OVMF code and second time for the efivars storage.  What's the
guest XML and full command line of qemu being started?

>Just to update --
>
>This appears to be related to secureboot. Using a VM which has secure
>boot enabled is successful
>
>>
>> What's the difference here? Where can I go for troubleshooting?
>>
>> libvirt XML is below:
>>
>> <domain type='kvm'>
>>   <name>fedora22</name>
>>   <uuid>7f363d28-881f-4240-97eb-9b8d49cfb282</uuid>
>>   <memory unit='KiB'>2097152</memory>
>>   <currentMemory unit='KiB'>2097152</currentMemory>
>>   <vcpu placement='static'>1</vcpu>
>>   <os>
>>     <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
>>     <loader readonly='yes'
>> type='pflash'>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
>>     <nvram>/var/lib/libvirt/qemu/nvram/fedora22_VARS.fd</nvram>
>>   </os>
>>   <features>
>>     <acpi/>
>>     <apic/>
>>     <pae/>
>>   </features>
>>   <cpu mode='custom' match='exact'>
>>     <model fallback='allow'>Haswell-noTSX</model>
>>   </cpu>
>>   <clock offset='utc'>
>>     <timer name='rtc' tickpolicy='catchup'/>
>>     <timer name='pit' tickpolicy='delay'/>
>>     <timer name='hpet' present='no'/>
>>   </clock>
>>   <on_poweroff>destroy</on_poweroff>
>>   <on_reboot>restart</on_reboot>
>>   <on_crash>restart</on_crash>
>>   <pm>
>>     <suspend-to-mem enabled='no'/>
>>     <suspend-to-disk enabled='no'/>
>>   </pm>
>>   <devices>
>>     <emulator>/usr/bin/qemu-kvm</emulator>
>>     <disk type='file' device='disk'>
>>       <driver name='qemu' type='qcow2'/>
>>       <source file='/var/lib/libvirt/images/fedora22.qcow2'/>
>>       <target dev='vda' bus='virtio'/>
>>       <boot order='1'/>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
>> function='0x0'/>
>>     </disk>
>>     <disk type='file' device='cdrom'>
>>       <driver name='qemu' type='raw'/>
>>       <source
>> file='/home/rbarry/Downloads/Fedora-Server-netinst-x86_64-22.iso'/>
>>       <target dev='hda' bus='ide'/>
>>       <readonly/>
>>       <boot order='2'/>
>>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>>     </disk>
>>     <controller type='usb' index='0' model='ich9-ehci1'>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
>> function='0x7'/>
>>     </controller>
>>     <controller type='usb' index='0' model='ich9-uhci1'>
>>       <master startport='0'/>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
>> function='0x0' multifunction='on'/>
>>     </controller>
>>     <controller type='usb' index='0' model='ich9-uhci2'>
>>       <master startport='2'/>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
>> function='0x1'/>
>>     </controller>
>>     <controller type='usb' index='0' model='ich9-uhci3'>
>>       <master startport='4'/>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
>> function='0x2'/>
>>     </controller>
>>     <controller type='pci' index='0' model='pci-root'/>
>>     <controller type='ide' index='0'>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
>> function='0x1'/>
>>     </controller>
>>     <controller type='virtio-serial' index='0'>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
>> function='0x0'/>
>>     </controller>
>>     <interface type='network'>
>>       <mac address='52:54:00:35:b6:00'/>
>>       <source network='default'/>
>>       <model type='virtio'/>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
>> function='0x0'/>
>>     </interface>
>>     <serial type='pty'>
>>       <target port='0'/>
>>     </serial>
>>     <console type='pty'>
>>       <target type='serial' port='0'/>
>>     </console>
>>     <channel type='unix'>
>>       <source mode='bind'
>> path='/var/lib/libvirt/qemu/channel/target/fedora22.org.qemu.guest_agent.0'/>
>>       <target type='virtio' name='org.qemu.guest_agent.0'/>
>>       <address type='virtio-serial' controller='0' bus='0' port='1'/>
>>     </channel>
>>     <channel type='spicevmc'>
>>       <target type='virtio' name='com.redhat.spice.0'/>
>>       <address type='virtio-serial' controller='0' bus='0' port='2'/>
>>     </channel>
>>     <input type='tablet' bus='usb'/>
>>     <input type='mouse' bus='ps2'/>
>>     <input type='keyboard' bus='ps2'/>
>>     <graphics type='spice' autoport='yes'>
>>       <image compression='off'/>
>>     </graphics>
>>     <sound model='ich6'>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
>> function='0x0'/>
>>     </sound>
>>     <video>
>>       <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
>> function='0x0'/>
>>     </video>
>>     <redirdev bus='usb' type='spicevmc'>
>>     </redirdev>
>>     <redirdev bus='usb' type='spicevmc'>
>>     </redirdev>
>>     <memballoon model='virtio'>
>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x08'
>> function='0x0'/>
>>     </memballoon>
>>   </devices>
>> </domain>
>>
>

>pub  rsa2048/B6AA86F9 2013-10-31
>uid                            Ryan Barry <rbarry at redhat.com>
>uid                            Ryan Barry <phresus at gmail.com>
>sub  rsa2048/9C33C113 2013-10-31

>_______________________________________________
>libvirt-users mailing list
>libvirt-users at redhat.com
>https://www.redhat.com/mailman/listinfo/libvirt-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20150804/4738e5b8/attachment.sig>


More information about the libvirt-users mailing list