Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant setup fails, qemu fails to load OVMF BIOS file. #72

Closed
grahamwhaley opened this issue Mar 20, 2019 · 10 comments
Closed

Vagrant setup fails, qemu fails to load OVMF BIOS file. #72

grahamwhaley opened this issue Mar 20, 2019 · 10 comments

Comments

@grahamwhaley
Copy link

I'm having trouble (still) bringing up the vagrantfile on an F29 machine. Qemu reports a fail with loading the OVMF BIOS (although I think we have seen previously that may be a misleading error, and the real error maybe elsewhere).
I will note, I can use vagrant with libvirt to load an example machine, and I can use it to load @ganeshmaharaj Ubuntu based setup that is based off of this codebase.

Here is the error output:

An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.

An error occurred while executing the action on the 'clr-01'
machine. Please handle this error then try again:

There was an error talking to Libvirt. The error message is shown
below:

Call to virDomainCreateWithFlags failed: internal error: process exited while connecting to monitor: qemu: could not load PC BIOS '/home/gwhaley/.vagrant.d/boxes/AntonioMeireles-VAGRANTSLASH-ClearLinux/28390/libvirt/OVMF.fd'

An error occurred while executing the action on the 'clr-02'
machine. Please handle this error then try again:

There was an error talking to Libvirt. The error message is shown
below:

Call to virDomainCreateWithFlags failed: internal error: qemu unexpectedly closed the monitor: qemu: could not load PC BIOS '/home/gwhaley/.vagrant.d/boxes/AntonioMeireles-VAGRANTSLASH-ClearLinux/28390/libvirt/OVMF.fd'

An error occurred while executing the action on the 'clr-03'
machine. Please handle this error then try again:

There was an error talking to Libvirt. The error message is shown
below:

Call to virDomainCreateWithFlags failed: internal error: qemu unexpectedly closed the monitor: qemu: could not load PC BIOS '/home/gwhaley/.vagrant.d/boxes/AntonioMeireles-VAGRANTSLASH-ClearLinux/28390/libvirt/OVMF.fd'

But, if we go look see, then it seems that file does exist:

[gwhaley@fido libvirt]$ pwd
/home/gwhaley/.vagrant.d/boxes/AntonioMeireles-VAGRANTSLASH-ClearLinux/28390/libvirt
[gwhaley@fido libvirt]$ ls -la
total 2153112
drwxrwxr-x. 2 gwhaley gwhaley       4096 Mar 20 10:52 .
drwxrwxr-x. 3 gwhaley gwhaley       4096 Mar 20 10:51 ..
-rw-r--r--. 1 gwhaley gwhaley 2200567808 Mar 20 10:51 box.img
-rw-r--r--. 1 gwhaley gwhaley        201 Mar 20 10:51 info.json
-rw-r--r--. 1 gwhaley gwhaley         58 Mar 20 10:51 metadata.json
-rw-rw-r--. 1 gwhaley gwhaley    4194304 Mar 20 10:52 OVMF.fd
-rw-r--r--. 1 gwhaley gwhaley       3750 Mar 20 10:51 Vagrantfile

Here are some component version infos:

[gwhaley@fido libvirt]$ qemu-system-x86_64 --version
QEMU emulator version 3.0.0 (qemu-3.0.0-3.fc29)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
[gwhaley@fido libvirt]$ libvirtd --version
libvirtd (libvirt) 4.7.0
[gwhaley@fido libvirt]$ vagrant --version
Vagrant 2.2.4

And the base level machine I'm on:

[gwhaley@fido libvirt]$ cat /etc/os-release 
NAME=Fedora
VERSION="29 (Workstation Edition)"
ID=fedora
VERSION_ID=29
VERSION_CODENAME=""
PLATFORM_ID="platform:f29"
PRETTY_NAME="Fedora 29 (Workstation Edition)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:29"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=29
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=29
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation

If you need any more info, just ask. I will go back to trying the Ubuntu based derivative for now to continue testing.

@AntonioMeireles
Copy link
Contributor

@grahamwhaley

Hi, thanks for reporting !

this shouldn't happen :/

what's vagrant-libvirt (plugin) version? (paste please output of vagrant plugin list and vagrant plugin list --local)

also, i suspect that fedora should ship somewhere OVMF.fd

if so try also this in the vagrantfile...

config.vm.provider :libvirt do |libvirt, override|
    libvirt.loader = '/PATH_TO_IT_IN_F29/OVMF.fd'
  end

meanwhile could you jump into ClearLinux slack ( clearlinux.slack.com ) and ping me there for a more interactive debug session ?.

Thanks again, for your patience!

@AntonioMeireles
Copy link
Contributor

@grahamwhaley

can you get here the full output of VAGRANT_LOG=info vagrant up of a failing try please too

@AntonioMeireles
Copy link
Contributor

fwiw, at sight what is failing is this https://github.com/AntonioMeireles/ClearLinux-packer/blob/master/Vagrantfile.template.rb#L73-L83 which is odd. so,

a) do you have curl installed right ?
b) https://download.clearlinux.org/image/OVMF.fd is reachable too, right ?

@grahamwhaley
Copy link
Author

Hi @AntonioMeireles - sure, let me post some details here.

gwhaley@fido clr-k8s-examples]$ vagrant plugin list
vagrant-guests-clearlinux (1.1.3, global)
  - Version Constraint: > 0
vagrant-libvirt (0.0.45, global)
  - Version Constraint: > 0
[gwhaley@fido clr-k8s-examples]$ vagrant plugin list --local
Installing the 'vagrant-guests-clearlinux' plugin. This can take a few minutes...
Installed the plugin 'vagrant-guests-clearlinux (1.1.3)'!
vagrant-guests-clearlinux (1.1.3, global)
  - Version Constraint: > 0
vagrant-libvirt (0.0.45, global)
  - Version Constraint: > 0
[gwhaley@fido tmp]$ curl https://download.clearlinux.org/image/OVMF.fd --output OVMF.fd
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4096k  100 4096k    0     0   887k      0  0:00:04  0:00:04 --:--:--  930k

I've attached the VAGRANT_LOG=info output here:
vagrant_info.txt

I'm not currently on the clear linux slack - you can find me on the internal irc clear channel though if you are there?

I'll probably be available for a more interactive session in a couple of hours. Thanks for your quick response!

@grahamwhaley
Copy link
Author

Ah, I just realised you are not inside Intel I think ;-) - let me get on that slack channel later on then if we need.

@olberger
Copy link

Hi. I applied the suggestion from #72 (comment) and added this since I'm on Debian:

      c.vm.provider :libvirt do |libvirt, override|
        libvirt.loader = '/usr/share/qemu/OVMF.fd'
      end

which helped \o/

@krsna1729
Copy link
Contributor

Seems like the latest box does not download OVMF.fd.
/cc @AntonioMeireles @mcastelino @ganeshmaharaj

@olberger
Copy link

See AntonioMeireles/ClearLinux-packer#18 (comment) which proposes a fix.

@AntonioMeireles
Copy link
Contributor

AntonioMeireles commented Apr 19, 2019 via email

@grahamwhaley
Copy link
Author

afaik this is fixed, and has not been seen in the wild for some time. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants