-
Notifications
You must be signed in to change notification settings - Fork 108
Unable to use http_ip when running in a container #474
Description
Reposting from https://discuss.hashicorp.com/t/1-4-0-breaks-my-workflow/70407since no answer.
Overview of the Issue
There were changes in 1.4.0 that introduced http_interface and http_bind_address. I’m running packer in a container and using vsphere_iso. I use http_ip so that vSphere can talk back to packer. This IP is not available inside the container and is not the bind IP. It’s the IP of the VM the container is running on. This was working before, on 1.3.0
In 1.4.0 I’m getting:
error using IP address 192.168.6.10: 192.168.6.10 is not assigned to an interface
I do not want packer to use this address for binding, so the fact that it is not assigned to an interface is irrelevant. How do I fix my configuration to work with 1.4.0 as it used with 1.3.0?
Reproduction Steps
Run packer inside a container. Use http_ip setting and provide the IP of the host.
Packer Version
1.11.2
Plugin Version and Builders
1.4.0
Please select the builder.
-
vsphere-iso
VMware vSphere Version
7.0.3.01900
Guest Operating System
- Debian 11
Simplified Packer Buildfile
N/A - all builds using http_ip are failing
Operating System and Environment Details
Run inside a container produced with this Dockerfile:
FROM jetbrains/teamcity-agent:2024.07.1
USER root
RUN bash -c "curl -sSLO https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update && apt-get install -y dotnet-sdk-7.0 dotnet-sdk-8.0 powershell jq
RUN bash -c "curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add -" && \
apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \
apt-get update && apt-get install -y packer
RUN pwsh -Command 'Set-PSRepository -Name PSGallery -InstallationPolicy Trusted'
RUN pwsh -Command 'Install-Module -Name VMware.PowerCLI -scope AllUsers'
RUN pwsh -Command 'Set-PowerCLIConfiguration -Scope AllUsers -ParticipateInCEIP $false -Confirm:$false'
RUN pwsh -Command 'Set-PowerCLIConfiguration -Scope AllUsers -InvalidCertificateAction Ignore -Confirm:$false'
RUN pwsh -Command 'Set-PowerCLIConfiguration -Scope AllUsers -DefaultVIServerMode Single -Confirm:$false'
USER buildagent
Log Fragments and crash.log Files
It is difficult to get this log from the environment, and it appears that the cause of the issue is the recent changes. Let me know if you still want me to try and get the logs.