{"record":{"id":"85b1aeb49a7eadb1","repo":"hashicorp/vagrant","slug":"podman-installation-failed","errorCode":null,"errorMessage":"Podman installation failed.","messagePattern":"Podman installation failed\\.","errorType":"exception","errorClass":"VagrantPlugins::PodmanProvisioner::PodmanError","httpStatus":null,"severity":"error","filePath":"plugins/provisioners/podman/installer.rb","lineNumber":29,"sourceCode":"      # wrong.\n      # @params [Boolean] - if true install should use kubic project (this will)\n      #                     add a yum repo.\n      #                     if false install comes from default yum\n      # @return [Boolean] - false if podman cannot be detected on machine, else\n      #                     true if podman installs correctly or is installed\n      def ensure_installed(kubic)\n        if !@machine.guest.capability?(:podman_installed)\n          @machine.ui.warn(\"Podman can not be installed\")\n          return false\n        end\n\n        if !@machine.guest.capability(:podman_installed)\n          @machine.ui.detail(\"Podman installing\")\n          @machine.guest.capability(:podman_install, kubic)\n        end\n\n        if !@machine.guest.capability(:podman_installed)\n          raise PodmanError, :install_failed\n        end\n\n        true\n      end\n    end\n  end\nend\n","sourceCodeStart":11,"sourceCodeEnd":37,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/provisioners/podman/installer.rb#L11-L37","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Read the install output above the raise for the package error","If on CentOS/RHEL-family and using the kubic repo, set `podman.kubic = true` so the right repo is used","Verify guest connectivity and retry: `vagrant ssh -c 'sudo dnf install -y podman'` then `vagrant provision`","Or bake podman into the box so the installed check passes and no install runs"],"exampleFix":"# Vagrantfile - before\nconfig.vm.provision \"podman\" do |p|\n  p.kubic = false  # distro repo lacks podman at needed version\nend\n\n# Vagrantfile - after\nconfig.vm.provision \"podman\" do |p|\n  p.kubic = true\nend","handlingStrategy":"try-catch","validationCode":"# Pre-flight: guest can reach the podman repo / has podman available\nsystem(\"vagrant ssh -c 'command -v podman || dnf makecache'\") or\n  warn \"Podman not present and repo unreachable - install will likely fail\"","typeGuard":null,"tryCatchPattern":"begin\n  env.cli(%w[provision])\nrescue VagrantPlugins::PodmanProvisioner::PodmanError => e\n  abort \"Podman install failed - check kubic flag and guest network\" if e.message == \"Podman installation failed.\"\n  raise\nend","preventionTips":["Set podman.kubic = true on RHEL-family guests whose base repos lack (or lag) podman","Bake podman into CI base boxes to skip the install path entirely","Note the warning path: 'Podman can not be installed' means the guest lacks the capability and provisioning continues without podman"],"tags":["podman","provisioning","vagrant","installation"],"backgroundTag":"package-installation-failed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}