github.com/alouche/packer@v0.3.7/builder/vmware/driver_workstation9_unix.go (about)

     1  // +build !windows
     2  
     3  package vmware
     4  
     5  import (
     6  	"errors"
     7  	"fmt"
     8  	"os/exec"
     9  	"path/filepath"
    10  )
    11  
    12  func workstationCheckLicense() error {
    13  	matches, err := filepath.Glob("/etc/vmware/license-*")
    14  	if err != nil {
    15  		return fmt.Errorf("Error looking for VMware license: %s", err)
    16  	}
    17  
    18  	if len(matches) == 0 {
    19  		return errors.New("Workstation does not appear to be licensed. Please license it.")
    20  	}
    21  
    22  	return nil
    23  }
    24  
    25  func workstationFindVdiskManager() (string, error) {
    26  	return exec.LookPath("vmware-vdiskmanager")
    27  }
    28  
    29  func workstationFindVMware() (string, error) {
    30  	return exec.LookPath("vmware")
    31  }
    32  
    33  func workstationFindVmrun() (string, error) {
    34  	return exec.LookPath("vmrun")
    35  }
    36  
    37  func workstationDhcpLeasesPath(device string) string {
    38  	return "/etc/vmware/" + device + "/dhcpd/dhcpd.leases"
    39  }
    40  
    41  func workstationToolsIsoPath(flavor string) string {
    42  	return "/usr/lib/vmware/isoimages/" + flavor + ".iso"
    43  }
    44  
    45  func workstationVmnetnatConfPath() string {
    46  	return ""
    47  }