windows 2016 packer iso stuck on waiting for IP

43 views
Skip to first unread message

Tony Wong

unread,
Jun 20, 2020, 12:44:41 PM6/20/20
to Packer
I am trying to run a packer build opf a windows 2016 and keeps getting stuck on waiting for IP

The Vm is on and I can see it fron the console. I can ping the VM. its online

why is packer getting stuck on waiting for IP?



david...@mycit.ie

unread,
Jun 20, 2020, 2:04:53 PM6/20/20
to Packer
Can you post your code, not a whole lot to go off of?

Tony Wong

unread,
Jun 21, 2020, 8:07:13 AM6/21/20
to packe...@googlegroups.com
here is the json file

{
  "variables": {
    "vsphere_server": "",
    "vsphere_user": "",
    "vsphere_password": "",
    "vsphere_template_name": "",
    "vsphere_folder": "",
    "vsphere_dc_name": "",
    "vsphere_compute_cluster": "",
    "vsphere_host": "",
    "vsphere_portgroup_name": "",
    "vsphere_datastore": "",
    "winadmin_password": "",
    "cpu_num": "",
    "mem_size": "",
    "disk_size": "",
    "os_iso_path": "",
    "vmtools_iso_path":""
  },
  "sensitive-variables": ["vsphere_password", "winadmin_password"],
  "builders": [
    {
      "type": "vsphere-iso",
      "vcenter_server":      "{{user `vsphere_server`}}",
      "username":            "{{user `vsphere_user`}}",
      "password":            "{{user `vsphere_password`}}",
      "insecure_connection": "true",
      "vm_name": "{{user `vsphere_template_name`}}",
      "folder": "{{user `vsphere_folder`}}",
      "datacenter": "{{user `vsphere_dc_name`}}",
      "cluster":     "{{user `vsphere_compute_cluster`}}",
      "host": "{{user `vsphere_host`}}",
      "network": "{{user `vsphere_portgroup_name`}}",
      "datastore": "{{user `vsphere_datastore`}}",
      "convert_to_template": "true",
      "guest_os_type": "windows9Server64Guest",
      "communicator": "winrm",
      "winrm_username": "Administrator",
      "winrm_password": "{{user `winadmin_password`}}",
      "CPUs": "{{user `cpu_num`}}",
      "RAM": "{{user `mem_size`}}",
      "RAM_reserve_all": true,
      "firmware": "bios",
      "disk_controller_type":  "lsilogic-sas",
      "boot_order": "disk,cdrom",
      "disk_size": "{{user `disk_size`}}",
      "disk_thin_provisioned": true,
      "network_card": "vmxnet3",
      "iso_paths": [
        "{{user `os_iso_path`}}",
        "{{user `vmtools_iso_path`}}"
      ],
      "floppy_files": [
        "setup/autounattend.xml",
        "setup/setup.ps1",
        "setup/vmtools.cmd"
      ]
    }
  ],

  "provisioners": [
    {
      "type": "windows-shell",
      "inline": ["dir c:\\"]
    }
  ]
}




and my vars.json


{
   "vsphere_server": "vcenter",
    "vsphere_user": "admini...@vsphere.local",
    "vsphere_password": "Password123@",
    "vsphere_template_name": "Win2016_Packer",
    "vsphere_folder": "Templates/Packer",
    "vsphere_dc_name": "RW-VA",
    "vsphere_compute_cluster": "RW-VA",
    "vsphere_host": "esx.domain",
    "vsphere_portgroup_name": "vlan200",
    "vsphere_datastore": "RW-VA-NIM-VOL1",
    "winadmin_password": "xxxxxx",
    "cpu_num": "2",
    "mem_size": "4096",
    "disk_size": "60000",
    "os_iso_path": "[RW-VA-NIM-ISO] MS/SW_DVD9_Win_Svr_STD_Core_and_DataCtr_Core_2016_64Bit_English_-3_MLF_X21-30350.ISO",
    "vmtools_iso_path":"[RW-VA-NIM-ISO] VMware/windows.iso"
}

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/a20cd34c-37c8-4747-ace6-ad70ded0fbfen%40googlegroups.com.

David Foley

unread,
Jun 21, 2020, 8:20:26 AM6/21/20
to Packer
It's stuck on waiting on IP as your not installing vmtools, which your network from vmx to e3000 and it should work

Tony Wong

unread,
Jun 21, 2020, 8:39:26 AM6/21/20
to packe...@googlegroups.com
I dont understand.

I am able to ping the vm. its using vmxnet3 adapter. why do i need to change to e1000?



On Sun, Jun 21, 2020 at 5:20 AM David Foley <david...@mycit.ie> wrote:
It's stuck on waiting on IP as your not installing vmtools, which your network from vmx to e3000 and it should work

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.

Tony Wong

unread,
Jun 21, 2020, 8:40:56 AM6/21/20
to packe...@googlegroups.com
ok I changed from vmxnet3 to e1000 and now stuck here

image.png

Tony Wong

unread,
Jun 21, 2020, 8:42:38 AM6/21/20
to packe...@googlegroups.com
i see its trying to connect but not successful

image.png

Tony Wong

unread,
Jun 21, 2020, 8:59:40 AM6/21/20
to packe...@googlegroups.com
i tried to reboot the vm and now my administrator password does not work 

david...@mycit.ie

unread,
Jun 22, 2020, 8:00:37 AM6/22/20
to Packer
Have a look at the following:

https://www.packer.io/docs/communicators/winrm 

Maybe try winrm_insecure (bool) - If true, do not check server certificate chain and host name. 
Reply all
Reply to author
Forward
0 new messages