diff --git a/iso/host_ip_ifconfig.go b/iso/host_ip_ifconfig.go index 31243fa..756a875 100644 --- a/iso/host_ip_ifconfig.go +++ b/iso/host_ip_ifconfig.go @@ -45,7 +45,7 @@ func (f *IfconfigIPFinder) HostIP() (string, error) { return "", err } - re := regexp.MustCompile(`inet\s*(?:addr:)?(.+?)\s`) + re := regexp.MustCompile(`inet\s+(?:addr:)?(.+?)\s`) matches := re.FindStringSubmatch(stdout.String()) if matches == nil { return "", errors.New("IP not found in ifconfig output...") diff --git a/iso/step_type_boot_command.go b/iso/step_type_boot_command.go index adb71b9..2771116 100644 --- a/iso/step_type_boot_command.go +++ b/iso/step_type_boot_command.go @@ -42,12 +42,7 @@ func (s *stepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction driver := state.Get("driver").(parallelscommon.Driver) // Determine the host IP - var ipFinder HostIPFinder - if finder, ok := driver.(HostIPFinder); ok { - ipFinder = finder - } else { - ipFinder = &IfconfigIPFinder{Device: "vmnet8"} - } + ipFinder := &IfconfigIPFinder{Device: "en0"} hostIp, err := ipFinder.HostIP() if err != nil { @@ -57,7 +52,7 @@ func (s *stepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction return multistep.ActionHalt } - log.Printf("Host IP for the Parallels machine: %s", hostIp) + ui.Say(fmt.Sprintf("Host IP for the Parallels machine: %s", hostIp)) tplData := &bootCommandTemplateData{ hostIp,