WinRM communicator: "Failed to send shutdown command: unknown error"

58 views
Skip to first unread message

Chaim Eliyah

unread,
Feb 11, 2018, 4:18:37 PM2/11/18
to Packer
Full error message:

==> virtualbox-iso: Failed to send shutdown command: unknown error Post http://127.0.0.1:3497/wsman: EOF


I was redirected to this group.

As for WinRM being "configured incorrectly" it's not; here's my JSON:

{

  "variables": {

    "cloud_token": "{{ env `ATLAS_TOKEN` }}"

  },

  "builders": [

    {

      "type": "virtualbox-iso",

      "boot_wait": "1m",

      "communicator": "winrm",

      "disk_size": "60000",

      "guest_additions_mode": "attach",

      "guest_os_type": "Windows10_64",

      "headless": true,

      "iso_url": "en_windows_10_multi-edition_version_1709_updated_sept_2017_x64_dvd_100090817.iso",

      "iso_checksum": "5e8bdef20c4b468f868f1f579197f7cf",

      "iso_checksum_type": "md5",

      "output_directory": "windows-base",

      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",

      "vm_name": "Windows10_64-base",

      "winrm_username": "vagrant",

      "winrm_password": "vagrant",

      "floppy_files": [

        "./answer_files/10/Autounattend.xml",

        "./scripts/fixnetwork.ps1",

        "./scripts/microsoft-updates.bat",

        "./scripts/win-updates.ps1",

        "./scripts/openssh.ps1"

      ],

      "vboxmanage": [

        ["modifyvm", "{{.Name}}", "--memory", "4096"],

        ["modifyvm", "{{.Name}}", "--cpus", "2"],

        ["modifyvm", "{{.Name}}", "--vram", "128"]

      ],

      "virtualbox_version_file": ""

    }

  ],

  "post-processors": [[

    {

      "type": "vagrant",

      "keep_input_artifact": true,

      "output": "build/windows.box",

      "vagrantfile_template": "vagrantfile-windows.template"

    },

    {

      "type": "vagrant-cloud",

      "box_tag": "shiftwise/windows-base",

      "access_token": "{{user `cloud_token`}}",

      "version": "0.0.2"

    }

  ]]

}


...so most of the configuration is the default configuration outlined at:


The port it's attempting to communicate on is "3497" when the WinRM default is "5986" according to the documentation.

I tried the workaround indicated in the GitHub issue, but that didn't solve the issue.


Chaim Eliyah

unread,
Feb 11, 2018, 5:07:01 PM2/11/18
to Packer
Shoot, my current status is "unable to reproduce" when I tried `packer build` a second time just now. If I see the issue again I'll re-post. If this is an issue for anyone else I left a link to this page on the GitHub issue, feel free to chime in.
Reply all
Reply to author
Forward
0 new messages