{"record":{"id":"e0be2b998368ca4a","repo":"hashicorp/vagrant","slug":"the-machine-index-which-stores-all-required-inform","errorCode":null,"errorMessage":"The machine index which stores all required information about\nrunning Vagrant environments has become corrupt. This is usually\ncaused by external tampering of the Vagrant data folder.\n\nVagrant cannot manage any Vagrant environments if the index is\ncorrupt. Please attempt to manually correct it. If you are unable\nto manually correct it, then remove the data file at the path below.\nThis will leave all existing Vagrant environments \"orphaned\" and\nthey'll have to be destroyed manually.\n\nPath: %{path}","messagePattern":"The machine index which stores all required information about\nrunning Vagrant environments has become corrupt\\. This is usually\ncaused by external tampering of the Vagrant data folder\\.\n\nVagrant cannot manage any Vagrant environments if the index is\ncorrupt\\. Please attempt to manually correct it\\. If you are unable\nto manually correct it, then remove the data file at the path below\\.\nThis will leave all existing Vagrant environments \"orphaned\" and\nthey'll have to be destroyed manually\\.\n\nPath: %\\{path\\}","errorType":"exception","errorClass":"Vagrant::Errors::CorruptMachineIndex","httpStatus":null,"severity":"error","filePath":"lib/vagrant/machine_index.rb","lineNumber":327,"sourceCode":"          # Another process is probably opened it, no problem.\n        end\n\n        @machine_locks.delete(id)\n      end\n    end\n\n    # This will reload the data without locking the index. It is assumed\n    # the caller with lock the index outside of this call.\n    #\n    # @param [File] f\n    def unlocked_reload\n      return if !@index_file.file?\n\n      data = nil\n      begin\n        data = JSON.load(@index_file.read)\n      rescue JSON::ParserError\n        raise Errors::CorruptMachineIndex, path: @index_file.to_s\n      end\n\n      if data\n        if !data[\"version\"] || data[\"version\"].to_i != 1\n          raise Errors::CorruptMachineIndex, path: @index_file.to_s\n        end\n\n        @machines = data[\"machines\"] || {}\n      end\n    end\n\n    # Saves the index.\n    def unlocked_save\n      @index_file.open(\"w\") do |f|\n        f.write(JSON.dump({\n          \"version\"  => 1,\n          \"machines\" => @machines,\n        }))","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/machine_index.rb#L309-L345","documentation":"Error \"The machine index which stores all required information about\nrunning Vagrant environments has become corrupt. This is usually\ncaused by external tampering of the Vagrant data folder.\n\nVagrant cannot manage any Vagrant environments if the index is\ncorrupt. Please attempt to manually correct it. If you are unable\nto manually correct it, then remove the data file at the path below.\nThis will leave all existing Vagrant environments \"orphaned\" and\nthey'll have to be destroyed manually.\n\nPath: %{path}\" thrown in hashicorp/vagrant.","triggerScenarios":"Thrown at lib/vagrant/machine_index.rb:327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}