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. On Sunday, June 2, 2019 at 8:00:03 PM UTC-5, Srini wrote: > 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 > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/c14e1787-cc42-4100-be10-96e75cdad107%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
