Packer cannot resolve Host IP

Discussion in 'Parallels Provider for Vagrant' started by PetrH2, Feb 22, 2021.

  1. PetrH2

    PetrH2 Junior Member

    Hello everyone,
    I'm playing a bit with Packer in order to produce a base box for Vagrant. Everything works quite fine except today I reached the
    parallels-iso: Error detecting host IP: IP not found in ifconfig output
    error message. I found that the culprit is my Ethernet connection. When I connect using WiFi everything works fine.
    I took a quick look at the source code
    and it looks like there's some regular expression magic going on. Unfortunately I'm not proficient in Golang therefore I don't understand it and hence I cannot deduce what is the original intent behind the IP lookup.
    Is here somebody who is able to shed a bit of light to me what's going on?
    Thanks in advance,

    Further investigation:
    I found that the Packer provider looks for multiple interfaces:
    Unfortunately my LAN interface is en16 which is out of bounds. The WiFi interface is en0.
    I'm attaching two outputs of ifconfig illustrating the difference in the IP configuration when only LAN is connected and both LAN and WiFi is up.

    Attached Files:

  2. PetrH2

    PetrH2 Junior Member

    OK, one might introduce a configuration like this:
    "builders": [
    "type": "parallels-iso",
    "host_interfaces": [ "en16" ],

    But it is not so platform independent, indeed...
    AbortionP likes this.
  3. AbortionP

    AbortionP Bit poster

    Yes you are right. thanks

Share This Page