← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1574558] Re: UEFI - instance terminates after boot

 

Reviewed:  https://review.openstack.org/310381
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=647a022baca76f38c73462b99145665cc8095f41
Submitter: Jenkins
Branch:    master

commit 647a022baca76f38c73462b99145665cc8095f41
Author: Chung Chih, Hung <lyan.h@xxxxxxxxxxxxxx>
Date:   Wed Apr 27 09:02:11 2016 +0000

    UEFI - instance terminates after boot
    
    When nvram element had specify template attribute which is path to boot
    loader variable, libvirt will copy the file into libvirt's nvram
    folder. Then qemu will boot with boot loader and boot loader variable.
    
    Nova will specify boot loader to template attribute in nvram element
    instead of specify boot loader variable. This will cause RAM execute
    failed at qemu process.
    
    Qemu config have variable named nvram which save location of master
    nvram file. Therefore we didn't need to assign variable store file, just
    let libvirt process to find relative variable store file with OVMF code file.
    
    Change-Id: Ib589507967742334ad93c6a68de4ee8d3bb42eec
    Closes-Bug: #1574558


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1574558

Title:
  UEFI - instance terminates after boot

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Instance terminates after boot.
  Attached file is qemu's instance logs.

  Libvirt needs UEFI os boot loader.
  Following link will show how to configurate os boot loader in libvirt.
  https://libvirt.org/formatdomain.html#elementsOSBIOS
  Nova will try to access UEFI boot loader with readonly permission.
  This action will cause libvirt have two different operation according to content of nvram element.

  When nvram element didn't specify template attribute, libvirt will read nvram option in qemu config, which is saved in libvirt configuration folder. 
  Nvram option will store key-value pair data, key is os boot loader path and value is boor loader variable path.

  When nvram element had specify template attribute which is path to boot loader variable, libvirt will copy the file into libvirt's nvram folder.
  Then qemu will boot with boot loader and boot loader variable.

  Let me check the xml element for os boot loader.
  <os>
      <type arch='x86_64' machine='pc-i440fx-utopic'>hvm</type>
      <loader readonly='yes' type='pflash'>/opt/ovmf/OVMF_CODE.fd</loader>
      <nvram template='/opt/ovmf/OVMF_CODE.fd'>/var/lib/libvirt/qemu/nvram/instance-0000002c_VARS.fd</nvram>
      <boot dev='hd'/>
      <smbios mode='sysinfo'/>
    </os>
  We can find libvirt will try to copy /opt/ovmf/OVMF_CODE.fd to /var/lib/libvirt/qemu/nvram/instance-0000002c_VARS.fd.
  Nova had specify wrong value in template attribute, it should be /opt/ovmf/OVMF_VARS.fd instead of /opt/ovmf/OVMF_CODE.fd

  We can add one uefi_nvram_override, which key is boot loader path and value is boot loader variable path.
  If boot loader is not exist in this option, just not specify template attribute.
  If boot loader is exist in this option, just specify template attribute with value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1574558/+subscriptions


References