{"record":{"id":"b3dfb52a9bca269b","repo":"hashicorp/vagrant","slug":"a-docker-command-executed-by-vagrant-didn-t-comple-b3dfb5","errorCode":null,"errorMessage":"A Docker command executed by Vagrant didn't complete successfully!\nThe command run along with the output from the command is shown\nbelow.\n\nCommand: %{command}\n\nStderr: %{stderr}\n\nStdout: %{stdout}","messagePattern":"A Docker command executed by Vagrant didn't complete successfully!\nThe command run along with the output from the command is shown\nbelow\\.\n\nCommand: %(.+?)\n\nStderr: %(.+?)\n\nStdout: %(.+?)","errorType":"exception","errorClass":"VagrantPlugins::DockerProvider::Errors::ExecuteError","httpStatus":null,"severity":"error","filePath":"plugins/providers/docker/executor/vagrant.rb","lineNumber":62,"sourceCode":"\n                index += start_fence.length\n                stdout = stdout[index..-1]\n                stdout.chomp!\n\n                # We're now fenced, send all the data through\n                if block\n                  block.call(:stdout, stdout) if stdout != \"\"\n                  block.call(:stderr, stderr) if stderr != \"\"\n                end\n              end\n            else\n              # If we're already fenced, just send the data through.\n              block.call(type, data) if block && fenced\n            end\n          end\n\n          if code != 0\n            raise Errors::ExecuteError,\n              command: cmd,\n              stderr: stderr.chomp,\n              stdout: stdout.chomp\n          end\n\n          stdout.chomp\n        end\n\n        def windows?\n          false\n        end\n\n        protected\n\n        def ssh_run(cmd)\n          @host_machine.action(\n            :ssh_run,\n            ssh_run_command: cmd,","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/docker/executor/vagrant.rb#L44-L80","documentation":"When docker runs inside the provider's host VM, commands execute over SSH via Executor::Vagrant with streamed stdout/stderr. A non-zero exit code of the command on the guest raises ExecuteError carrying the command, stderr, and stdout captured from inside the host VM.","triggerScenarios":"Docker-in-host-VM setups (e.g. macOS/Windows without a local daemon) where the docker CLI fails inside the host VM: its daemon stopped, registry auth missing there, or a port already in use inside the VM.","commonSituations":"Host VM docker daemon stopped after a suspend/resume; host VM low on disk or memory; proxy/auth environment variables not set inside the VM.","solutions":["Read the Stderr: section for the in-VM docker message","SSH into the host VM and verify the daemon: run `docker info` there (or use the provider's docker-env helpers)","Reload the host VM to restart its docker daemon, then retry","Fix the underlying failure (auth, ports, disk space) and re-run"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# preflight inside the host VM (adjust path to your host VM environment)\ncd host-vm && vagrant ssh -c 'docker info >/dev/null' || vagrant reload","typeGuard":null,"tryCatchPattern":"begin\n  executor.execute(*cmd)\nrescue VagrantPlugins::DockerProvider::Errors::ExecuteError => e\n  stderr = e.extra_data[:stderr]\n  if stderr.include?('Cannot connect to the Docker daemon')\n    reload_host_vm_and_retry   # daemon inside the host VM is down\n  else\n    raise\n  end\nend","preventionTips":["Health-check docker inside the host VM before container workflows","Pass proxy/registry credentials into the host VM environment, not just the host","Reload the host VM after host suspends/resumes instead of assuming its daemon survived"],"tags":["vagrant","docker","host-vm","ssh","exit-code"],"backgroundTag":"nonzero-exit-code","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}