builder/vmware/common: Fusion6 driver can clone

This commit is contained in:
Mitchell Hashimoto 2013-12-26 15:03:12 -07:00
parent b994b8c09e
commit 03fb5fb0f1
2 changed files with 13 additions and 2 deletions

View File

@ -2,7 +2,6 @@ package common
import (
"bytes"
"errors"
"fmt"
"log"
"os"
@ -18,7 +17,15 @@ type Fusion6Driver struct {
}
func (d *Fusion6Driver) Clone(dst, src string) error {
return errors.New("Cloning is not supported with Fusion 5. Please use Fusion 6+.")
cmd := exec.Command(d.vmrunPath(),
"-T", "fusion",
"clone", src, dst,
"full")
if _, _, err := runAndLog(cmd); err != nil {
return err
}
return nil
}
func (d *Fusion6Driver) Verify() error {

View File

@ -33,6 +33,10 @@ type ESX5Driver struct {
outputDir string
}
func (d *ESX5Driver) Clone(dst, src string) error {
return errors.New("Cloning is not supported with the ESX driver.")
}
func (d *ESX5Driver) CompactDisk(diskPathLocal string) error {
return nil
}