Closed usmcguy closed 5 months ago
Out of curiosity, is there a reason that the IP would take such a long time to be applied to the OS?
One method you can use it's to apply the configuration to the autoattend.xml file but pass in the desired configuration by using a pkptpl.hcl file to generate it "on the fly" and apply the IP configuration early.
If you want to see how you can do a portion of this, take a look at my project here - of course you'd need to add the IP configuration variables and then pass them into the template for the .xml.
When the OS comes up after install, its finishing a MDT Task Sequence. We are trying to avoid having to replace MDT all together. So thats the reason it takes that amount of time. The last step is setting the IP.
Hi @usmcguy 👋🏻 -
Have you tried setting ip_wait_address
to an range that you'd want wait for an IP in that range?
By default it's 0.0.0.0/0" and the APIPA
169.254.0.0-169.254.255.255` range wouild be included?
...
variable "vsphere_ip_wait_address" {
type = string
default = "172.16.11.0/24"
}
...
source "vsphere-iso" "windows" {
...
ip_wait_address = var.vsphere_ip_wait_address
...
}
Ryan
Hello! 👋
This issue has not received any update from the OP in the last 7 days.
Please review the provided suggestion for use of ip_wait_address
and feel free to comment and/or reopen this issue if the issue persists.
When filing a bug please include the following headings, if possible.
packer version 1.10.0 vsphere plugin version 1.2.4
Overview of the Issue
I have a builder configured to install Windows Server. I am using a script that sets a static IP. Before set, it has a 169.#.#.# address. An IP isnt available for packer until about 35m mark. To prevent using 169.x IP, I have tried using the ip_settle_timeout. Since it takes longer than 30m, I also set the ip_wait_timeout to be a bit longer, 37m. When I set the ip_settle_timeout to 25m or lower, it works as expected, but since I havent set the static IP at that point, it tries to use the 169.X address. But any value beyond 25m, packer is stuck waiting for an IP, before it ultimately times out at 37m. I have tried using seconds vs defining as minutes, but it makes no difference.
Simplified Packer Buildfile
Packer Version
1.10.0
Plugin Version and Builders
1.2.4
Please select the builder.
vsphere-iso
VMware vSphere Version
8.0.2
Guest Operating System
Windows Server 2019
Log Fragments and
crash.log
Fileshttps://gist.github.com/usmcguy/ee53101f52bbef3c37424d42170e3d58