Windows 2016 packer template for Vmware-iso

1,000 views
Skip to first unread message

praveen bhat

unread,
Aug 6, 2018, 8:12:06 AM8/6/18
to Packer

Issue: I am trying to build a windows 2016 server datacenter edition using packer template.
when the vm boots after initial build it gets stuck @"getting device ready" state. Need help.

  • Packer version from packer version 1.2.2
  • Host platform Ubuntu 16.04

PACKER_LOG is attached.

json file and answer files attached.

packer_log.txt
Autounattendxml.txt
windows2016json.txt

praveen bhat

unread,
Aug 8, 2018, 2:07:19 AM8/8/18
to Packer
Would appreciate of anyone has come across similar issue and could shed some light here.
Thanks in advance

Daniel Siegenthaler

unread,
Aug 8, 2018, 12:31:18 PM8/8/18
to Packer
Maybe a driver issue? Do you include vmxnet driver anywhere?

Gabo Kete

unread,
Aug 8, 2018, 5:51:56 PM8/8/18
to Packer
can you double-check that you have a network device attached to your VM? 

Seems packer is unable to talk to the VM because it hasn't an ip address, either because the device is not there or it hasn't an ip address defined

2018/08/06 12:36:56 packer: 2018/08/06 12:36:56 [DEBUG] starting remote command: esxcli --formatter csv network vm list
2018/08/06 12:36:56 packer: 2018/08/06 12:36:56 [DEBUG] Opening new ssh session
2018/08/06 12:36:56 packer: 2018/08/06 12:36:56 [DEBUG] starting remote command: esxcli --formatter csv network vm port list -w 2624501
2018/08/06 12:36:57 packer: 2018/08/06 12:36:57 [DEBUG] Error getting WinRM host: No interface on the VM has an IP address ready

praveen bhat

unread,
Aug 14, 2018, 3:56:48 AM8/14/18
to Packer
I have created a DHCP with a private subnet and defined a new port group with name Private VMnetwork.
also its nic type is e1000.

praveen bhat

unread,
Aug 14, 2018, 3:57:54 AM8/14/18
to Packer
yes in esxi i can see that the network card is getting attached to the vm, I suspect the autounattend file.

praveen bhat

unread,
Aug 14, 2018, 4:00:53 AM8/14/18
to Packer
with some recommendations from friends of mine I tried vsphere-iso build please check the json file attached. currently it stops at waiting for ip step, though i see that the NIC is getting attached.


On Monday, August 6, 2018 at 5:42:06 PM UTC+5:30, praveen bhat wrote:
windows2016_SDE64json.txt
Autounattendxml.txt

praveen bhat

unread,
Aug 14, 2018, 4:11:50 AM8/14/18
to Packer
in the vmware console i get the below error:
windows could not apply the unattend answer file's <Disk Configuration> setting.
Autounattendxml.txt

Gabo Kete

unread,
Aug 14, 2018, 6:24:02 AM8/14/18
to Packer
You may want to have a look at the DHCP server logs and make sure the IP address is assigned to the VM you are trying to create... 

Even though the NIC is successfully attached to the VM you need to have an IP address assigned to the VM...  

Shyam J

unread,
Aug 14, 2018, 7:35:14 AM8/14/18
to Packer
Hey Praveen,

When I tried to build RHEL in ESX I had to pass below mentioned vmx_data to get identified in network. I had passed static IP. Try adding more vmx_data.

 "vmx_data":
      {
      "memsize": 512,
      "ethernet0.networkName": "VLAN_NAME",
      "ethernet0.present": "TRUE",
      "ethernet0.startConnected": "TRUE",
      "ethernet0.virtualDev": "e1000",
      "ethernet0.addressType": "generated",
      "ethernet0.generatedAddressOffset": "0",
      "ethernet0.wakeOnPcktRcv": "FALSE",
      "numvcpus": 1
      },

Thanks
Shyam

praveen bhat

unread,
Aug 14, 2018, 7:42:00 AM8/14/18
to Packer
Hey Shyam, thanks for the response.
unfortunately i cannot include VMX_DATA as I am building in vsphere. and the plugin does not accept a config type "vmx_data".

praveen bhat

unread,
Aug 14, 2018, 7:44:13 AM8/14/18
to Packer
Yes i checked the dhcpd.log and realised that it is not getting any request from the windows vm i am trying to create.
so what could possibly be wrong here? Coz that DHCP server is receiving requests from other linux build's that I am building from same VC.
Appreciate it

praveen bhat

unread,
Aug 21, 2018, 1:47:54 AM8/21/18
to Packer
Issue still persists, any help is appreciated. Thanks!


On Monday, August 6, 2018 at 5:42:06 PM UTC+5:30, praveen bhat wrote:

Gabo Kete

unread,
Aug 21, 2018, 4:49:13 AM8/21/18
to Packer
if your DHCP server is not receiving anything from your Windows VM you are creating, then something between the Vsphere and your DHCP server is blocking the traffic , this could be something like a firewall, different VLAN connection between your VM and DHCP server.. not getting the right route to connect to the DHCP server..

What you probably want to do is to setup your ip address as part of your build process rather than asking the DHCP server for one if it gets to difficult for your to do the troubleshooting.. 

praveen bhat

unread,
Sep 19, 2018, 4:35:30 AM9/19/18
to Packer
It was the issue with wrong esxi host details. neverthless there were some other missing configurations like the guest_os_type declaration missing in the template.
Thanks everyone

James Muldrow

unread,
Nov 3, 2019, 9:55:11 AM11/3/19
to Packer
Any Chance that you can provide your updated scripts? I'm having similar issues using vmware-iso.
Reply all
Reply to author
Forward
0 new messages