diff --git a/builder/vmware/common/driver.go b/builder/vmware/common/driver.go index 47dc6e8b6..fb69b015d 100644 --- a/builder/vmware/common/driver.go +++ b/builder/vmware/common/driver.go @@ -296,6 +296,7 @@ func (d *VmwareDriver) GuestAddress(state multistep.StateBag) (string, error) { return "", errors.New("couldn't find MAC address in VMX") } } + log.Printf("GuestAddress: Found MAC address in VMX: %s", macAddress) res, err := net.ParseMAC(macAddress) if err != nil { @@ -317,6 +318,11 @@ func (d *VmwareDriver) GuestIP(state multistep.StateBag) (string, error) { network := state.Get("vmnetwork").(string) devices, err := netmap.NameIntoDevices(network) + // log them to see what was detected + for _, device := range devices { + log.Printf("GuestIP(%s): Discovered device: %s", network, device) + } + // we were unable to find the device, maybe it's a custom one... // so, check to see if it's in the .vmx configuration if err != nil || network == "custom" { @@ -332,6 +338,7 @@ func (d *VmwareDriver) GuestIP(state multistep.StateBag) (string, error) { if err != nil { return "", err } + log.Printf("GuestIP(%s): Discovered custom device: %s", network, device) } // figure out our MAC address for looking up the guest address @@ -415,6 +422,11 @@ func (d *VmwareDriver) HostAddress(state multistep.StateBag) (string, error) { network := state.Get("vmnetwork").(string) devices, err := netmap.NameIntoDevices(network) + // log them to see what was detected + for _, device := range devices { + log.Printf("HostAddress(%s): Discovered device: %s", network, device) + } + // we were unable to find the device, maybe it's a custom one... // so, check to see if it's in the .vmx configuration if err != nil || network == "custom" { @@ -430,6 +442,7 @@ func (d *VmwareDriver) HostAddress(state multistep.StateBag) (string, error) { if err != nil { return "", err } + log.Printf("HostAddress(%s): Discovered custom device: %s", network, device) } var lastError error @@ -488,6 +501,11 @@ func (d *VmwareDriver) HostIP(state multistep.StateBag) (string, error) { network := state.Get("vmnetwork").(string) devices, err := netmap.NameIntoDevices(network) + // log them to see what was detected + for _, device := range devices { + log.Printf("HostIP(%s): Discovered device: %s", network, device) + } + // we were unable to find the device, maybe it's a custom one... // so, check to see if it's in the .vmx configuration if err != nil || network == "custom" { @@ -503,6 +521,7 @@ func (d *VmwareDriver) HostIP(state multistep.StateBag) (string, error) { if err != nil { return "", err } + log.Printf("HostIP(%s): Discovered custom device: %s", network, device) } var lastError error diff --git a/builder/vmware/common/driver_fusion5.go b/builder/vmware/common/driver_fusion5.go index 9c81efd4a..bfc7803e7 100644 --- a/builder/vmware/common/driver_fusion5.go +++ b/builder/vmware/common/driver_fusion5.go @@ -3,6 +3,7 @@ package common import ( "errors" "fmt" + "log" "io/ioutil" "os" "os/exec" @@ -157,6 +158,7 @@ func (d *Fusion5Driver) Verify() error { if _, err := os.Stat(pathNetworking); err != nil { return nil, fmt.Errorf("Could not find networking conf file: %s", pathNetworking) } + log.Printf("Located networkmapper configuration file using Fusion5: %s", pathNetworking) fd, err := os.Open(pathNetworking) if err != nil { diff --git a/builder/vmware/common/driver_fusion6.go b/builder/vmware/common/driver_fusion6.go index 1f959d35d..002d4227a 100644 --- a/builder/vmware/common/driver_fusion6.go +++ b/builder/vmware/common/driver_fusion6.go @@ -83,6 +83,7 @@ func (d *Fusion6Driver) Verify() error { if _, err := os.Stat(pathNetworking); err != nil { return nil, fmt.Errorf("Could not find networking conf file: %s", pathNetworking) } + log.Printf("Located networkmapper configuration file using Fusion6: %s", pathNetworking) fd, err := os.Open(pathNetworking) if err != nil {