builder/vmware: improved logging for various workstation steps
This commit is contained in:
parent
2f15d0e14f
commit
f5b0b4f9d7
|
@ -105,6 +105,10 @@ func (d *Workstation9Driver) Verify() error {
|
|||
}
|
||||
}
|
||||
|
||||
log.Printf("VMware app path: %s", d.AppPath)
|
||||
log.Printf("vmrun path: %s", d.VmrunPath)
|
||||
log.Printf("vdisk-manager path: %s", d.VdiskManagerPath)
|
||||
|
||||
if _, err := os.Stat(d.AppPath); err != nil {
|
||||
return fmt.Errorf("VMware application not found: %s", d.AppPath)
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package vmware
|
|||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
@ -28,7 +29,13 @@ type DHCPLeaseGuestLookup struct {
|
|||
}
|
||||
|
||||
func (f *DHCPLeaseGuestLookup) GuestIP() (string, error) {
|
||||
fh, err := os.Open(f.Driver.DhcpLeasesPath(f.Device))
|
||||
dhcpLeasesPath := f.Driver.DhcpLeasesPath(f.Device)
|
||||
log.Printf("DHCP leases path: %s", dhcpLeasesPath)
|
||||
if dhcpLeasesPath == "" {
|
||||
return "", errors.New("no DHCP leases path found.")
|
||||
}
|
||||
|
||||
fh, err := os.Open(dhcpLeasesPath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue