{"record":{"id":"e6d58459bfd2d554","repo":"hashicorp/vagrant","slug":"there-was-an-error-while-executing-vboxmanage-a-e6d584","errorCode":null,"errorMessage":"There was an error while executing `VBoxManage`, a CLI used by Vagrant\nfor controlling VirtualBox. The command and stderr is shown below.\n\nCommand: %{command}\n\nStderr: %{stderr}","messagePattern":"There was an error while executing `VBoxManage`, a CLI used by Vagrant\nfor controlling VirtualBox\\. The command and stderr is shown below\\.\n\nCommand: %(.+?)\n\nStderr: %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors.VBoxManageError","httpStatus":null,"severity":"error","filePath":"plugins/providers/virtualbox/driver/version_5_0.rb","lineNumber":877,"sourceCode":"\n        def resume\n          @logger.debug(\"Resuming paused VM...\")\n          execute(\"controlvm\", @uuid, \"resume\")\n        end\n\n        def start(mode)\n          command = [\"startvm\", @uuid, \"--type\", mode.to_s]\n          retryable(on: Vagrant::Errors::VBoxManageError, tries: 3, sleep: 1) do\n            r = raw(*command)\n\n            if r.exit_code == 0 || r.stdout =~ /VM \".+?\" has been successfully started/\n              # Some systems return an exit code 1 for some reason. For that\n              # we depend on the output.\n              return true\n            end\n\n            # If we reached this point then it didn't work out.\n            raise Vagrant::Errors::VBoxManageError,\n                  command: command.inspect,\n                  stderr: r.stderr\n          end\n        end\n\n        def suspend\n          execute(\"controlvm\", @uuid, \"savestate\", retryable: true)\n        end\n\n        def unshare_folders(names)\n          names.each do |name|\n            retryable(on: Vagrant::Errors::VBoxManageError, tries: 3, sleep: 1) do\n              begin\n                execute(\n                  \"sharedfolder\", \"remove\", @uuid,\n                  \"--name\", name,\n                  \"--transient\")\n","sourceCodeStart":859,"sourceCodeEnd":895,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/virtualbox/driver/version_5_0.rb#L859-L895","documentation":"The 5.x driver starts the VM with `VBoxManage startvm <uuid> --type <mode>` inside a 3-attempt retry loop. It treats exit code 0 or output matching `VM \"...\" has been successfully started` as success; anything else after the retries is raised as Vagrant::Errors::VBoxManageError with the exact command and stderr. The real cause is always in the embedded stderr — typical culprits are hardware virtualization being unavailable or another hypervisor holding the VM.","triggerScenarios":"start(mode) invoked during `vagrant up`/`vagrant resume`: raw(*command) returns non-zero exit and stdout lacks 'has been successfully started' three times in a row (some VBoxManage builds exit 1 on success, which is why stdout is also checked).","commonSituations":"VT-x/AMD-V disabled in BIOS or nested virtualization unavailable; Hyper-V/WSL2/Device Guard conflicting with VirtualBox on Windows; not enough free host memory for the configured VM size; VM left in an inconsistent state (locked) after a host crash; headless start on a host lacking a graphics/display subsystem.","solutions":["Run the Command shown in the error manually (`VBoxManage startvm <uuid> --type headless`) to get the full failure reason","Enable VT-x/AMD-V in BIOS, or on Windows disable Hyper-V (`bcdedit /set hypervisorlaunchtype off`) and reboot","Lower vm.memory / check host RAM if stderr mentions allocation failure","Discard the saved state or unregister the locked VM if it is stuck (`VBoxManage discardstate <uuid>`)","Check VBoxHardening.log / system event logs on Windows for driver signing issues"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"ok = system('VBoxManage', 'startvm', uuid, '--type', 'headless', out: File::NULL, err: File::NULL)\nputs 'startvm fails standalone - fix VT-x/Hyper-V/memory first' unless ok","typeGuard":null,"tryCatchPattern":"begin\n  machine.action(:start)\nrescue Vagrant::Errors::VBoxManageError => e\n  # e.extra_data[:command] and [:stderr] hold the exact failure\n  retry if (attempts = (attempts || 0) + 1) < 3 && transient?(e.extra_data[:stderr])\n  raise\nend","preventionTips":["Enable VT-x/AMD-V in BIOS; on Windows disable Hyper-V before using VirtualBox","Keep vm.memory within real host capacity","After host crashes, discard stuck VM state with `VBoxManage discardstate` before vagrant up"],"tags":["virtualbox","vboxmanage","startvm","hypervisor-conflict","vt-x"],"backgroundTag":"virtualbox-startvm-failed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}