diff --git a/builder/vmware/driver_workstation9.go b/builder/vmware/driver_workstation9.go index 920291bee..7d86d8d66 100644 --- a/builder/vmware/driver_workstation9.go +++ b/builder/vmware/driver_workstation9.go @@ -2,6 +2,7 @@ package vmware import ( "bytes" + "errors" "fmt" "log" "os/exec" @@ -97,6 +98,16 @@ func (d *Workstation9LinuxDriver) Verify() error { return fmt.Errorf("Required application 'vmware-vdiskmanager' not found in path.") } + // Check to see if it APPEARS to be licensed. + matches, err := filepath.Glob("/etc/vmware/license-*") + if err != nil { + return fmt.Errorf("Error looking for VMware license: %s", err) + } + + if len(matches) == 0 { + return errors.New("Workstation does not appear to be licensed. Please license it.") + } + return nil }