{"record":{"id":"a589f41988bec782","repo":"hashicorp/vagrant","slug":"vagrant-was-unable-to-locate-the-configuration-fil","errorCode":null,"errorMessage":"Vagrant was unable to locate the configuration file for the requested\nVirtualBox VM. Verify the requested VM exists and try again.\n\n  UUID provided: %{uuid}","messagePattern":"Vagrant was unable to locate the configuration file for the requested\nVirtualBox VM\\. Verify the requested VM exists and try again\\.\n\n  UUID provided: %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors.VirtualBoxConfigNotFound","httpStatus":null,"severity":"error","filePath":"plugins/providers/virtualbox/driver/version_7_0.rb","lineNumber":238,"sourceCode":"        # information can be found in the `showvminfo` output. Once more than a\n        # single port forward is defined, no forwarding information is provided\n        # in the `showvminfo` output. To work around this we grab the VM configuration\n        # file from the `showvminfo` output and extract the port forward information\n        # from there instead.\n        def read_forwarded_ports(uuid=nil, active_only=false)\n          # Only use this override for the 7.0.0 release.\n          return super if get_version.to_s != \"7.0.0\"\n\n          uuid ||= @uuid\n\n          @logger.debug(\"read_forward_ports: uuid=#{uuid} active_only=#{active_only}\")\n\n          results = []\n\n          info = execute(\"showvminfo\", uuid, \"--machinereadable\", retryable: true)\n          result = info.match(/CfgFile=\"(?<path>.+?)\"/)\n          if result.nil?\n            raise Vagrant::Errors::VirtualBoxConfigNotFound,\n                  uuid: uuid\n          end\n\n          File.open(result[:path], \"r\") do |f|\n            doc = REXML::Document.new(f)\n            networks = REXML::XPath.each(doc.root, \"Machine/Hardware/Network/Adapter\")\n            networks.each do |net|\n              REXML::XPath.each(doc.root, net.xpath + \"/NAT/Forwarding\") do |fwd|\n                # Result Array values:\n                # [NIC Slot, Name, Host Port, Guest Port, Host IP]\n                result = [\n                  net.attribute(\"slot\").value.to_i + 1,\n                  fwd.attribute(\"name\")&.value.to_s,\n                  fwd.attribute(\"hostport\")&.value.to_i,\n                  fwd.attribute(\"guestport\")&.value.to_i,\n                  fwd.attribute(\"hostip\")&.value.to_s\n                ]\n                @logger.debug(\" - #{result.inspect}\")","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/virtualbox/driver/version_7_0.rb#L220-L256","documentation":"VirtualBox 7.0.0 shipped a bug where `showvminfo --machinereadable` could omit machine details Vagrant relies on, so the 7.0 driver special-cases exactly version 7.0.0: it re-implements read_forward_ports by parsing the VM's config file, locating it via `CfgFile=\"...\"` in showvminfo output. If that attribute cannot be matched, VirtualBoxConfigNotFound is raised for the UUID. Any VirtualBox release other than 7.0.0 takes the normal `super` path and never hits this code.","triggerScenarios":"read_forward_ports on a host running exactly VirtualBox 7.0.0, where `execute(\"showvminfo\", uuid, \"--machinereadable\")` output has no CfgFile= entry — an unregistered/invalid UUID, a VM whose registration is broken, or the 7.0.0 formatting bug itself.","commonSituations":"Users who stayed on the initial 7.0.0 release while Vagrant added VirtualBox 7 support; `.vagrant/machines/.../id` pointing at a UUID VirtualBox no longer knows (VM removed from VirtualBox GUI); moving/copying a project directory between hosts with stale machine IDs.","solutions":["Update VirtualBox to any 7.0.x patch release above 7.0.0 — the workaround (and the bug) only target 7.0.0 exactly","Verify the VM exists: `VBoxManage showvminfo <uuid>` with the UUID from the error","If the VM is gone, run `vagrant destroy <name>` (or remove the .vagrant/machines folder) and `vagrant up` to recreate it","Upgrade Vagrant to a release with refined VirtualBox 7 handling"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"version = `VBoxManage --version`.strip\nputs 'Upgrade VirtualBox past 7.0.0 to avoid the read_forward_ports bug' if version.start_with?('7.0.0')","typeGuard":"def vbox_700?(vagrant_env)\n  vagrant_env.machine(:default, :virtualbox).driver.read_version.to_s == '7.0.0'\nend","tryCatchPattern":null,"preventionTips":["Never stay on the x.0.0 release of a VirtualBox major version - install patch releases","When copying Vagrant projects between hosts, run `vagrant destroy && vagrant up` to rebuild stale UUIDs"],"tags":["virtualbox","virtualbox-7","showvminfo","forwarded-ports","version-specific"],"backgroundTag":"vm-config-file-missing","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}