{"record":{"id":"74f0e7b8c70a9417","repo":"hashicorp/vagrant","slug":"the-vm-import-failed-try-running-vboxmanage-impo","errorCode":null,"errorMessage":"The VM import failed! Try running `VBoxManage import` on the box file\nmanually for more verbose error output.","messagePattern":"The VM import failed! Try running `VBoxManage import` on the box file\nmanually for more verbose error output\\.","errorType":"exception","errorClass":"Vagrant::Errors::VMImportFailure","httpStatus":null,"severity":"error","filePath":"plugins/providers/virtualbox/action/import.rb","lineNumber":78,"sourceCode":"              ui.clear_line\n              ui.report_progress(progress, 100, false)\n            end\n          end\n\n          # Set the machine ID\n          env[:machine_id] = id\n          env[:machine].id = id if !env[:skip_machine]\n\n          # Clear the line one last time since the progress meter doesn't disappear\n          # immediately.\n          env[:ui].clear_line\n\n          # If we got interrupted, then the import could have been\n          # interrupted and its not a big deal. Just return out.\n          return if env[:interrupted]\n\n          # Flag as erroneous and return if import failed\n          raise Vagrant::Errors::VMImportFailure if !id\n\n          # Import completed successfully. Continue the chain\n          @app.call(env)\n        end\n\n        def recover(env)\n          if env[:machine] && env[:machine].state.id != Vagrant::MachineState::NOT_CREATED_ID\n            return if env[\"vagrant.error\"].is_a?(Vagrant::Errors::VagrantError)\n\n            # If we're not supposed to destroy on error then just return\n            return if !env[:destroy_on_error]\n\n            # Interrupted, destroy the VM. We note that we don't want to\n            # validate the configuration here, and we don't want to confirm\n            # we want to destroy.\n            destroy_env = env.clone\n            destroy_env[:config_validate] = false\n            destroy_env[:force_confirm_destroy] = true","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/virtualbox/action/import.rb#L60-L96","documentation":"After the standard VBoxManage import of the box's .ovf, the Import action checks the returned machine id; a nil id means no VM got registered, so it raises VMImportFailure. The message deliberately points at `VBoxManage import` for the verbose error because Vagrant's progress-wrapped call hides VBoxManage's diagnostics.","triggerScenarios":"`vagrant up` on VirtualBox where driver.import completes without an id: corrupted/incompatible .ovf/.ova in the box, VirtualBox version refusing the appliance (hardware version, cloud profiles), disk space or path issues, or the import process killed mid-way (though env[:interrupted] returns earlier for Ctrl-C).","commonSituations":"Box built with a much newer VirtualBox (higher hardware version) than the host runs; truncated box download; disk full at the default machine folder; VirtualBox 6.x/7.x refusing older OVFs with strict validation; non-ASCII paths breaking the import.","solutions":["Run the import manually for the verbose error: `VBoxManage import ~/.vagrant.d/boxes/<box>/<ver>/virtualbox/box.ovf`","Re-download and re-add the box (`vagrant box remove <box>` then `vagrant box add`) in case of a truncated archive","Upgrade VirtualBox on the host so the appliance's hardware version is supported","Free disk space and ensure the default machine folder path is plain ASCII with write permission"],"exampleFix":"# diagnose (as the error suggests):\n# VBoxManage import \"$HOME/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-jammy/1.0/virtualbox/box.ovf\"\n# typical output fix example -- hardware version too new:\n# VBoxManage import box.ovf --options ImportNoNAT   # or upgrade VirtualBox\n# then: vagrant destroy -f && vagrant up","handlingStrategy":"try-catch","validationCode":"# validate the box appliance before a long CI run\novf = Dir[File.expand_path('~/.vagrant.d/boxes/<box>/<ver>/virtualbox/*.ovf')].first\nraise 'box ovf missing' unless ovf\nok = system(\"VBoxManage import '#{ovf}' --dry-run\", out: File::NULL, err: File::NULL)\nraise 'VBoxManage cannot import this box - check version/disk space' unless ok","typeGuard":null,"tryCatchPattern":"begin\n  env.cli('up')\nrescue Vagrant::Errors::VMImportFailure => e\n  warn e.message  # points at manual `VBoxManage import` for verbose output\n  run_manual_import_and_capture_log(Dir[box_dir + '/*.ovf'].first)\nend","preventionTips":["Match VirtualBox versions between box builders (packer) and consumers","Checksum box files after download and before CI runs","Reserve disk space for the default machine folder; full disks cause silent import failures"],"tags":["virtualbox","import","ovf","box"],"backgroundTag":"vm-import-failed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}