hashicorp/vagrant · error · VagrantPlugins::Puppet::Provisioner::PuppetError

Shared folders that Puppet requires are missing on the virtu

Error message

Shared folders that Puppet requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.

What it means

Raised by the Puppet provisioner's verify_shared_folders: manifests/module paths are mounted into the guest and each is probed - `test -d` with sudo on POSIX guests, `Test-Path` via PowerShell on Windows guests (winrm/winssh). Any missing guest path aborts with the standard remedy: `vagrant reload` remounts the synced folder set. Puppet cannot proceed without its manifest/module files present in the guest.

Source

Thrown at plugins/provisioners/puppet/provisioner/puppet.rb:325

            if !data.chomp.empty?
              @machine.ui.info(data.chomp)
            end
          end
        end

        def verify_shared_folders(folders)
          folders.each do |folder|
            @logger.debug("Checking for shared folder: #{folder}")
            if windows?
              testcommand = "Test-Path #{folder}"
              comm_opts = { shell: :powershell}
            else
              testcommand = "test -d #{folder}"
              comm_opts = { sudo: true}
            end

            if !@machine.communicate.test(testcommand, comm_opts)
              raise PuppetError, :missing_shared_folders
            end
          end
        end

        def windows?
          @machine.config.vm.communicator == :winrm || @machine.config.vm.communicator == :winssh
        end
      end
    end
  end
end

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Run `vagrant reload --provision` to re-create and mount the synced folders
  2. Fix guest tools if mounts fail at boot (vagrant-vbguest, open-vm-tools, or matching Parallels tools)
  3. Verify the guest paths: `vagrant ssh -c 'ls /tmp/vagrant-puppet*'` (or `dir` via winrm)
  4. Check no `config.vm.synced_folder` entry disables or overrides Puppet's folders

Example fix

# Terminal - before (after changing manifests_path/modules_path)
vagrant provision   # -> missing_shared_folders

# Terminal - after
vagrant reload --provision
Defensive patterns

Strategy: validation

Validate before calling

# Host pre-flight for puppet paths
[puppet.manifests_path, puppet.module_path].flatten.compact.each do |p|
  host_path = File.expand_path(p.to_s, __dir__)
  abort "Puppet path missing on host: #{host_path}" unless Dir.exist?(host_path)
end

Prevention

When it happens

Trigger: Puppet provisioning where manifests_path/modules_path changed in the Vagrantfile after boot, or where mounting failed (guest tools problems), so `test -d /tmp/vagrant-puppet-...` or `Test-Path` fails inside the VM.

Common situations: Editing puppet paths and running `vagrant provision` instead of reload; Guest Additions/open-vm-tools mismatch breaking mounts; Windows guests where the winrm shell lacks access to the mounted drive until reload; disabled default /vagrant sync.

Related errors


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