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

An action '%{action}' was attempted on the machine '%{name}'

Error message

An action '%{action}' was attempted on the machine '%{name}',
but another process is already executing an action on the machine.
Vagrant locks each machine for access by only one process at a time.
Please wait until the other Vagrant process finishes modifying this
machine, then try again.

If you believe this message is in error, please check the process
listing for any "ruby" or "vagrant" processes and kill them. Then
try again.

What it means

Error "An action '%{action}' was attempted on the machine '%{name}', but another process is already executing an action on the machine. Vagrant locks each machine for access by only one process at a time. Please wait until the other Vagrant process finishes modifying this machine, then try again. If you believe this message is in error, please check the process listing for any "ruby" or "vagrant" processes and kill them. Then try again." thrown in hashicorp/vagrant.

Source

Thrown at lib/vagrant/machine.rb:220

        # If this action doesn't exist on the provider, then an exception
        # must be raised.
        if callable.nil?
          raise Errors::UnimplementedProviderAction,
            action: name,
            provider: @provider.to_s
        end

        # Call the action
        ui.machine("action", name.to_s, "start")
        action_result = action_raw(name, callable, extra_env)
        ui.machine("action", name.to_s, "end")
        action_result
      end
      # preserve returning environment after machine action runs
      return return_env
    rescue Errors::EnvironmentLockedError
      raise Errors::MachineActionLockedError,
        action: name,
        name: @name
    end

    # This calls a raw callable in the proper context of the machine using
    # the middleware stack.
    #
    # @param [Symbol] name Name of the action
    # @param [Proc] callable
    # @param [Hash] extra_env Extra env for the action env.
    # @return [Hash] The resulting env
    def action_raw(name, callable, extra_env={})
      if !extra_env.is_a?(Hash)
        extra_env = {}
      end

      # Run the action with the action runner on the environment
      env = {ui: @ui}.merge(extra_env).merge(

View on GitHub (pinned to 35f3160f4a)

When it happens

Trigger: Thrown at lib/vagrant/machine.rb:220 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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