-
Notifications
You must be signed in to change notification settings - Fork 498
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 2.3.4 is the last version compatible with this plugin, 2.3.6 and 2.3.7 have an issue #1749
Comments
Greetings - did you find a solution. I have vagrant 2.37 (rpm from vagrant) installed and using the current version of this plugin (0.12.2) on a fedora 38 workstation. |
No, as of today I did not find a solution; workaround: I pinned my Vagrant to version 2.3.4 in my Dockerfile. |
I have the issue that it works fine with vagrant 2.3.4 - from the Debian Bookworm distro, but not with the versions from Hashicorp. Keeps telling me libvirt cannot be found though all relevant packages are in place and pkg-config looks fine, too. I'll stay with the packed distro version for now. |
I had an error in my modified |
@skipperTux can you please show your working Dockerfile? |
Sure, it is basically the original
|
Reopening this issues, because I have some new learning from my research. Also both Dockerfiles in the above post are not working. Feel free to close this issue because of wontfix etc. In a nutshell, Vagrant expects plugins in the folder I have no clue why the vagrant-libvirt Dockerfile used to work till version 2.3.4 and what has changed with version 2.3.5 and above (nothing obvious in the Vagrant Changelog). With the existing When doing There is some Debian patch, hashicorp/vagrant#12016 that might explain why the Debian Bookworm distro version works. It might have worked on My Machine™ because I had some leftovers of old plugins in my For now I am using the following stripped Dockerfile with build dependencies, no plugins# syntax = docker/dockerfile:1.0-experimental
ARG VAGRANT_VERSION=2.4.0
FROM ubuntu:jammy as base
RUN apt-get update \
&& apt-get upgrade \
&& apt-get --yes install --no-install-recommends \
bash \
ca-certificates \
curl \
git \
gosu \
iproute2 \
kmod \
libvirt-clients \
openssh-client \
qemu-utils \
rsync \
&& rm -rf /var/lib/apt/lists \
;
ENV VAGRANT_HOME /.vagrant.d
ARG VAGRANT_VERSION
ENV VAGRANT_VERSION ${VAGRANT_VERSION}
RUN set -e \
&& curl https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}-1_amd64.deb -o vagrant.deb \
&& apt-get update \
&& apt-get --yes install ./vagrant.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f vagrant.deb \
;
ENV VAGRANT_DEFAULT_PROVIDER=libvirt
FROM base as build
# allow caching of packages for build
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list
RUN apt-get update \
&& apt-get --yes build-dep \
vagrant \
ruby-libvirt \
;
FROM build as final
COPY entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"] Another workaround might be to setup a Vagrant Distrobox or Toolbox. Edit: Fixed link. |
Today, I tried again with vagrant 2.4.0. I expunged all plugins and tried to install vagrant-libvirt but this results in:
BUT, package libvirt-dev is installed! I even reinstalled it, but no effect. |
I tried a bit more and actually I have not succeeded in installing different versions of vagrant-libvirt with older vagrant versions, either. Other failures I get are like this:
So, now I am back to the distro install. |
So, I checked how it goes with Docker. I have the same issure here. Vagrant 2.3.4 works fine. Everything after that (I tried 2.3.7 and 2.4.0) builds fine but presents me with the same error from this issues initial post. What poke into my eye is that with 2.3.5 the Vagrant team docuemted: NOTE: Vagrant installer packages were updated to Ruby 3 So, might it be that vagrant-libvirt needs some Ruby version update? |
Upgrading to vagrant 2.4.1 made it work with vagrant-libvirt 0.12.2 for me. FWIW, I've upgraded my ansible playbook from vagrant 2.3.4 to 2.4.1 and tested this in my debian, ubuntu, and windows vagrant boxes. |
Describe the bug
I am building the plugin with Podman on Fedora 38. This worked fine in the past. All recent Vagrant versions build fine without any error (except 2.3.5, see Side note at the end), however the latest version that runs without any error is Vagrant 2.3.4. Vagrant 2.3.6 and 2.3.7 (latest), when running Vagrant with any command, like
vagrant --help
I get the following error:However
vagrant-libvirt
is the only plugin installed.To Reproduce
Steps to reproduce the behavior:
VAGRANT_VERSION
in Dockerfile to 2.3.6 or abovevagrant-libvirt
image usingpodman build --pull=true --tag=docker.io/vagrantlibvirt/vagrant-libvirt:latest .
vagrant --help
or any other Vagrant command (make sure your~/.bashrc
is configured correctly to run Vagrant from Docker/Podman)Expected behavior
Vagrant commands shall run without any error.
Versions (please complete the following information)::
vagrant version
]: 2.3.7vagrant plugin list
]: That command also gives the above error, however the debug log shows only the vagrant-libvirt plugin is installed.Debug Log
Output of
vagrant --help --debug
Output
A Vagrantfile to reproduce the issue:
Side note
Building Vagrant 2.3.5 does not work, giving the following error when installing Vagrant in the image.
Edit: Collapse long output.
The text was updated successfully, but these errors were encountered: