hashicorp/vagrant · error · Vagrant::Errors::ProvisionerWinRMUnsupported

The provisioner '%{name}' doesn't support provisioning on Wi

Error message

The provisioner '%{name}' doesn't support provisioning on
Windows guests via WinRM. This is likely not a limitation
of the provisioner itself but rather that Vagrant doesn't know
how to run this provisioner over WinRM.

If you'd like this provisioner to work over WinRM, please
take a look at the Vagrant source code linked below and try
to contribute back support. Thank you!

https://github.com/hashicorp/vagrant

What it means

Raised by the PuppetServer provisioner when `@machine.config.vm.communicator` is :winrm: it immediately aborts before doing anything. The class's helpers are POSIX-only (verify_binary uses `which`/`test -x`), so over WinRM the commands would be nonsense; Vagrant raises ProvisionerWinRMUnsupported (with name 'puppet_server') and points to the repo, explicitly framing WinRM support as a missing contribution rather than a Puppet limitation.

Source

Thrown at plugins/provisioners/puppet/provisioner/puppet_server.rb:14

# Copyright IBM Corp. 2010, 2025
# SPDX-License-Identifier: BUSL-1.1

module VagrantPlugins
  module Puppet
    module Provisioner
      class PuppetServerError < Vagrant::Errors::VagrantError
        error_namespace("vagrant.provisioners.puppet_server")
      end

      class PuppetServer < Vagrant.plugin("2", :provisioner)
        def provision
          if @machine.config.vm.communicator == :winrm
            raise Vagrant::Errors::ProvisionerWinRMUnsupported,
              name: "puppet_server"
          end

          verify_binary("puppet")
          run_puppet_agent
        end

        def verify_binary(binary)
          if @config.binary_path
            test_cmd = "test -x #{@config.binary_path}/#{binary}"
          else
            test_cmd = "which #{binary}"
          end

          @machine.communicate.sudo(
            test_cmd,
            error_class: PuppetServerError,
            error_key: :not_detected,

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Use the regular `puppet` provisioner (puppet apply) if your flow allows, or run the agent via a shell provisioner: `config.vm.provision "shell", inline: "puppet agent --test --server=puppet.example.com"`
  2. Use the winssh communicator on Windows guests if you can enable SSH there, then puppet_server's POSIX commands work
  3. Contribute WinRM support upstream as the error message suggests

Example fix

# Vagrantfile - before
config.vm.communicator = "winrm"
config.vm.provision "puppet_server" do |puppet|
  puppet.puppet_server = "puppet.example.com"
end

# Vagrantfile - after
config.vm.communicator = "winrm"
config.vm.provision "shell", inline: "puppet agent --test --server puppet.example.com"
Defensive patterns

Strategy: validation

Validate before calling

# Choose the provisioner based on communicator before configuring
if config.vm.communicator == :winrm
  config.vm.provision "shell", inline: "puppet agent --test --server puppet.example.com"
else
  config.vm.provision "puppet_server"
end

Type guard

def puppet_server_supported?(machine)
  machine.config.vm.communicator != :winrm
end

Prevention

When it happens

Trigger: A Vagrantfile with `config.vm.communicator = "winrm"` (required for Windows guests without SSH) plus `config.vm.provision "puppet_server"`. The check fires on every provision call.

Common situations: Windows Server boxes managed via WinRM where the team assumed all provisioners work; templates combining winrm communicator with a Puppet master setup; switching a Linux-oriented Puppet setup to a Windows box.

Related errors


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