{"record":{"id":"aadf01fabebd7c60","repo":"hashicorp/vagrant","slug":"the-box-is-not-able-to-report-an-address-for-winrm","errorCode":null,"errorMessage":"The box is not able to report an address for WinRM to connect to yet.\nWinRM cannot access this Vagrant environment. Please wait for the\nVagrant environment to be running and try again.","messagePattern":"The box is not able to report an address for WinRM to connect to yet\\.\nWinRM cannot access this Vagrant environment\\. Please wait for the\nVagrant environment to be running and try again\\.","errorType":"exception","errorClass":"VagrantPlugins::CommunicatorWinRM::Errors::WinRMNotReady","httpStatus":null,"severity":"error","filePath":"plugins/commands/winrm_config/command.rb","lineNumber":41,"sourceCode":"        options = {}\n\n        opts = OptionParser.new do |o|\n          o.banner = \"Usage: vagrant winrm-config [options] [name|id]\"\n          o.separator \"\"\n          o.separator \"Options:\"\n          o.separator \"\"\n\n          o.on(\"--host NAME\", \"Name the host for the config\") do |h|\n            options[:host] = h\n          end\n        end\n\n        argv = parse_options(opts)\n        return if !argv\n\n        with_target_vms(argv) do |machine|\n          winrm_info = CommunicatorWinRM::Helper.winrm_info(machine)\n          raise Vagrant::Errors::WinRMNotRead if winrm_info.nil?\n\n          rdp_info = get_rdp_info(machine) || {}\n\n          variables = {\n            host_key: options[:host] || machine.name || \"vagrant\",\n            rdp_host: rdp_info[:host] || winrm_info[:host],\n            rdp_port: rdp_info[:port],\n            rdp_user: rdp_info[:username],\n            rdp_pass: rdp_info[:password],\n            winrm_host: winrm_info[:host],\n            winrm_port: winrm_info[:port],\n            winrm_user: machine.config.winrm.username,\n            winrm_password: machine.config.winrm.password\n          }\n\n          template = \"commands/winrm_config/config\"\n          config = Vagrant::Util::TemplateRenderer.render(template, variables)\n          machine.ui.machine(\"winrm-config\", config)","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/winrm_config/command.rb#L23-L59","documentation":"`vagrant winrm-config` needs WinRM connection details; CommunicatorWinRM::Helper.winrm_info(machine) returned nil, so no host/port for WinRM could be determined. Like ssh-config's SSHNotReady, this is machine state: the box cannot yet report an address for WinRM, typically because it is not booted or lacks a forwarded 5985 port / reachable IP.","triggerScenarios":"Running `vagrant winrm-config` before the machine is up; a Windows box with no WinRM forwarded port and no private-network IP; communicator/address resolution failing so winrm_info has no address to return.","commonSituations":"Windows guests that take minutes to boot and start WinRM; Vagrantfiles missing `config.vm.communicator = 'winrm'` and the 5985 forwarded port; scripts generating winrm config for config-management tools right after `vagrant up` returns.","solutions":["Bring the machine fully up first (`vagrant up`), verify WinRM answers (e.g. `vagrant port` shows the 5985 mapping), then retry","Enable WinRM in the Vagrantfile: `config.vm.communicator = 'winrm'` plus a forwarded port for guest 5985","If WinRM is slow to start on the guest, retry winrm-config after boot completes"],"exampleFix":"# before\nVagrant.configure('2') do |config|\n  config.vm.box = 'windows-2019'\nend\n# vagrant winrm-config  ->  WinRMNotRead\n\n# after\nVagrant.configure('2') do |config|\n  config.vm.box = 'windows-2019'\n  config.vm.communicator = 'winrm'\n  config.vm.network 'forwarded_port', guest: 5985, host: 55985, id: 'winrm'\nend","handlingStrategy":"retry","validationCode":"state = machine.state.id\nabort \"machine is '#{state}'; run vagrant up first\" unless state == 'running'\ninfo = CommunicatorWinRM::Helper.winrm_info(machine)","typeGuard":null,"tryCatchPattern":"attempts = 0\nbegin\n  CommunicatorWinRM::Helper.winrm_info(machine) or raise Vagrant::Errors::WinRMNotRead\nrescue Vagrant::Errors::WinRMNotRead\n  attempts += 1\n  retry if attempts < 30  # WinRM may still be starting on the guest\nend","preventionTips":["Configure `config.vm.communicator = 'winrm'` and a 5985 forwarded port for Windows boxes","Gate winrm-config on the machine reporting 'running'","Add bounded retries — Windows guests often need time before WinRM answers"],"tags":["vagrant","winrm","windows-guest","machine-state","port-forwarding"],"backgroundTag":"service-address-undetected","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}