vagrant-libvirt: Fedora 30 server: version `OPENSSL_1_1_1b' not found

Steps to reproduce

  1. Use Fedora 30 server up-to-date
  2. sudo dnf -y install qemu libvirt libvirt-devel ruby-devel gcc
  3. sudo dnf install -y https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.rpm
  4. CONFIGURE_ARGS='with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib' GEM_HOME=~/.vagrant.d/gems GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems PATH=/opt/vagrant/embedded/bin:$PATH vagrant plugin install vagrant-libvirt
  5. vagrant init centos/7
  6. vagrant up --provider=libvirt

Expected behaviour

It should work

Actual behaviour

It crashes

System configuration

OS/Distro version:: Fedora 30 server edition up-to-date

Libvirt version: Libvirt 5.1.0

Output of vagrant version; vagrant plugin list: vagrant-libvirt (0.0.45, global)

Output of VAGRANT_LOG=debug vagrant up --provider=libvirt

/opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': /opt/vagrant/embedded/lib64/libcrypto.so.1.1: version `OPENSSL_1_1_1b' not found (required by /lib64/libssh.so.4) - /home/testuser/.vagrant.d/gems/2.4.6/gems/ruby-libvirt-0.7.1/lib/_libvirt.so (LoadError)
        from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/testuser/.vagrant.d/gems/2.4.6/gems/ruby-libvirt-0.7.1/lib/libvirt.rb:11:in `<top (required)>'
        from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/testuser/.vagrant.d/gems/2.4.6/gems/fog-libvirt-0.6.0/lib/fog/libvirt.rb:4:in `<top (required)>'
        from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/testuser/.vagrant.d/gems/2.4.6/gems/vagrant-libvirt-0.0.45/lib/vagrant-libvirt/driver.rb:1:in `<top (required)>'
        from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/testuser/.vagrant.d/gems/2.4.6/gems/vagrant-libvirt-0.0.45/lib/vagrant-libvirt/provider.rb:29:in `driver'
        from /home/testuser/.vagrant.d/gems/2.4.6/gems/vagrant-libvirt-0.0.45/lib/vagrant-libvirt/provider.rb:101:in `state'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/machine.rb:532:in `state'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/machine.rb:146:in `initialize'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/vagrantfile.rb:81:in `new'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/vagrantfile.rb:81:in `machine'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/environment.rb:715:in `machine'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/plugin/v2/command.rb:180:in `block in with_target_vms'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/plugin/v2/command.rb:204:in `block in with_target_vms'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/plugin/v2/command.rb:186:in `each'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/plugin/v2/command.rb:186:in `with_target_vms'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/plugins/commands/up/command.rb:87:in `execute'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/cli.rb:66:in `execute'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/environment.rb:290:in `cli'
        from /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/bin/vagrant:182:in `<main>`

A Vagrantfile to reproduce the issue: vagrant init centos/7

Are you using upstream vagrant package or your distros package? Vagrant is upstream Libvirt is distro

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 38 (13 by maintainers)

Most upvoted comments

Temporal workaround:

  1. Remove HashiCorp package: sudo dnf remove vagrant
  2. Install Fedora vagrant package: sudo dnf install vagrant
  3. Remove vagrant-libvirt package from Fedora: sudo dnf remove vagrant-libvirt sudo dnf remove rubygem-fog-core (conflict with plugin building)
  4. Build the upstream vagrant-libvirt: vagrant plugin install vagrant-libvirt

This workaround worked for me

@ikke-t I got it running on Oracle Linux 8 using @JamesReynolds workaround from https://github.com/hashicorp/vagrant/issues/11020#issuecomment-540043472

My build script:

#!/usr/bin/env bash
# Description: override krb5/libssh libraries in Vagrant embedded libraries
set -e

# Get pre-requisites
dnf -y install \
  libxslt-devel libxml2-devel libvirt-devel \
  libguestfs-tools-c ruby-devel \
  gcc byacc make cmake gcc-c++

mkdir -p vagrant-build
cd vagrant-build
dnf download --source krb5-libs libssh
# krb5
rpm2cpio krb5-1.17-*.src.rpm | cpio -idmv krb5-1.17.tar.gz
tar xzf krb5-1.17.tar.gz
pushd krb5-1.17/src
./configure
make
cp -a lib/crypto/libk5crypto.so.3* /opt/vagrant/embedded/lib64/
popd

# libssh
rpm2cpio libssh-0.9.0-*.src.rpm | cpio -imdv  libssh-0.9.0.tar.xz
tar xJf libssh-0.9.0.tar.xz
mkdir build
pushd build
cmake ../libssh-0.9.0  -DOPENSSL_ROOT_DIR=/opt/vagrant/embedded
make
cp lib/libssh* /opt/vagrant/embedded/lib64/
popd

Just for your info.

Current vagrant version is shipped with Fedora 31. Also the vagrant-libvirt is shipped as a package and seems to work ootb. Manual setup as described in the README is currently not neccessary.

$ LC_ALL=C sudo dnf info vagrant vagrant-libvirt
Last metadata expiration check: 2:06:05 ago on Fri Jan 10 15:16:32 2020.
Installed Packages
Name         : vagrant
Version      : 2.2.6
Release      : 1.fc31
Architecture : noarch
Size         : 2.1 M
Source       : vagrant-2.2.6-1.fc31.src.rpm
Repository   : @System
From repo    : updates
Summary      : Build and distribute virtualized development environments
URL          : http://vagrantup.com
License      : MIT
Description  : Vagrant is a tool for building and distributing virtualized development
             : environments.

Name         : vagrant-libvirt
Version      : 0.0.45
Release      : 3.fc31
Architecture : noarch
Size         : 214 k
Source       : vagrant-libvirt-0.0.45-3.fc31.src.rpm
Repository   : @System
From repo    : fedora
Summary      : libvirt provider for Vagrant
URL          : https://github.com/vagrant-libvirt/vagrant-libvirt
License      : MIT
Description  : libvirt provider for Vagrant.

Temporal workaround:

  1. Remove HashiCorp package: sudo dnf remove vagrant

  2. Install Fedora vagrant package: sudo dnf install vagrant

  3. Remove vagrant-libvirt package from Fedora: sudo dnf remove vagrant-libvirt sudo dnf remove rubygem-fog-core (conflict with plugin building)

  4. Build the upstream vagrant-libvirt: vagrant plugin install vagrant-libvirt

A workaround - the Fedora team just release vagrant 2.2.5. I did a clean install of vagrant using the Fedora version of 2.2.5. This will, by default, also install the Fedora package for vagrant-libvirt as a weak dependency. This combination will now start VMs that were previously throwing the error that is the focus of this thread.

I found, however, that several plugins I use as part of my workflow would not install (e.g. vagrant-bolt). As a second workaround, I uninstalled the vagrant-libvirt Fedora rpm, and installed the vagrant-libvirt plugin using the instructions from this project. I can now also install additional plugins.

Brad