network interface not getting created while building windows 2016 image using vsphere.iso

429 views
Skip to first unread message

Srinivasan Govindasamy

unread,
Jun 2, 2019, 9:00:03 PM6/2/19
to Packer
Hello Team,

would seek your help to identify the issue on assigning the IP address to the VM. The VM is getting created without assigning the IP address. have enclosed the autounattend.xml file for reference.

Regards
windows-server-2016.json
autounattend.xml

Alvaro Miranda Aguilera

unread,
Jun 4, 2019, 3:27:59 AM6/4/19
to packe...@googlegroups.com
hello
without packer, does this autounattend works ?

--
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/mitchellh/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/ec96f9cd-237a-4038-934f-bca5f20e087e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Jason Voorhees

unread,
Jun 17, 2019, 11:56:48 AM6/17/19
to Packer
I also had a hard time while trying to assign an IP address to my Windows machine by using Autounattend.xml answer file. I finally gave up and used a script to manually set the IP, like this:

<settings pass="specialize">
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>Network setup</Description>
<Path>A:\netconfig.cmd</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>

This is my netconfig.cmd file:

netsh interface ipv4 set address name="Ethernet0" static 10.240.30.101 255.255.255.0 10.240.30.1
netsh interface ipv4 set dns name="Ethernet0" source=static address=10.240.0.10 primary
netsh interface ipv4 add dnsservers name="Ethernet0" address=10.240.100.12 index=2

Hope that helps.
Reply all
Reply to author
Forward
0 new messages