github.com/rothwerx/packer@v0.9.0/builder/vmware/common/driver_workstation10.go (about)

     1  package common
     2  
     3  import (
     4  	"os/exec"
     5  )
     6  
     7  const VMWARE_WS_VERSION = "10"
     8  
     9  // Workstation10Driver is a driver that can run VMware Workstation 10
    10  // installations.
    11  
    12  type Workstation10Driver struct {
    13  	Workstation9Driver
    14  }
    15  
    16  func (d *Workstation10Driver) Clone(dst, src string) error {
    17  	cmd := exec.Command(d.Workstation9Driver.VmrunPath,
    18  		"-T", "ws",
    19  		"clone", src, dst,
    20  		"full")
    21  
    22  	if _, _, err := runAndLog(cmd); err != nil {
    23  		return err
    24  	}
    25  
    26  	return nil
    27  }
    28  
    29  func (d *Workstation10Driver) Verify() error {
    30  	if err := d.Workstation9Driver.Verify(); err != nil {
    31  		return err
    32  	}
    33  
    34  	return workstationVerifyVersion(VMWARE_WS_VERSION)
    35  }