hashicorp/vagrant · error · VagrantPlugins::PodmanProvisioner::PodmanError

Podman installation failed.

Error message

Podman installation failed.

What it means

Raised by the Podman installer's ensure_installed(kubic): if the guest has no `podman_installed` capability it warns ('Podman can not be installed') and returns false, letting provisioning continue; when the capability exists but installation (`podman_install` with the kubic flag) completes and `podman_installed` still reports absence, install_failed is raised. As with docker, the real package-manager error is in the output streamed just before.

Source

Thrown at plugins/provisioners/podman/installer.rb:29

      # wrong.
      # @params [Boolean] - if true install should use kubic project (this will)
      #                     add a yum repo.
      #                     if false install comes from default yum
      # @return [Boolean] - false if podman cannot be detected on machine, else
      #                     true if podman installs correctly or is installed
      def ensure_installed(kubic)
        if !@machine.guest.capability?(:podman_installed)
          @machine.ui.warn("Podman can not be installed")
          return false
        end

        if !@machine.guest.capability(:podman_installed)
          @machine.ui.detail("Podman installing")
          @machine.guest.capability(:podman_install, kubic)
        end

        if !@machine.guest.capability(:podman_installed)
          raise PodmanError, :install_failed
        end

        true
      end
    end
  end
end

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Read the install output above the raise for the package error
  2. If on CentOS/RHEL-family and using the kubic repo, set `podman.kubic = true` so the right repo is used
  3. Verify guest connectivity and retry: `vagrant ssh -c 'sudo dnf install -y podman'` then `vagrant provision`
  4. Or bake podman into the box so the installed check passes and no install runs

Example fix

# Vagrantfile - before
config.vm.provision "podman" do |p|
  p.kubic = false  # distro repo lacks podman at needed version
end

# Vagrantfile - after
config.vm.provision "podman" do |p|
  p.kubic = true
end
Defensive patterns

Strategy: try-catch

Validate before calling

# Pre-flight: guest can reach the podman repo / has podman available
system("vagrant ssh -c 'command -v podman || dnf makecache'") or
  warn "Podman not present and repo unreachable - install will likely fail"

Try / catch

begin
  env.cli(%w[provision])
rescue VagrantPlugins::PodmanProvisioner::PodmanError => e
  abort "Podman install failed - check kubic flag and guest network" if e.message == "Podman installation failed."
  raise
end

Prevention

When it happens

Trigger: Podman provisioner where the install capability ran (distro packages or kubic repo) but the verification still cannot find podman - repo download failures, unsupported distro, or podman installed somewhere the check does not look.

Common situations: Guest without network access to the kubic COPR/registry; older distro where podman is unavailable in default repos and `kubic` was not enabled (`podman.kubic = true`); broken dnf/yum state; running on a box that lacks podman guest support entirely (only a warn, not this error).

Related errors


AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21). Data as JSON: /api/errors/85b1aeb49a7eadb1. Report an issue: GitHub.