builder/vmware: look for license for WS9

This commit is contained in:
Mitchell Hashimoto 2013-07-16 14:58:16 -07:00
parent 04b8ff89a6
commit bca05ddd5b
1 changed files with 11 additions and 0 deletions

View File

@ -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
}